kernel_optimize_test/fs/nilfs2
Vladimir Davydov 5d097056c9 kmemcg: account certain kmem allocations to memcg
Mark those kmem allocations that are known to be easily triggered from
userspace as __GFP_ACCOUNT/SLAB_ACCOUNT, which makes them accounted to
memcg.  For the list, see below:

 - threadinfo
 - task_struct
 - task_delay_info
 - pid
 - cred
 - mm_struct
 - vm_area_struct and vm_region (nommu)
 - anon_vma and anon_vma_chain
 - signal_struct
 - sighand_struct
 - fs_struct
 - files_struct
 - fdtable and fdtable->full_fds_bits
 - dentry and external_name
 - inode for all filesystems. This is the most tedious part, because
   most filesystems overwrite the alloc_inode method.

The list is far from complete, so feel free to add more objects.
Nevertheless, it should be close to "account everything" approach and
keep most workloads within bounds.  Malevolent users will be able to
breach the limit, but this was possible even with the former "account
everything" approach (simply because it did not account everything in
fact).

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Greg Thelen <gthelen@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-14 16:00:49 -08:00
..
alloc.c nilfs2: fix gcc unused-but-set-variable warnings 2015-11-06 17:50:42 -08:00
alloc.h nilfs2: free unused dat file blocks during garbage collection 2015-11-06 17:50:42 -08:00
bmap.c
bmap.h
btnode.c
btnode.h
btree.c nilfs2: fix gcc uninitialized-variable warnings in powerpc build 2015-11-06 17:50:42 -08:00
btree.h
cpfile.c
cpfile.h
dat.c nilfs2: fix gcc unused-but-set-variable warnings 2015-11-06 17:50:42 -08:00
dat.h
dir.c
direct.c
direct.h
export.h
file.c vfs: remove unused wrapper block_page_mkwrite() 2015-11-11 02:19:33 -05:00
gcinode.c
ifile.c
ifile.h
inode.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
ioctl.c ioctl_compat: handle FITRIM 2015-07-09 11:42:21 -07:00
Kconfig
Makefile
mdt.c nilfs2: add tracepoints for analyzing reading and writing metadata files 2015-11-06 17:50:42 -08:00
mdt.h mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
namei.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
nilfs.h
page.c
page.h
recovery.c nilfs2: fix gcc uninitialized-variable warnings in powerpc build 2015-11-06 17:50:42 -08:00
segbuf.c block: remove bio_get_nr_vecs() 2015-08-13 12:32:04 -06:00
segbuf.h
segment.c nilfs2: fix gcc unused-but-set-variable warnings 2015-11-06 17:50:42 -08:00
segment.h nilfs2: add a tracepoint for tracking stage transition of segment construction 2015-11-06 17:50:42 -08:00
sufile.c nilfs2: fix gcc unused-but-set-variable warnings 2015-11-06 17:50:42 -08:00
sufile.h
super.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
sysfs.c
sysfs.h
the_nilfs.c
the_nilfs.h