summaryrefslogtreecommitdiffstats
path: root/fs/xfs/kmem.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-02-01 14:57:20 +0100
committerBen Myers <bpm@sgi.com>2012-02-10 19:02:05 +0100
commit04da0c8196ac0b12fb6b84f4b7a51ad2fa56d869 (patch)
tree1348207af6e7824a9baa268236768b857db00712 /fs/xfs/kmem.h
parentxfs: pass KM_SLEEP flag to kmem_realloc() in xlog_recover_add_to_cnt_trans() (diff)
downloadlinux-04da0c8196ac0b12fb6b84f4b7a51ad2fa56d869.tar.xz
linux-04da0c8196ac0b12fb6b84f4b7a51ad2fa56d869.zip
xfs: use a normal shrinker for the dquot freelist
Stop reusing dquots from the freelist when allocating new ones directly, and implement a shrinker that actually follows the specifications for the interface. The shrinker implementation is still highly suboptimal at this point, but we can gradually work on it. This also fixes an bug in the previous lock ordering, where we would take the hash and dqlist locks inside of the freelist lock against the normal lock ordering. This is only solvable by introducing the dispose list, and thus not when using direct reclaim of unused dquots for new allocations. As a side-effect the quota upper bound and used to free ratio values in /proc/fs/xfs/xqm are set to 0 as these values don't make any sense in the new world order. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/kmem.h')
-rw-r--r--fs/xfs/kmem.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
index 292eff198030..ab7c53fe346e 100644
--- a/fs/xfs/kmem.h
+++ b/fs/xfs/kmem.h
@@ -110,10 +110,4 @@ kmem_zone_destroy(kmem_zone_t *zone)
extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
-static inline int
-kmem_shake_allow(gfp_t gfp_mask)
-{
- return ((gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS));
-}
-
#endif /* __XFS_SUPPORT_KMEM_H__ */