2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/fs/befs
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
..
befs_fs_types.h Fix common misspellings 2011-03-31 11:26:23 -03:00
befs.h fs: cleanup slight list_entry abuse 2015-06-23 18:01:59 -04:00
btree.c fs/befs/btree.c: remove unneeded initializations 2015-06-25 17:00:43 -07:00
btree.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ChangeLog Fix common misspellings 2011-03-31 11:26:23 -03:00
datastream.c befs: replace typedef befs_sb_info by structure 2015-04-17 09:04:03 -04:00
datastream.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
debug.c BEFS: logging cleanup 2014-04-03 16:21:25 -07:00
endian.h befs: don't pass huge structs by value 2011-01-13 08:03:15 -08:00
inode.c BEFS: logging cleanup 2014-04-03 16:21:25 -07:00
inode.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io.c befs: replace typedef befs_sb_info by structure 2015-04-17 09:04:03 -04:00
io.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig fs/befs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:04 -08:00
linuxvfs.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
Makefile BEFS: logging cleanup 2014-04-03 16:21:25 -07:00
super.c befs: replace typedef befs_sb_info by structure 2015-04-17 09:04:03 -04:00
super.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
TODO Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00