| To: | Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | [xfs-masters] Re: [PATCH] Cleanup and kernelify shrinker registration (rc5-mm2) |
| From: | Rusty Russell <rusty@xxxxxxxxxxxxxxx> |
| Date: | Tue, 03 Apr 2007 14:45:02 +1000 |
| Cc: | lkml - Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, linux-mm@xxxxxxxxx, xfs-masters@xxxxxxxxxxx, reiserfs-dev@xxxxxxxxxxx |
| In-reply-to: | <20070402205825.12190e52.akpm@linux-foundation.org> |
| References: | <1175571885.12230.473.camel@localhost.localdomain> <20070402205825.12190e52.akpm@linux-foundation.org> |
| Reply-to: | xfs-masters@xxxxxxxxxxx |
| Sender: | xfs-masters-bounce@xxxxxxxxxxx |
On Mon, 2007-04-02 at 20:58 -0700, Andrew Morton wrote: > On Tue, 03 Apr 2007 13:44:45 +1000 Rusty Russell <rusty@xxxxxxxxxxxxxxx> > wrote: > > > > > I can never remember what the function to register to receive VM pressure > > is called. I have to trace down from __alloc_pages() to find it. > > > > It's called "set_shrinker()", and it needs Your Help. > > > > New version: > > 1) Don't hide struct shrinker. It contains no magic. > > 2) Don't allocate "struct shrinker". It's not helpful. > > 3) Call them "register_shrinker" and "unregister_shrinker". > > 4) Call the function "shrink" not "shrinker". > > 5) Rename "nr_to_scan" argument to "nr_to_free". > > No, it is actually the number to scan. This is >= the number of freed > objects. > > This is because, for better of for worse, the VM tries to balance the > scanning rate of the various caches, not the reclaiming rate. Err, ok, I completely missed that distinction. Does that mean the to function correctly every user needs some internal cursor so it doesn't end up scanning the first N entries over and over? Rusty. |
| Previous by Date: | [xfs-masters] Re: [PATCH] Cleanup and kernelify shrinker registration (rc5-mm2), Andrew Morton |
|---|---|
| Next by Date: | [xfs-masters] Re: [PATCH] Cleanup and kernelify shrinker registration (rc5-mm2), Andrew Morton |
| Previous by Thread: | [xfs-masters] Re: [PATCH] Cleanup and kernelify shrinker registration (rc5-mm2), Andrew Morton |
| Next by Thread: | [xfs-masters] Re: [PATCH] Cleanup and kernelify shrinker registration (rc5-mm2), Andrew Morton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |