linux-stable/fs/qnx4
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
..
bitmap.c qnx4fs: use memweight() 2012-07-30 17:25:16 -07:00
dir.c [readdir] convert qnx4 2013-06-29 12:56:38 +04:00
inode.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
Kconfig qnx4: remove write support 2009-09-23 07:39:30 -07:00
Makefile qnx4: remove write support 2009-09-23 07:39:30 -07:00
namei.c qnx4: i_sb is never NULL 2013-11-09 00:16:32 -05:00
qnx4.h qnx4: clean qnx4_fill_super() up 2014-01-25 03:13:03 -05:00
README

  This is a snapshot of the QNX4 filesystem for Linux.
  Please send diffs and remarks to <al@alarsen.net> .
  
Credits :

Richard "Scuba" A. Frowijn     <scuba@wxs.nl>
Frank "Jedi/Sector One" Denis  <j@pureftpd.org>
Anders Larsen                  <al@alarsen.net> (Maintainer)