linux/arch/powerpc/platforms
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
..
8xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
40x powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
44x powerpc/44x/Akebono: Remove select of IBM_EMAC_RGMII_WOL 2014-12-29 15:45:44 +11:00
52xx powerpc: Introduce the use of the managed version of kzalloc 2015-10-22 16:13:23 +02:00
82xx mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
83xx powerpc: don't use module_init in non-modular 83xx suspend code 2015-06-16 14:12:29 -04:00
85xx Merge branch 'clock' into HEAD 2015-10-27 18:14:16 -05:00
86xx Merge branch 'clock' into HEAD 2015-10-27 18:14:16 -05:00
512x powerpc/512x: add LocalPlus Bus FIFO device driver 2015-10-22 15:19:40 +02:00
amigaone lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig 2014-08-08 15:57:26 -07:00
cell kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
chrp genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
embedded6xx genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
maple powerpc: Kconfig: remove BE-only platforms from LE kernel build 2015-09-29 22:57:00 +10:00
pasemi mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
powermac powerpc: Kconfig: remove BE-only platforms from LE kernel build 2015-09-29 22:57:00 +10:00
powernv powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion" 2015-12-18 22:24:15 +11:00
ps3 powerpc updates for 4.4 2015-11-05 23:38:43 -08:00
pseries PCI changes for the v4.4 merge window: 2015-11-06 11:29:53 -08:00
fsl_uli1575.c of/irq: Refactor interrupt-map parsing 2013-10-24 11:43:04 +01:00
Kconfig powerpc: Remove the celleb support 2015-04-07 17:15:13 +10:00
Kconfig.cputype powerpc/cell: Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU 2015-10-19 19:51:18 +11:00
Makefile powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00