diff options
| author | Roman Gushchin <[email protected]> | 2020-04-01 21:06:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2020-04-02 09:35:28 -0700 |
| commit | 9c315e4d7d8c3bddad3893777bbab4164b298818 (patch) | |
| tree | 117f85eec908dc074f9e463be4f54d0ee7823237 /tools/perf/scripts/python/intel-pt-events.py | |
| parent | 92d0510c3585970fb26af27f7fd3ba58321523ac (diff) | |
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions