From: shenghui <crosslonelyover@gmail.com>
To: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
linux-mm@kvack.org, linux-ext4 <linux-ext4@vger.kernel.org>,
kernel-janitors <kernel-janitors@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Eric Sandeen <sandeen@redhat.com>
Subject: Re: [PATCH 1/2 RESEND] fix return value for mb_cache_shrink_fn when nr_to_scan > 0
Date: Sun, 18 Jul 2010 21:58:59 +0800 [thread overview]
Message-ID: <AANLkTilV_RalPPhHCk9D7p7AvV5WWOgCIPfc4Orn37Xo@mail.gmail.com> (raw)
In-Reply-To: <4C430830.9020903@gmail.com>
在 2010年7月18日 下午9:57,Wang Sheng-Hui <crosslonelyover@gmail.com> 写道:
> Sorry to resend this patch. For the 2nd patch should
> be applied after this patch, I just send them together.
>
> Following is the explanation of the patch:
> The comment for struct shrinker in include/linux/mm.h says
> "shrink...It should return the number of objects which remain in the
> cache."
> Please notice the word "remain".
>
> In fs/mbcache.h, mb_cache_shrink_fn is used as the shrink function:
> static struct shrinker mb_cache_shrinker = {
> .shrink = mb_cache_shrink_fn,
> .seeks = DEFAULT_SEEKS,
> };
> In mb_cache_shrink_fn, the return value for nr_to_scan > 0 is the
> number of mb_cache_entry before shrink operation. It may because the
> memory usage for mbcache is low, so the effect is not so obvious.
>
> Per Eric Sandeen, we should do the counting only once.
> Per Christoph Hellwig, we should use list_for_each_entry instead of
> list_for_each here.
>
> Following patch is against 2.6.35-rc4. Please check it.
>
>
Sorry, made a typo. It's against 2.6.35-rc5.
--
Thanks and Best Regards,
shenghui
--
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>
next prev parent reply other threads:[~2010-07-18 13:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-18 13:57 Wang Sheng-Hui
2010-07-18 13:58 ` shenghui [this message]
2010-07-19 16:27 ` Eric Sandeen
2010-07-20 16:49 ` Eric Sandeen
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=AANLkTilV_RalPPhHCk9D7p7AvV5WWOgCIPfc4Orn37Xo@mail.gmail.com \
--to=crosslonelyover@gmail.com \
--cc=hch@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sandeen@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox