All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 1/3] mm: add context argument to shrinker callback
Date: Tue, 20 Jul 2010 14:30:04 -0500	[thread overview]
Message-ID: <1279654204.1859.232.camel@doink> (raw)
In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com>

On Thu, 2010-07-15 at 21:46 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@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@redhat.com>
> ---
>  arch/x86/kvm/mmu.c              |    2 +-
>  drivers/gpu/drm/i915/i915_gem.c |    2 +-
>  fs/dcache.c                     |    2 +-
>  fs/gfs2/glock.c                 |    2 +-
>  fs/gfs2/quota.c                 |    2 +-
>  fs/gfs2/quota.h                 |    2 +-
>  fs/inode.c                      |    2 +-
>  fs/mbcache.c                    |    5 +++--
>  fs/nfs/dir.c                    |    2 +-
>  fs/nfs/internal.h               |    3 ++-
>  fs/quota/dquot.c                |    2 +-
>  fs/ubifs/shrinker.c             |    2 +-
>  fs/ubifs/ubifs.h                |    2 +-
>  fs/xfs/linux-2.6/xfs_buf.c      |    5 +++--
>  fs/xfs/linux-2.6/xfs_sync.c     |    1 +
>  fs/xfs/quota/xfs_qm.c           |    7 +++++--
>  include/linux/mm.h              |    2 +-
>  mm/vmscan.c                     |    8 +++++---
>  18 files changed, 31 insertions(+), 22 deletions(-)

You seem to have missed two registered shrinkers:
- ttm_pool_mm_shrink() in "drivers/gpu/drm/ttm/ttm_page_alloc.c"
- rpcauth_cache_shrinker() in "net/sunrpc/auth.c"

Other that that, this looks good to me.

					-Alex





_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: Alex Elder <aelder@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/3] mm: add context argument to shrinker callback
Date: Tue, 20 Jul 2010 14:30:04 -0500	[thread overview]
Message-ID: <1279654204.1859.232.camel@doink> (raw)
In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com>

On Thu, 2010-07-15 at 21:46 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@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@redhat.com>
> ---
>  arch/x86/kvm/mmu.c              |    2 +-
>  drivers/gpu/drm/i915/i915_gem.c |    2 +-
>  fs/dcache.c                     |    2 +-
>  fs/gfs2/glock.c                 |    2 +-
>  fs/gfs2/quota.c                 |    2 +-
>  fs/gfs2/quota.h                 |    2 +-
>  fs/inode.c                      |    2 +-
>  fs/mbcache.c                    |    5 +++--
>  fs/nfs/dir.c                    |    2 +-
>  fs/nfs/internal.h               |    3 ++-
>  fs/quota/dquot.c                |    2 +-
>  fs/ubifs/shrinker.c             |    2 +-
>  fs/ubifs/ubifs.h                |    2 +-
>  fs/xfs/linux-2.6/xfs_buf.c      |    5 +++--
>  fs/xfs/linux-2.6/xfs_sync.c     |    1 +
>  fs/xfs/quota/xfs_qm.c           |    7 +++++--
>  include/linux/mm.h              |    2 +-
>  mm/vmscan.c                     |    8 +++++---
>  18 files changed, 31 insertions(+), 22 deletions(-)

You seem to have missed two registered shrinkers:
- ttm_pool_mm_shrink() in "drivers/gpu/drm/ttm/ttm_page_alloc.c"
- rpcauth_cache_shrinker() in "net/sunrpc/auth.c"

Other that that, this looks good to me.

					-Alex






WARNING: multiple messages have this Message-ID (diff)
From: Alex Elder <aelder@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/3] mm: add context argument to shrinker callback
Date: Tue, 20 Jul 2010 14:30:04 -0500	[thread overview]
Message-ID: <1279654204.1859.232.camel@doink> (raw)
In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com>

On Thu, 2010-07-15 at 21:46 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@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@redhat.com>
> ---
>  arch/x86/kvm/mmu.c              |    2 +-
>  drivers/gpu/drm/i915/i915_gem.c |    2 +-
>  fs/dcache.c                     |    2 +-
>  fs/gfs2/glock.c                 |    2 +-
>  fs/gfs2/quota.c                 |    2 +-
>  fs/gfs2/quota.h                 |    2 +-
>  fs/inode.c                      |    2 +-
>  fs/mbcache.c                    |    5 +++--
>  fs/nfs/dir.c                    |    2 +-
>  fs/nfs/internal.h               |    3 ++-
>  fs/quota/dquot.c                |    2 +-
>  fs/ubifs/shrinker.c             |    2 +-
>  fs/ubifs/ubifs.h                |    2 +-
>  fs/xfs/linux-2.6/xfs_buf.c      |    5 +++--
>  fs/xfs/linux-2.6/xfs_sync.c     |    1 +
>  fs/xfs/quota/xfs_qm.c           |    7 +++++--
>  include/linux/mm.h              |    2 +-
>  mm/vmscan.c                     |    8 +++++---
>  18 files changed, 31 insertions(+), 22 deletions(-)

You seem to have missed two registered shrinkers:
- ttm_pool_mm_shrink() in "drivers/gpu/drm/ttm/ttm_page_alloc.c"
- rpcauth_cache_shrinker() in "net/sunrpc/auth.c"

Other that that, this looks good to me.

					-Alex





--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-07-20 19:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 11:46 [PATCH 0/3] shrinker fixes for XFS for 2.6.35 Dave Chinner
2010-07-15 11:46 ` Dave Chinner
2010-07-15 11:46 ` Dave Chinner
2010-07-15 11:46 ` [PATCH 1/3] mm: add context argument to shrinker callback Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 18:09   ` Christoph Hellwig
2010-07-15 18:09     ` Christoph Hellwig
2010-07-15 18:09     ` Christoph Hellwig
2010-07-20 19:30   ` Alex Elder [this message]
2010-07-20 19:30     ` Alex Elder
2010-07-20 19:30     ` Alex Elder
2010-07-20 22:53     ` Dave Chinner
2010-07-20 22:53       ` Dave Chinner
2010-07-20 22:53       ` Dave Chinner
2010-07-15 11:46 ` [PATCH 2/3] xfs: convert inode shrinker to per-filesystem contexts Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 18:10   ` Christoph Hellwig
2010-07-15 18:10     ` Christoph Hellwig
2010-07-15 18:10     ` Christoph Hellwig
2010-07-20 19:30   ` Alex Elder
2010-07-20 19:30     ` Alex Elder
2010-07-20 19:30     ` Alex Elder
2010-07-15 11:46 ` [PATCH 3/3] xfs: track AGs with reclaimable inodes in per-ag radix tree Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 11:46   ` Dave Chinner
2010-07-15 18:12   ` Christoph Hellwig
2010-07-15 18:12     ` Christoph Hellwig
2010-07-15 18:12     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279654204.1859.232.camel@doink \
    --to=aelder@sgi.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.