linux/fs/squashfs
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
..
block.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
cache.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor_multi_percpu.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor_multi.c Squashfs: Check stream is not NULL in decompressor_multi.c 2013-11-20 03:59:20 +00:00
decompressor_single.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
decompressor.c Squashfs: Add LZ4 compression configuration option 2014-11-27 18:48:44 +00:00
decompressor.h Squashfs: Add LZ4 compression configuration option 2014-11-27 18:48:44 +00:00
dir.c Squashfs: add corruption check for type in squashfs_readdir() 2013-09-06 04:57:54 +01:00
export.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
file_cache.c Squashfs: Restructure squashfs_readpage() 2013-11-20 03:59:07 +00:00
file_direct.c fs/squashfs/file_direct.c: replace count*size kmalloc by kmalloc_array 2014-08-06 18:01:13 -07:00
file.c Squashfs: Restructure squashfs_readpage() 2013-11-20 03:59:07 +00:00
fragment.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
id.c Squashfs: Fix sanity check patches on big-endian systems 2011-05-29 10:03:09 +01:00
inode.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
Kconfig Squashfs: Add LZ4 compression configuration option 2014-11-27 18:48:44 +00:00
lz4_wrapper.c Squashfs: add LZ4 compression support 2014-11-27 07:44:11 +00:00
lzo_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
Makefile Squashfs: Add LZ4 compression configuration option 2014-11-27 18:48:44 +00:00
namei.c Squashfs: fix corruption checks in squashfs_lookup() 2013-09-06 04:57:53 +01:00
page_actor.c Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
page_actor.h Squashfs: Directly decompress into the page cache for file data 2013-11-20 03:59:13 +00:00
squashfs_fs_i.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
squashfs_fs_sb.h Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
squashfs_fs.h Squashfs: add LZ4 compression support 2014-11-27 07:44:11 +00:00
squashfs.h fs/squashfs/squashfs.h: replace pr_warning by pr_warn 2014-06-04 16:53:52 -07:00
super.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
xattr_id.c Squashfs: update email address 2011-05-26 10:49:11 +01:00
xattr.c xattr handlers: Simplify list operation 2015-12-13 19:46:12 -05:00
xattr.h Squashfs: update email address 2011-05-26 10:49:11 +01:00
xz_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00
zlib_wrapper.c Squashfs: Generalise paging handling in the decompressors 2013-11-20 03:59:01 +00:00