diff options
| author | Johannes Weiner <[email protected]> | 2021-02-24 12:04:15 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-02-24 13:38:30 -0800 |
| commit | 6eeb104e114cb6b7391c2d69ff873403858c1f35 (patch) | |
| tree | 5ed91e4614aaff0ed676995ad2f2db9761ae361a /tools/perf/scripts/python/bin | |
| parent | a7b7e1df892457935ec4f35ef9e9aa344758dbc9 (diff) | |
fs: buffer: use raw page_memcg() on locked page
alloc_page_buffers() currently uses get_mem_cgroup_from_page() for
charging the buffers to the page owner, which does an rcu-protected
page->memcg lookup and acquires a reference. But buffer allocation has
the page lock held throughout, which pins the page to the memcg and
thereby the memcg - neither rcu nor holding an extra reference during the
allocation are necessary. Use a raw page_memcg() instead.
This was the last user of get_mem_cgroup_from_page(), delete it.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Johannes Weiner <[email protected]>
Reported-by: Muchun Song <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions