linux/fs/jfs
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
..
acl.c posix acls: Remove duplicate xattr name definitions 2015-12-06 21:25:17 -05:00
file.c jfs: Handle error from dquot_initialize() 2015-07-23 20:59:39 +02:00
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
jfs_acl.h jfs: use generic posix ACL infrastructure 2014-01-25 23:58:22 -05:00
jfs_btree.h
jfs_debug.c
jfs_debug.h
jfs_dinode.h
jfs_discard.c jfs: Fix FITRIM argument handling 2012-10-17 09:18:38 -05:00
jfs_discard.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dmap.c fs/jfs/jfs_dmap.c: replace min/casting by min_t 2014-06-03 14:14:00 -05:00
jfs_dmap.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_dtree.c jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
jfs_dtree.h [readdir] convert jfs 2013-06-29 12:56:42 +04:00
jfs_extent.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_extent.h
jfs_filsys.h fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
jfs_imap.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_imap.h
jfs_incore.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
jfs_inode.c jfs: Handle error from dquot_initialize() 2015-07-23 20:59:39 +02:00
jfs_inode.h fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers 2011-07-20 20:47:59 -04:00
jfs_lock.h
jfs_logmgr.c jfs: microoptimize get_zeroed_page / virt_to_page 2016-01-04 10:29:28 -05:00
jfs_logmgr.h Fix common misspellings 2011-03-31 11:26:23 -03:00
jfs_metapage.c block: add a bi_error field to struct bio 2015-07-29 08:55:15 -06:00
jfs_metapage.h fs, jfs: remove slab object constructor 2015-04-15 16:35:18 -07:00
jfs_mount.c fix printk typo 'faild' 2010-08-09 11:25:17 +02:00
jfs_superblock.h jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_txnmgr.c sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule() 2014-09-19 12:35:17 +02:00
jfs_txnmgr.h
jfs_types.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
jfs_umount.c jfs: flush journal completely before releasing metadata inodes 2011-08-01 12:41:00 -05:00
jfs_unicode.c
jfs_unicode.h include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
jfs_uniupr.c
jfs_xattr.h jfs: use generic posix ACL infrastructure 2014-01-25 23:58:22 -05:00
jfs_xtree.c jfs: Update jfs_error 2013-06-05 14:47:19 -05:00
jfs_xtree.h jfs: get rid of homegrown endianness helpers 2014-12-23 17:01:24 -06:00
Kconfig
Makefile fs/jfs: TRIM support for JFS Filesystem 2012-09-17 11:58:19 -05:00
namei.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
resize.c jfs: Update jfs_error 2013-06-05 14:47:19 -05: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.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00