linux/fs/udf
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
..
balloc.c udf: use int for allocated blocks instead of sector_t 2015-03-16 08:24:16 +01:00
dir.c udf: Make udf_get_filename() return error instead of 0 length file name 2015-05-18 11:23:06 +02:00
directory.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
ecma_167.h
file.c udf: remove double err declaration in udf_file_write_iter() 2015-05-18 11:23:09 +02:00
ialloc.c udf: saner calling conventions for udf_new_inode() 2014-09-04 21:37:41 +02:00
inode.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
Kconfig udf: Update Kconfig description 2015-01-05 11:04:37 +01:00
lowlevel.c udf: use linux/uaccess.h 2014-07-15 22:40:23 +02:00
Makefile switch udf to simple_fsync() 2009-06-11 21:36:13 -04:00
misc.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
namei.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
osta_udf.h
partition.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
super.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
symlink.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
truncate.c udf: remove redundant buffer_head.h includes 2015-03-14 07:54:02 +01:00
udf_i.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
udf_sb.h udf: Fortify LVID loading 2013-09-24 11:23:33 +02:00
udfdecl.h udf: don't duplicate page_symlink_inode_operations 2015-12-06 20:43:26 -05:00
udfend.h
udftime.c udf: remove redundant sys_tz declaration 2014-09-29 13:45:12 +02:00
unicode.c udf: Make udf_get_filename() return error instead of 0 length file name 2015-05-18 11:23:06 +02:00