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 o4R6X6l0116859 for ; Thu, 27 May 2010 01:33:07 -0500 Received: from mx2.suse.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id A746212A0246 for ; Wed, 26 May 2010 23:37:18 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by cuda.sgi.com with ESMTP id mAAg3qAVUKanVSX6 for ; Wed, 26 May 2010 23:37:18 -0700 (PDT) Date: Thu, 27 May 2010 16:35:23 +1000 From: Nick Piggin Subject: Re: [PATCH 3/5] superblock: introduce per-sb cache shrinker infrastructure Message-ID: <20100527063523.GJ22536@laptop> References: <1274777588-21494-1-git-send-email-david@fromorbit.com> <1274777588-21494-4-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1274777588-21494-4-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="utf-8" Content-Transfer-Encoding: base64 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 T24gVHVlLCBNYXkgMjUsIDIwMTAgYXQgMDY6NTM6MDZQTSArMTAwMCwgRGF2ZSBDaGlubmVyIHdy b3RlOgo+IC0tLSBhL2ZzL3N1cGVyLmMKPiArKysgYi9mcy9zdXBlci5jCj4gQEAgLTM3LDYgKzM3 LDUwIEBACj4gIExJU1RfSEVBRChzdXBlcl9ibG9ja3MpOwo+ICBERUZJTkVfU1BJTkxPQ0soc2Jf bG9jayk7Cj4gIAo+ICtzdGF0aWMgaW50IHBydW5lX3N1cGVyKHN0cnVjdCBzaHJpbmt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1cm4gKHVuc2lnbmVkIGxvbmcpdG1wOwp9CgpUaGVuIHRo ZSBzaHJpbmtlciBjYWxsYmFjayB3aWxsIGdvOgoJc2ItPnNfbnJfZGVudHJ5X3NjYW4gKz0gc2hy aW5rZXJfc2NhbihscnVfcGFnZXMsIGxydV9zY2FubmVkLAoJCQkJc2ItPnNfbnJfZGVudHJ5X3Vu dXNlZCwKCQkJCXZmc19jYWNoZV9wcmVzc3VyZSAqIFNFRUtTX1BFUl9ERU5UUlkpOwoJaWYgKHNi LT5zX25yX2RlbnRyeV9zY2FuID4gU0hSSU5LX0JBVENIKQoJCXBydW5lX2RjYWNoZSgpCgoJc2It PnNfbnJfaW5vZGVfc2NhbiArPSBzaHJpbmtlcl9zY2FuKGxydV9wYWdlcywgbHJ1X3NjYW5uZWQs CgkJCQlzYi0+c19ucl9pbm9kZXNfdW51c2VkLAoJCQkJdmZzX2NhY2hlX3ByZXNzdXJlICogU0VF S1NfUEVSX0lOT0RFKTsKCS4uLgoKV2hhdCBkbyB5b3UgdGhpbmsgb2YgdGhhdD8gU2VlaW5nIGFz IHdlJ3JlIGNoYW5naW5nIHRoZSBzaHJpbmtlciBBUEkKYW55d2F5LCBJJ2QgdGhpbmsgaXQgaXMg aGlnaCB0aW1lIHRvIGRvIHNvbXRoaW5nIGxpa2UgdGhpcy4KCgpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwp4ZnMgbWFpbGluZyBsaXN0Cnhmc0Bvc3Muc2dp LmNvbQpodHRwOi8vb3NzLnNnaS5jb20vbWFpbG1hbi9saXN0aW5mby94ZnMK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753401Ab0E0Gfa (ORCPT ); Thu, 27 May 2010 02:35:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38095 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136Ab0E0Gf3 (ORCPT ); Thu, 27 May 2010 02:35:29 -0400 Date: Thu, 27 May 2010 16:35:23 +1000 From: Nick Piggin To: Dave Chinner Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, xfs@oss.sgi.com Subject: Re: [PATCH 3/5] superblock: introduce per-sb cache shrinker infrastructure Message-ID: <20100527063523.GJ22536@laptop> References: <1274777588-21494-1-git-send-email-david@fromorbit.com> <1274777588-21494-4-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1274777588-21494-4-git-send-email-david@fromorbit.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2010 at 06:53:06PM +1000, Dave Chinner wrote: > --- a/fs/super.c > +++ b/fs/super.c > @@ -37,6 +37,50 @@ > LIST_HEAD(super_blocks); > DEFINE_SPINLOCK(sb_lock); > > +static int prune_super(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask) > +{ > + struct super_block *sb; > + int count; > + > + sb = container_of(shrink, struct super_block, s_shrink); > + > + /* > + * Deadlock avoidance. We may hold various FS locks, and we don't want > + * to recurse into the FS that called us in clear_inode() and friends.. > + */ > + if (!(gfp_mask & __GFP_FS)) > + return -1; > + > + /* > + * if we can't get the umount lock, then there's no point having the > + * shrinker try again because the sb is being torn down. > + */ > + if (!down_read_trylock(&sb->s_umount)) > + return -1; > + > + if (!sb->s_root) { > + up_read(&sb->s_umount); > + return -1; > + } > + > + if (nr_to_scan) { > + /* proportion the scan between the two cacheѕ */ > + int total; > + > + total = sb->s_nr_dentry_unused + sb->s_nr_inodes_unused + 1; > + count = (nr_to_scan * sb->s_nr_dentry_unused) / total; > + > + /* prune dcache first as icache is pinned by it */ > + prune_dcache_sb(sb, count); > + prune_icache_sb(sb, nr_to_scan - count); Hmm, an interesting dynamic that you've changed is that previously we'd scan dcache LRU proportionately to pagecache, and then scan inode LRU in proportion to the current number of unused inodes. But we can think of inodes that are only in use by unused (and aged) dentries as effectively unused themselves. So this sequence under estimates how many inodes to scan. This could bias pressure against dcache I'd think, especially considering inodes are far larger than dentries. Maybe require 2 passes to get the inodes unused inthe first pass. Part of the problem is the funny shrinker API. The right way to do it is to change the shrinker API so that it passes down the lru_pages and scanned into the callback. From there, the shrinkers can calculate the appropriate ratio of objects to scan. No need for 2-call scheme, no need for shrinker->seeks, and the ability to calculate an appropriate ratio first for dcache, and *then* for icache. A helper of course can do the calculation (considering that every driver and their dog will do the wrong thing if we let them :)). unsigned long shrinker_scan(unsigned long lru_pages, unsigned long lru_scanned, unsigned long nr_objects, unsigned long scan_ratio) { unsigned long long tmp = nr_objects; tmp *= lru_scanned * 100; do_div(tmp, (lru_pages * scan_ratio) + 1); return (unsigned long)tmp; } Then the shrinker callback will go: sb->s_nr_dentry_scan += shrinker_scan(lru_pages, lru_scanned, sb->s_nr_dentry_unused, vfs_cache_pressure * SEEKS_PER_DENTRY); if (sb->s_nr_dentry_scan > SHRINK_BATCH) prune_dcache() sb->s_nr_inode_scan += shrinker_scan(lru_pages, lru_scanned, sb->s_nr_inodes_unused, vfs_cache_pressure * SEEKS_PER_INODE); ... What do you think of that? Seeing as we're changing the shrinker API anyway, I'd think it is high time to do somthing like this. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH 3/5] superblock: introduce per-sb cache shrinker infrastructure Date: Thu, 27 May 2010 16:35:23 +1000 Message-ID: <20100527063523.GJ22536@laptop> References: <1274777588-21494-1-git-send-email-david@fromorbit.com> <1274777588-21494-4-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, xfs@oss.sgi.com To: Dave Chinner Return-path: Content-Disposition: inline In-Reply-To: <1274777588-21494-4-git-send-email-david@fromorbit.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Tue, May 25, 2010 at 06:53:06PM +1000, Dave Chinner wrote: > --- a/fs/super.c > +++ b/fs/super.c > @@ -37,6 +37,50 @@ > LIST_HEAD(super_blocks); > DEFINE_SPINLOCK(sb_lock); > =20 > +static int prune_super(struct shrinker *shrink, int nr_to_scan, gfp_t = gfp_mask) > +{ > + struct super_block *sb; > + int count; > + > + sb =3D container_of(shrink, struct super_block, s_shrink); > + > + /* > + * Deadlock avoidance. We may hold various FS locks, and we don't wa= nt > + * to recurse into the FS that called us in clear_inode() and friends= .. > + */ > + if (!(gfp_mask & __GFP_FS)) > + return -1; > + > + /* > + * if we can't get the umount lock, then there's no point having the > + * shrinker try again because the sb is being torn down. > + */ > + if (!down_read_trylock(&sb->s_umount)) > + return -1; > + > + if (!sb->s_root) { > + up_read(&sb->s_umount); > + return -1; > + } > + > + if (nr_to_scan) { > + /* proportion the scan between the two cache=D1=95 */ > + int total; > + > + total =3D sb->s_nr_dentry_unused + sb->s_nr_inodes_unused + 1; > + count =3D (nr_to_scan * sb->s_nr_dentry_unused) / total; > + > + /* prune dcache first as icache is pinned by it */ > + prune_dcache_sb(sb, count); > + prune_icache_sb(sb, nr_to_scan - count); Hmm, an interesting dynamic that you've changed is that previously we'd scan dcache LRU proportionately to pagecache, and then scan inode LRU in proportion to the current number of unused inodes. But we can think of inodes that are only in use by unused (and aged) dentries as effectively unused themselves. So this sequence under estimates how many inodes to scan. This could bias pressure against dcache I'd think, especially considering inodes are far larger than dentries. Maybe require 2 passes to get the inodes unused inthe first pass. Part of the problem is the funny shrinker API. The right way to do it is to change the shrinker API so that it passes down the lru_pages and scanned into the callback. From there, the shrinkers can calculate the appropriate ratio of objects to scan. No need for 2-call scheme, no need for shrinker->seeks, and the ability to calculate an appropriate ratio first for dcache, and *then* for icache. A helper of course can do the calculation (considering that every driver and their dog will do the wrong thing if we let them :)). unsigned long shrinker_scan(unsigned long lru_pages, unsigned long lru_scanned, unsigned long nr_objects, unsigned long scan_ratio) { unsigned long long tmp =3D nr_objects; tmp *=3D lru_scanned * 100; do_div(tmp, (lru_pages * scan_ratio) + 1); return (unsigned long)tmp; } Then the shrinker callback will go: sb->s_nr_dentry_scan +=3D shrinker_scan(lru_pages, lru_scanned, sb->s_nr_dentry_unused, vfs_cache_pressure * SEEKS_PER_DENTRY); if (sb->s_nr_dentry_scan > SHRINK_BATCH) prune_dcache() sb->s_nr_inode_scan +=3D shrinker_scan(lru_pages, lru_scanned, sb->s_nr_inodes_unused, vfs_cache_pressure * SEEKS_PER_INODE); ... What do you think of that? Seeing as we're changing the shrinker API anyway, I'd think it is high time to do somthing like this. -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with SMTP id DC8B56B01B6 for ; Thu, 27 May 2010 02:35:32 -0400 (EDT) Date: Thu, 27 May 2010 16:35:23 +1000 From: Nick Piggin Subject: Re: [PATCH 3/5] superblock: introduce per-sb cache shrinker infrastructure Message-ID: <20100527063523.GJ22536@laptop> References: <1274777588-21494-1-git-send-email-david@fromorbit.com> <1274777588-21494-4-git-send-email-david@fromorbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1274777588-21494-4-git-send-email-david@fromorbit.com> Sender: owner-linux-mm@kvack.org To: Dave Chinner Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, xfs@oss.sgi.com List-ID: On Tue, May 25, 2010 at 06:53:06PM +1000, Dave Chinner wrote: > --- a/fs/super.c > +++ b/fs/super.c > @@ -37,6 +37,50 @@ > LIST_HEAD(super_blocks); > DEFINE_SPINLOCK(sb_lock); > > +static int prune_super(struct shrinker *shrink, int nr_to_scan, gfp_t gfp_mask) > +{ > + struct super_block *sb; > + int count; > + > + sb = container_of(shrink, struct super_block, s_shrink); > + > + /* > + * Deadlock avoidance. We may hold various FS locks, and we don't want > + * to recurse into the FS that called us in clear_inode() and friends.. > + */ > + if (!(gfp_mask & __GFP_FS)) > + return -1; > + > + /* > + * if we can't get the umount lock, then there's no point having the > + * shrinker try again because the sb is being torn down. > + */ > + if (!down_read_trylock(&sb->s_umount)) > + return -1; > + > + if (!sb->s_root) { > + up_read(&sb->s_umount); > + return -1; > + } > + > + if (nr_to_scan) { > + /* proportion the scan between the two cacheN? */ > + int total; > + > + total = sb->s_nr_dentry_unused + sb->s_nr_inodes_unused + 1; > + count = (nr_to_scan * sb->s_nr_dentry_unused) / total; > + > + /* prune dcache first as icache is pinned by it */ > + prune_dcache_sb(sb, count); > + prune_icache_sb(sb, nr_to_scan - count); Hmm, an interesting dynamic that you've changed is that previously we'd scan dcache LRU proportionately to pagecache, and then scan inode LRU in proportion to the current number of unused inodes. But we can think of inodes that are only in use by unused (and aged) dentries as effectively unused themselves. So this sequence under estimates how many inodes to scan. This could bias pressure against dcache I'd think, especially considering inodes are far larger than dentries. Maybe require 2 passes to get the inodes unused inthe first pass. Part of the problem is the funny shrinker API. The right way to do it is to change the shrinker API so that it passes down the lru_pages and scanned into the callback. From there, the shrinkers can calculate the appropriate ratio of objects to scan. No need for 2-call scheme, no need for shrinker->seeks, and the ability to calculate an appropriate ratio first for dcache, and *then* for icache. A helper of course can do the calculation (considering that every driver and their dog will do the wrong thing if we let them :)). unsigned long shrinker_scan(unsigned long lru_pages, unsigned long lru_scanned, unsigned long nr_objects, unsigned long scan_ratio) { unsigned long long tmp = nr_objects; tmp *= lru_scanned * 100; do_div(tmp, (lru_pages * scan_ratio) + 1); return (unsigned long)tmp; } Then the shrinker callback will go: sb->s_nr_dentry_scan += shrinker_scan(lru_pages, lru_scanned, sb->s_nr_dentry_unused, vfs_cache_pressure * SEEKS_PER_DENTRY); if (sb->s_nr_dentry_scan > SHRINK_BATCH) prune_dcache() sb->s_nr_inode_scan += shrinker_scan(lru_pages, lru_scanned, sb->s_nr_inodes_unused, vfs_cache_pressure * SEEKS_PER_INODE); ... What do you think of that? Seeing as we're changing the shrinker API anyway, I'd think it is high time to do somthing like this. -- 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