1
0
Fork 0
alistair23-linux/include
Vladimir Davydov 52383431b3 mm: get rid of __GFP_KMEMCG
Currently to allocate a page that should be charged to kmemcg (e.g.
threadinfo), we pass __GFP_KMEMCG flag to the page allocator.  The page
allocated is then to be freed by free_memcg_kmem_pages.  Apart from
looking asymmetrical, this also requires intrusion to the general
allocation path.  So let's introduce separate functions that will
alloc/free pages charged to kmemcg.

The new functions are called alloc_kmem_pages and free_kmem_pages.  They
should be used when the caller actually would like to use kmalloc, but
has to fall back to the page allocator for the allocation is large.
They only differ from alloc_pages and free_pages in that besides
allocating or freeing pages they also charge them to the kmem resource
counter of the current memory cgroup.

[sfr@canb.auug.org.au: export kmalloc_order() to modules]
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Greg Thelen <gthelen@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Glauber Costa <glommer@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-04 16:53:56 -07:00
..
acpi Merge branch 'acpi-video' 2014-06-03 23:12:37 +02:00
asm-generic x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels 2014-06-04 16:53:55 -07:00
clocksource
crypto crypto: export NULL algorithms defines 2014-03-21 21:54:26 +08:00
drm Merge branch 'mullins' of git://people.freedesktop.org/~deathsimple/linux into drm-fixes 2014-05-07 09:10:28 +10:00
dt-bindings ARM: SoC devicetree updates for 3.16 2014-06-02 16:34:00 -07:00
keys
kvm
linux mm: get rid of __GFP_KMEMCG 2014-06-04 16:53:56 -07:00
math-emu
media [media] rc-core: remove generic scancode filter 2014-04-06 11:30:29 -03:00
memory
misc
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial into next 2014-06-04 08:50:34 -07:00
pcmcia
ras
rdma Merge branches 'core', 'cxgb4', 'ip-roce', 'iser', 'misc', 'mlx4', 'nes', 'ocrdma', 'qib', 'sgwrapper', 'srp' and 'usnic' into for-next 2014-04-03 08:30:17 -07:00
rxrpc
scsi scsi: Make sure cmd_flags are 64-bit 2014-04-09 20:26:20 -06:00
sound ASoC: Final updates for v3.16 2014-06-03 11:51:14 +02:00
target target/sbc: Add sbc_dif_read_strip software emulation 2014-04-07 01:48:57 -07:00
trace mm: get rid of __GFP_KMEMCG 2014-06-04 16:53:56 -07:00
uapi sound updates for 3.16-rc1 2014-06-04 09:08:25 -07:00
video OMAPDSS: Add DSS features for AM43xx 2014-05-09 15:11:26 +03:00
xen Merge branch 'for-3.16/drivers' of git://git.kernel.dk/linux-block into next 2014-06-02 13:57:01 -07:00
Kbuild