linux/fs
Paul Jackson 4b6a9316fa [PATCH] cpuset memory spread: slab cache filesystems
Mark file system inode and similar slab caches subject to SLAB_MEM_SPREAD
memory spreading.

If a slab cache is marked SLAB_MEM_SPREAD, then anytime that a task that's
in a cpuset with the 'memory_spread_slab' option enabled goes to allocate
from such a slab cache, the allocations are spread evenly over all the
memory nodes (task->mems_allowed) allowed to that task, instead of favoring
allocation on the node local to the current cpu.

The following inode and similar caches are marked SLAB_MEM_SPREAD:

    file                               cache
    ====                               =====
    fs/adfs/super.c                    adfs_inode_cache
    fs/affs/super.c                    affs_inode_cache
    fs/befs/linuxvfs.c                 befs_inode_cache
    fs/bfs/inode.c                     bfs_inode_cache
    fs/block_dev.c                     bdev_cache
    fs/cifs/cifsfs.c                   cifs_inode_cache
    fs/coda/inode.c                    coda_inode_cache
    fs/dquot.c                         dquot
    fs/efs/super.c                     efs_inode_cache
    fs/ext2/super.c                    ext2_inode_cache
    fs/ext2/xattr.c (fs/mbcache.c)     ext2_xattr
    fs/ext3/super.c                    ext3_inode_cache
    fs/ext3/xattr.c (fs/mbcache.c)     ext3_xattr
    fs/fat/cache.c                     fat_cache
    fs/fat/inode.c                     fat_inode_cache
    fs/freevxfs/vxfs_super.c           vxfs_inode
    fs/hpfs/super.c                    hpfs_inode_cache
    fs/isofs/inode.c                   isofs_inode_cache
    fs/jffs/inode-v23.c                jffs_fm
    fs/jffs2/super.c                   jffs2_i
    fs/jfs/super.c                     jfs_ip
    fs/minix/inode.c                   minix_inode_cache
    fs/ncpfs/inode.c                   ncp_inode_cache
    fs/nfs/direct.c                    nfs_direct_cache
    fs/nfs/inode.c                     nfs_inode_cache
    fs/ntfs/super.c                    ntfs_big_inode_cache_name
    fs/ntfs/super.c                    ntfs_inode_cache
    fs/ocfs2/dlm/dlmfs.c               dlmfs_inode_cache
    fs/ocfs2/super.c                   ocfs2_inode_cache
    fs/proc/inode.c                    proc_inode_cache
    fs/qnx4/inode.c                    qnx4_inode_cache
    fs/reiserfs/super.c                reiser_inode_cache
    fs/romfs/inode.c                   romfs_inode_cache
    fs/smbfs/inode.c                   smb_inode_cache
    fs/sysv/inode.c                    sysv_inode_cache
    fs/udf/super.c                     udf_inode_cache
    fs/ufs/super.c                     ufs_inode_cache
    net/socket.c                       sock_inode_cache
    net/sunrpc/rpc_pipe.c              rpc_inode_cache

The choice of which slab caches to so mark was quite simple.  I marked
those already marked SLAB_RECLAIM_ACCOUNT, except for fs/xfs, dentry_cache,
inode_cache, and buffer_head, which were marked in a previous patch.  Even
though SLAB_RECLAIM_ACCOUNT is for a different purpose, it marks the same
potentially large file system i/o related slab caches as we need for memory
spreading.

Given that the rule now becomes "wherever you would have used a
SLAB_RECLAIM_ACCOUNT slab cache flag before (usually the inode cache), use
the SLAB_MEM_SPREAD flag too", this should be easy enough to maintain.
Future file system writers will just copy one of the existing file system
slab cache setups and tend to get it right without thinking.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:23 -08:00
..
9p [PATCH] fs/9p/: possible cleanups 2006-03-24 07:33:21 -08:00
adfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
affs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
afs [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
autofs [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
autofs4 [PATCH] sem2mutex: autofs4 wq_sem 2006-03-23 07:38:13 -08:00
befs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
bfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
cifs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
coda [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
configfs [PATCH] BUG_ON() Conversion in fs/configfs/ 2006-02-03 14:03:09 -08:00
cramfs [PATCH] cramfs mounts provide corrupted content since 2.6.15 2006-03-06 18:40:43 -08:00
debugfs [PATCH] debugfs: Add debugfs_create_blob() helper for exporting binary data 2006-03-20 13:42:59 -08:00
devfs [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
devpts [PATCH] devpts: use lib/parser.c for parsing mount options 2006-03-23 07:38:17 -08:00
efs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
exportfs [PATCH] exportfs: add find_acceptable_alias helper 2006-01-18 19:20:28 -08:00
ext2 [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
ext3 [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
fat [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
freevxfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
fuse [PATCH] fuse: fix bug in negative lookup 2006-02-28 20:53:43 -08:00
hfs [PATCH] hfs: cleanup HFS prints 2006-01-18 19:20:23 -08:00
hfsplus [PATCH] hfs: set type/creator for symlinks 2006-01-18 19:20:23 -08:00
hostfs [PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows 2005-12-29 09:48:15 -08:00
hpfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
hppfs [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
hugetlbfs [PATCH] convert hugetlbfs_counter to atomic 2006-03-22 07:54:04 -08:00
isofs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
jbd [PATCH] sem2mutex: jbd, j_checkpoint_mutex 2006-03-23 07:38:12 -08:00
jffs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
jffs2 [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
jfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
lockd [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
minix [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
msdos [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
ncpfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
nfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
nfs_common [PATCH] nfsacl: Solaris VxFS compatibility fix 2005-10-11 09:46:54 -07:00
nfsd [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
nls [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
ntfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
ocfs2 [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
openpromfs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
partitions [PATCH] s390: Remove old history/whitespave from partition code 2006-03-24 07:33:17 -08:00
proc [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
qnx4 [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
ramfs [PATCH] fs/*/file.c: drop insane header dependencies 2006-03-23 07:38:17 -08:00
reiserfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
romfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
smbfs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
sysfs [PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error path 2006-03-20 13:42:59 -08:00
sysv [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
udf [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
ufs [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
vfat [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
xfs [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
aio.c [PATCH] rcu file: use atomic primitives 2006-01-08 20:13:48 -08:00
attr.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
bad_inode.c
binfmt_aout.c [PATCH] dump_thread() cleanup 2006-01-10 08:01:25 -08:00
binfmt_elf_fdpic.c [PATCH] fs/binfmt_elf: Remove unneeded kmalloc() return value casts 2006-01-10 08:02:01 -08:00
binfmt_elf.c [PATCH] x86_64: Check for bad elf entry address. 2006-02-26 09:53:30 -08:00
binfmt_em86.c
binfmt_flat.c [PATCH] uclinux: delay binfmt_flat trace 2006-01-10 09:31:27 -08:00
binfmt_misc.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
binfmt_script.c
binfmt_som.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
bio.c [PATCH] Block queue IO tracing support (blktrace) as of 2006-03-23 2006-03-23 20:00:26 +01:00
block_dev.c [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
buffer.c [PATCH] sem2mutex: blockdev #2 2006-03-23 07:38:11 -08:00
char_dev.c [PATCH] kobj_map semaphore to mutex conversion 2006-03-20 13:42:58 -08:00
compat_ioctl.c [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
compat.c [PATCH] select: time comparison fixes 2006-02-17 13:59:28 -08:00
dcache.c [PATCH] fix file counting 2006-03-08 14:14:01 -08:00
dcookies.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
direct-io.c Fix a direct I/O locking issue revealed by the new mutex code. 2006-03-15 15:14:45 +11:00
dnotify.c
dquot.c [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
drop_caches.c [PATCH] drop-pagecache 2006-01-08 20:12:40 -08:00
eventpoll.c [PATCH] get_empty_filp tweaks, inline epoll_init_file() 2006-03-23 07:38:17 -08:00
exec.c [PATCH] Add mm->task_size and fix powerpc vdso 2006-02-28 20:53:44 -08:00
fcntl.c [PATCH] Shrinks sizeof(files_struct) and better layout 2006-03-23 07:38:09 -08:00
fifo.c Simplify fifo_open() locking logic 2006-03-07 09:16:35 -08:00
file_table.c [PATCH] get_empty_filp tweaks, inline epoll_init_file() 2006-03-23 07:38:17 -08:00
file.c [PATCH] Shrinks sizeof(files_struct) and better layout 2006-03-23 07:38:09 -08:00
filesystems.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
fs-writeback.c [PATCH] kernel-docs: fix kernel-doc format problems 2005-11-07 07:53:55 -08:00
inode.c [PATCH] sem2mutex: iprune 2006-03-23 07:38:12 -08:00
inotify.c [PATCH] sem2mutex: iprune 2006-03-23 07:38:12 -08:00
ioctl.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
ioprio.c [PATCH] capable/capability.h (fs/) 2006-01-11 18:42:13 -08:00
Kconfig [PATCH] relay: migrate from relayfs to a generic relay API 2006-03-23 19:56:55 +01:00
Kconfig.binfmt [PATCH] frv: suppress configuration of certain features for FRV 2006-01-08 20:13:36 -08:00
libfs.c [PATCH] sem2mutex: fs/libfs.c 2006-03-23 07:38:12 -08:00
locks.c [PATCH] tiny: Uninline some fslocks.c functions 2006-01-08 20:14:10 -08:00
Makefile [PATCH] relay: migrate from relayfs to a generic relay API 2006-03-23 19:56:55 +01:00
mbcache.c [PATCH] cpuset memory spread: slab cache filesystems 2006-03-24 07:33:23 -08:00
mpage.c [PATCH] fix possible PAGE_CACHE_SHIFT overflows 2006-01-08 20:13:54 -08:00
namei.c [PATCH] sem2mutex: vfs_rename_mutex 2006-03-23 07:38:12 -08:00
namespace.c [PATCH] fs/namespace.c:dup_namespace(): fix a use after free 2006-03-15 09:37:34 -08:00
nfsctl.c [PATCH] fs: Use ARRAY_SIZE macro 2006-03-24 07:33:19 -08:00
open.c [PATCH] Shrinks sizeof(files_struct) and better layout 2006-03-23 07:38:09 -08:00
pipe.c Mark the pipe file operations static 2006-03-08 14:03:09 -08:00
pnode.c [PATCH] shared mounts: cleanup 2006-01-08 20:13:56 -08:00
pnode.h [PATCH] unbindable mounts 2005-11-07 18:18:11 -08:00
posix_acl.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
quota_v1.c
quota_v2.c [PATCH] sem2mutex: quota 2006-03-23 07:38:11 -08:00
quota.c [PATCH] sem2mutex: quota 2006-03-23 07:38:11 -08:00
read_write.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
readdir.c [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem 2006-01-09 15:59:24 -08:00
select.c [PATCH] select: time comparison fixes 2006-02-17 13:59:28 -08:00
seq_file.c [PATCH] sem2mutex: fs/seq_file.c 2006-03-23 07:38:12 -08:00
stat.c [PATCH] fstatat64 support 2006-02-11 21:41:10 -08:00
super.c [PATCH] vfs: MS_VERBOSE should be MS_SILENT 2006-03-24 07:33:15 -08:00
xattr_acl.c
xattr.c [PATCH] move xattr permission checks into the VFS 2006-01-10 08:01:29 -08:00