From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o6FI6p5o216356 for ; Thu, 15 Jul 2010 13:06:53 -0500 Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id A2BBD15C0E95 for ; Thu, 15 Jul 2010 11:16:04 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 5GVVICIUSDT0iolg for ; Thu, 15 Jul 2010 11:16:04 -0700 (PDT) Date: Thu, 15 Jul 2010 14:09:46 -0400 From: Christoph Hellwig Subject: Re: [PATCH 1/3] mm: add context argument to shrinker callback Message-ID: <20100715180946.GA14554@infradead.org> References: <1279194418-16119-1-git-send-email-david@fromorbit.com> <1279194418-16119-2-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Dave Chinner Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xfs@oss.sgi.com On Thu, Jul 15, 2010 at 09:46:56PM +1000, Dave Chinner wrote: > From: Dave Chinner > > 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 Looks good, Reviewed-by: Christoph Hellwig _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934007Ab0GOSJv (ORCPT ); Thu, 15 Jul 2010 14:09:51 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:43867 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933978Ab0GOSJt (ORCPT ); Thu, 15 Jul 2010 14:09:49 -0400 Date: Thu, 15 Jul 2010 14:09:46 -0400 From: Christoph Hellwig To: Dave Chinner 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 Message-ID: <20100715180946.GA14554@infradead.org> References: <1279194418-16119-1-git-send-email-david@fromorbit.com> <1279194418-16119-2-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2010 at 09:46:56PM +1000, Dave Chinner wrote: > From: Dave Chinner > > 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 Looks good, Reviewed-by: Christoph Hellwig From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/3] mm: add context argument to shrinker callback Date: Thu, 15 Jul 2010 14:09:46 -0400 Message-ID: <20100715180946.GA14554@infradead.org> References: <1279194418-16119-1-git-send-email-david@fromorbit.com> <1279194418-16119-2-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: Dave Chinner Return-path: Content-Disposition: inline In-Reply-To: <1279194418-16119-2-git-send-email-david@fromorbit.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Jul 15, 2010 at 09:46:56PM +1000, Dave Chinner wrote: > From: Dave Chinner > > 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 Looks good, Reviewed-by: Christoph Hellwig -- 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: email@kvack.org