diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2018-01-31 16:16:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-31 17:18:36 -0800 |
commit | 284542656e22c43fdada8c8cc0ca9ede8453eed7 (patch) | |
tree | 5f815001470c5f76ede887f9da9272772e9219ca /mm/readahead.c | |
parent | c9019e9bf42e66d028d70d2da6206cad4dd9250d (diff) | |
download | linux-284542656e22c43fdada8c8cc0ca9ede8453eed7.tar.gz linux-284542656e22c43fdada8c8cc0ca9ede8453eed7.tar.bz2 linux-284542656e22c43fdada8c8cc0ca9ede8453eed7.zip |
mm: memcontrol: implement lruvec stat functions on top of each other
The implementation of the lruvec stat functions and their variants for
accounting through a page, or accounting from a preemptible context, are
mostly identical and needlessly repetitive.
Implement the lruvec_page functions by looking up the page's lruvec and
then using the lruvec function.
Implement the functions for preemptible contexts by disabling preemption
before calling the atomic context functions.
Link: http://lkml.kernel.org/r/20171103153336.24044-2-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/readahead.c')
0 files changed, 0 insertions, 0 deletions