On Tue, 03 Apr 2007 13:44:45 +1000 Rusty Russell <[EMAIL PROTECTED]> 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.

> 6) Reduce the 17 lines of waffly comments to 10, and document the -1 return.
> 
> Comments:
> 1) The comment in reiserfs4 makes me a little queasy.

I'm going to have to split this patch up into mainline-bit and reiser4-bit.

And that's OK (it's a regular occurrence).  But never miss a chance to whine.

> 2) The wrapper code in xfs might no longer be needed.
> 3) The placing in the x86-64 "hot function list" for seems a little
>    unlikely.  Clearly, Andi was testing if anyone was paying attention.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to