linux-sg2042/include
Vladimir Davydov d05e83a6f8 memcg: simplify charging kmem pages
Charging kmem pages proceeds in two steps.  First, we try to charge the
allocation size to the memcg the current task belongs to, then we allocate
a page and "commit" the charge storing the pointer to the memcg in the
page struct.

Such a design looks overcomplicated, because there is not much sense in
trying charging the allocation before actually allocating a page: we won't
be able to consume much memory over the limit even if we charge after
doing the actual allocation, besides we already charge user pages post
factum, so being pedantic with kmem pages just looks pointless.

So this patch simplifies the design by merging the "charge" and the
"commit" steps into the same function, which takes the allocated page.

Also, rename the charge and uncharge methods to memcg_kmem_charge and
memcg_kmem_uncharge and make the charge method return error code instead
of bool to conform to mem_cgroup_try_charge.

Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-05 19:34:48 -08:00
..
acpi Merge branch 'acpi-processor' 2015-11-02 00:50:37 +01:00
asm-generic Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
clocksource
crypto crypto: ahash - Add crypto_ahash_blocksize 2015-10-20 22:10:48 +08:00
drm drm/dp/mst: make mst i2c transfer code more robust. 2015-10-15 09:06:20 +10:00
dt-bindings char/misc drivers for 4.4-rc1 2015-11-04 22:15:15 -08:00
keys
kvm arm/arm64: KVM: Only allow 64bit hosts to build VGICv3 2015-10-09 23:11:57 +01:00
linux memcg: simplify charging kmem pages 2015-11-05 19:34:48 -08:00
math-emu
media media updates for v4.3-rc1 2015-09-11 16:42:39 -07:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-11-03 13:41:45 -05:00
pcmcia
ras
rdma Changes for 4.3-rc1 2015-09-19 20:04:11 -07:00
rxrpc
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-09-11 19:00:42 -07:00
soc IOMMU Updates for Linux v4.3 2015-09-08 17:22:35 -07:00
sound Merge remote-tracking branches 'asoc/fix/rt298', 'asoc/fix/sx', 'asoc/fix/wm8904' and 'asoc/fix/wm8962' into asoc-linus 2015-10-23 08:44:14 +09:00
target target: Propigate backend read-only to core_tpg_add_lun 2015-09-24 23:17:21 -07:00
trace mm, compaction: distinguish contended status in tracepoints 2015-11-05 19:34:48 -08:00
uapi char/misc drivers for 4.4-rc1 2015-11-04 22:15:15 -08:00
video libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
xen xen/grant-table: Add an helper to iterate over a specific number of grants 2015-10-23 14:20:46 +01:00
Kbuild