Lines Matching refs:xblkcache
49 xblk_cache_t *xblkcache = xhat->xhat_provider->xblkcache; in xhat_alloc_xhatblk() local
53 mutex_enter(&xblkcache->lock); in xhat_alloc_xhatblk()
54 if (xblkcache->free_blks) { in xhat_alloc_xhatblk()
56 sfmmu_hmetohblk(xblkcache->free_blks); in xhat_alloc_xhatblk()
62 xblkcache->free_blks = xblk->xblk_hme[0].hme_next; in xhat_alloc_xhatblk()
63 mutex_exit(&xblkcache->lock); in xhat_alloc_xhatblk()
65 mutex_exit(&xblkcache->lock); in xhat_alloc_xhatblk()
66 xblk = kmem_cache_alloc(xblkcache->cache, KM_SLEEP); in xhat_alloc_xhatblk()
80 xblk_cache_t *xblkcache = xblk->xhat_hme_blk_hat-> in xhat_free_xhatblk() local
81 xhat_provider->xblkcache; in xhat_free_xhatblk()
84 mutex_enter(&xblkcache->lock); in xhat_free_xhatblk()
85 xblk->xblk_hme[0].hme_next = xblkcache->free_blks; in xhat_free_xhatblk()
86 xblkcache->free_blks = &xblk->xblk_hme[0]; in xhat_free_xhatblk()
87 mutex_exit(&xblkcache->lock); in xhat_free_xhatblk()
101 xblk_cache_t *xblkcache; in xhat_xblkcache_reclaim() local
106 xblkcache = provider->xblkcache; in xhat_xblkcache_reclaim()
109 while (xblkcache->free_blks != NULL) { in xhat_xblkcache_reclaim()
115 mutex_enter(&xblkcache->lock); in xhat_xblkcache_reclaim()
116 sfhme = xblkcache->free_blks; in xhat_xblkcache_reclaim()
117 xblkcache->free_blks = NULL; in xhat_xblkcache_reclaim()
118 mutex_exit(&xblkcache->lock); in xhat_xblkcache_reclaim()
124 kmem_cache_free(xblkcache->cache, xblk); in xhat_xblkcache_reclaim()