summaryrefslogtreecommitdiffstats
path: root/Documentation/riscv
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2020-04-02 06:06:53 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 18:35:28 +0200
commit9c315e4d7d8c3bddad3893777bbab4164b298818 (patch)
tree117f85eec908dc074f9e463be4f54d0ee7823237 /Documentation/riscv
parentmm: kmem: switch to nr_pages in (__)memcg_kmem_charge_memcg() (diff)
downloadlinux-9c315e4d7d8c3bddad3893777bbab4164b298818.tar.xz
linux-9c315e4d7d8c3bddad3893777bbab4164b298818.zip
mm: memcg/slab: cache page number in memcg_(un)charge_slab()
There are many places in memcg_charge_slab() and memcg_uncharge_slab() which are calculating the number of pages to charge, css references to grab etc depending on the order of the slab page. Let's simplify the code by calculating it once and caching in the local variable. Signed-off-by: Roman Gushchin <guro@fb.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Shakeel Butt <shakeelb@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Link: http://lkml.kernel.org/r/20200109202659.752357-6-guro@fb.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/riscv')
0 files changed, 0 insertions, 0 deletions