[PATCH 1/3] mm: add context argument to shrinker callback
Christoph Hellwig
hch at infradead.org
Thu Jul 15 13:09:46 CDT 2010
On Thu, Jul 15, 2010 at 09:46:56PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> The current shrinker implementation requires the registered callback
> to have global state to work from. This makes it difficult to shrink
> caches that are not global (e.g. per-filesystem caches). Pass the shrinker
> structure to the callback so that users can embed the shrinker structure
> in the context the shrinker needs to operate on and get back to it in the
> callback via container_of().
>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list