mm: clean up and kernelify shrinker registration
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. 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) Reduce the 17 lines of waffly comments to 13, but document it properly. Signed-off-by:Rusty Russell <rusty@rustcorp.com.au> Cc: David Chinner <dgc@sgi.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- fs/dcache.c 6 additions, 1 deletionfs/dcache.c
- fs/dquot.c 6 additions, 1 deletionfs/dquot.c
- fs/inode.c 6 additions, 1 deletionfs/inode.c
- fs/mbcache.c 6 additions, 3 deletionsfs/mbcache.c
- fs/nfs/super.c 6 additions, 4 deletionsfs/nfs/super.c
- fs/xfs/linux-2.6/xfs_buf.c 6 additions, 8 deletionsfs/xfs/linux-2.6/xfs_buf.c
- fs/xfs/quota/xfs_qm.c 7 additions, 3 deletionsfs/xfs/quota/xfs_qm.c
- include/linux/mm.h 21 additions, 17 deletionsinclude/linux/mm.h
- mm/vmscan.c 11 additions, 31 deletionsmm/vmscan.c
- net/sunrpc/auth.c 6 additions, 5 deletionsnet/sunrpc/auth.c
Loading
Please register or sign in to comment