linux/drivers/staging
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
..
android Staging patches for 4.5-rc1 2016-01-13 10:13:36 -08:00
board
clocking-wizard
comedi STAGING: COMEDI: Using kernel types in plx9080.h 2015-12-21 16:02:21 -08:00
dgap
dgnc staging: dgnc: dgnc_cls.c: Replaced udelay by usleep_range 2015-12-21 15:52:34 -08:00
emxx_udc staging: emxx_udc: use list_first_entry_or_null() 2015-12-21 18:32:52 -08:00
fbtft
fsl-mc
fwserial Staging: fwserial: Declare fwtty_port_put as static 2015-11-15 20:02:47 -08:00
gdm72xx staging: gdm72xx: add userspace data struct 2015-12-26 17:13:33 -08:00
gdm724x staging: gdm724x: constify tty_port_operations structs 2015-12-26 17:13:33 -08:00
goldfish
gs_fpgaboot
iio Third set of new stuff for IIO in the 4.5 cycle. 2015-12-26 17:05:25 -08:00
lustre kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
media media updates for v4.5-rc1 2016-01-13 11:46:37 -08:00
most staging: most: Delete an unnecessary check before the function call "module_put" 2015-11-15 20:02:47 -08:00
mt29f_spinand staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
netlogic staging: netlogic: Fix build error due to missed API change 2016-01-10 22:06:58 -05:00
nvec
octeon Staging patches for 4.5-rc1 2016-01-13 10:13:36 -08:00
octeon-usb
olpc_dcon
panel
rdma staging/rdma/hfi1: Fix module parameter spelling 2015-12-21 14:01:14 -08:00
rtl8188eu staging: rtl8188eu: goto removed 2015-11-15 20:02:47 -08:00
rtl8192e
rtl8192u
rtl8712
rtl8723au
rts5208
skein
slicoss
sm750fb
speakup
ste_rmi4
unisys staging: unisys: better config switch comments 2015-11-25 08:42:14 -08:00
vme drivers: staging: vme: Deleted casting to (void *) 2015-11-24 15:30:50 -08:00
vt6655
vt6656 staging: vt6656: remove address from GPL text 2015-11-19 16:53:09 -08:00
wilc1000 staging: wilc1000: bug fix on memory free 2015-12-21 13:21:09 -08:00
wlan-ng
xgifb
Kconfig
Makefile
staging.c