Re: [PATCH 1/2] mm: add context argument to shrinker callback

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Chinner
Date: Thursday, April 22, 2010 - 6:58 pm

On Thu, Apr 22, 2010 at 12:42:47PM -0400, Christoph Hellwig wrote:

Yes, it is, and one that I think we can clean up significantly by
the use of context based shrinkers.

IMO, a better approach to the VFS shrinkers is to leverage the fact
we already have per-sb dentry LRUs and convert the inode cache to a
per-sb LRU as well.

We can then remove the current dependency problems by moving to
a single context based shrinker (i.e. per-sb) to reclaim from the
per-sb dentry LRU, followed by the per-sb inode LRU via a single
shrinker. That is, remove the global scope from them because that is
the cause of the shrinker call-order dependency problems.

Further, if we then add a filesystem callout to the new superblock
shrinker callout, we can handle all the needs of XFS (and other
filesystems) without requiring them to have global filesystem lists
and without introducing new dependencies between registered
shrinkers.

And given that the shrinker currently handles proportioning reclaim
based on the number of objects reported by the cache, it also allows
us to further simplify the dentry cache reclaim by removing all the
proportioning stuff it does right now...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] mm: add context argument to shrinker callback, Christoph Hellwig, (Sat Apr 17, 5:15 pm)
Re: [PATCH 1/2] mm: add context argument to shrinker callback, Christoph Hellwig, (Thu Apr 22, 9:32 am)
Re: [PATCH 1/2] mm: add context argument to shrinker callback, Christoph Hellwig, (Thu Apr 22, 9:42 am)
Re: [PATCH 1/2] mm: add context argument to shrinker callback, Dave Chinner, (Thu Apr 22, 6:58 pm)