linux/fs/ocfs2
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
..
cluster ocfs2: o2hb: increase unsteady iterations 2016-01-14 16:00:49 -08:00
dlm ocfs2/dlm: cleanup redunant lksb flags in dlmcommon.h 2016-01-14 16:00:49 -08:00
dlmfs kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
Kconfig
Makefile
acl.c ocfs2: take inode lock in ocfs2_iop_set/get_acl() 2015-09-04 16:54:41 -07:00
acl.h
alloc.c ocfs2: clean up redundant NULL check before iput 2016-01-14 16:00:49 -08:00
alloc.h ocfs2: constify ocfs2_extent_tree_operations structures 2016-01-14 16:00:49 -08:00
aops.c ocfs2: fill in the unused portion of the block with zeros by dio_zero_block() 2015-11-05 19:34:48 -08:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c ocfs2: clear the rest of the buffers on error 2015-09-04 16:54:41 -07:00
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: neaten do_error, ocfs2_error and ocfs2_abort 2015-09-04 16:54:41 -07:00
dir.h
dlmglue.c ocfs2: do not lock/unlock() inode DLM lock 2016-01-14 16:00:49 -08:00
dlmglue.h
export.c
export.h
extent_map.c ocfs2: neaten do_error, ocfs2_error and ocfs2_abort 2015-09-04 16:54:41 -07:00
extent_map.h
file.c ocfs2: return non-zero st_blocks for inline data 2016-01-14 16:00:49 -08:00
file.h
heartbeat.c
heartbeat.h
inode.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
inode.h ocfs2: only take lock if dio entry when recover orphans 2015-11-05 19:34:48 -08:00
ioctl.c ocfs2: clean up redundant NULL check before iput 2016-01-14 16:00:49 -08:00
ioctl.h
journal.c ocfs2: clean up redundant NULL check before iput 2016-01-14 16:00:49 -08:00
journal.h
localalloc.c ocfs2: clean up redundant NULL check before iput 2016-01-14 16:00:49 -08:00
localalloc.h
locks.c ocfs2: fix flock panic issue 2015-12-29 17:45:49 -08:00
locks.h
mmap.c
mmap.h
move_extents.c ocfs2: neaten do_error, ocfs2_error and ocfs2_abort 2015-09-04 16:54:41 -07:00
move_extents.h
namei.c ocfs2: access orphan dinode before delete entry in ocfs2_orphan_del 2016-01-14 16:00:49 -08:00
namei.h ocfs2: do not include dio entry in case of orphan scan 2015-11-05 19:34:48 -08:00
ocfs1_fs_compat.h
ocfs2.h ocfs2: add errors=continue 2015-09-04 16:54:41 -07:00
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
quota.h
quota_global.c
quota_local.c ocfs2: neaten do_error, ocfs2_error and ocfs2_abort 2015-09-04 16:54:41 -07:00
refcounttree.c ocfs2: clean up unused variable in ocfs2_duplicate_clusters_by_page() 2015-11-05 19:34:48 -08:00
refcounttree.h
reservations.c
reservations.h
resize.c ocfs2: fix BUG when calculate new backup super 2015-12-29 17:45:49 -08:00
resize.h
slot_map.c ocfs2: fix slot overwritten if storage link down during mount 2016-01-14 16:00:49 -08:00
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c
stackglue.h
suballoc.c ocfs2: improve performance for localalloc 2015-11-05 19:34:48 -08:00
suballoc.h
super.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
super.h ocfs2: neaten do_error, ocfs2_error and ocfs2_abort 2015-09-04 16:54:41 -07:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: Replace list xattr handler operations 2015-12-13 19:46:00 -05:00
xattr.h