linux/fs/ntfs
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
..
aops.c NTFS: Add bmap address space operation needed for FIBMAP ioctl. 2014-10-16 12:50:52 +01:00
aops.h
attrib.c mm: non-atomically mark page accessed during page cache allocation where possible 2014-06-04 16:54:10 -07:00
attrib.h
bitmap.c
bitmap.h
collate.c
collate.h
compress.c ntfs: remove NULL value assignments 2014-06-04 16:53:52 -07:00
debug.c ntfs: remove bogus space 2014-10-09 22:25:46 -04:00
debug.h ntfs: logging clean-up 2014-04-07 16:35:49 -07:00
dir.c [readdir] convert ntfs 2013-06-29 12:56:48 +04:00
dir.h
endian.h
file.c mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
index.c
index.h
inode.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
inode.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
Kconfig
layout.h
lcnalloc.c
lcnalloc.h
logfile.c
logfile.h
Makefile NTFS: Version 2.1.32 - Update file write from aio_write to write_iter. 2015-04-11 22:24:33 -04:00
malloc.h NTFS: use kvfree() in ntfs_free() 2015-06-24 17:49:38 -07:00
mft.c
mft.h
mst.c
namei.c get rid of assorted nameidata-related debris 2015-05-15 01:10:37 -04:00
ntfs.h NTFS: Split ntfs_aops into ntfs_normal_aops and ntfs_compressed_aops 2014-10-16 12:28:03 +01:00
quota.c
quota.h
runlist.c
runlist.h
super.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
sysctl.c ntfs: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:16 -07:00
sysctl.h
time.h
types.h
unistr.c
upcase.c
usnjrnl.c
usnjrnl.h
volume.h