summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorYosry Ahmed <yosryahmed@google.com>2024-05-06 21:13:33 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-07-03 19:30:01 -0700
commit15c0536fb57fd989e24335020a443486bac01dac (patch)
tree344c09cb5999db748f746afc3b25a7c365854d93 /init
parent5a3f572a592850e8b0a4a8668781820391a2e2e7 (diff)
mm: rmap: abstract updating per-node and per-memcg stats
A lot of intricacies go into updating the stats when adding or removing mappings: which stat index to use and which function. Abstract this away into a new static helper in rmap.c, __folio_mod_stat(). This adds an unnecessary call to folio_test_anon() in __folio_add_anon_rmap() and __folio_add_file_rmap(). However, the folio struct should already be in the cache at this point, so it shouldn't cause any noticeable overhead. No functional change intended. [hughd@google.com: fix /proc/meminfo] Link: https://lkml.kernel.org/r/49914517-dfc7-e784-fde0-0e08fafbecc2@google.com Link: https://lkml.kernel.org/r/20240506211333.346605-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Hugh Dickins <hughd@google.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions