* [nacked] mm-workingset-ignore-slab-memory-size-when-calculating-shadows-pressure.patch removed from -mm tree
@ 2020-09-12 19:29 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-09-12 19:29 UTC (permalink / raw)
To: mm-commits, shakeelb, mhocko, hannes, guro
The patch titled
Subject: mm: workingset: ignore slab memory size when calculating shadows pressure
has been removed from the -mm tree. Its filename was
mm-workingset-ignore-slab-memory-size-when-calculating-shadows-pressure.patch
This patch was dropped because it was nacked
------------------------------------------------------
From: Roman Gushchin <guro@fb.com>
Subject: mm: workingset: ignore slab memory size when calculating shadows pressure
In the memcg case count_shadow_nodes() sums the number of pages in lru
lists and the amount of slab memory (reclaimable and non-reclaimable) as a
baseline for the allowed number of shadow entries.
It seems to be a good analogy for the !memcg case, where
node_present_pages() is used. However, it's not quite true, as there two
problems:
1) Due to slab reparenting introduced by commit fb2f2b0adb98 ("mm:
memcg/slab: reparent memcg kmem_caches on cgroup removal") local
per-lruvec slab counters might be inaccurate on non-leaf levels. It's
the only place where local slab counters are used.
2) Shadow nodes by themselves are backed by slabs. So there is a loop
dependency: the more shadow entries are there, the less pressure the
kernel applies to reclaim them.
Fortunately, there is a simple way to solve both problems: slab counters
shouldn't be taken into the account by count_shadow_nodes().
Link: https://lkml.kernel.org/r/20200903230055.1245058-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/workingset.c | 4 ----
1 file changed, 4 deletions(-)
--- a/mm/workingset.c~mm-workingset-ignore-slab-memory-size-when-calculating-shadows-pressure
+++ a/mm/workingset.c
@@ -495,10 +495,6 @@ static unsigned long count_shadow_nodes(
for (pages = 0, i = 0; i < NR_LRU_LISTS; i++)
pages += lruvec_page_state_local(lruvec,
NR_LRU_BASE + i);
- pages += lruvec_page_state_local(
- lruvec, NR_SLAB_RECLAIMABLE_B) >> PAGE_SHIFT;
- pages += lruvec_page_state_local(
- lruvec, NR_SLAB_UNRECLAIMABLE_B) >> PAGE_SHIFT;
} else
#endif
pages = node_present_pages(sc->nid);
_
Patches currently in -mm which might be from guro@fb.com are
mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings.patch
mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix.patch
mm-rework-remote-memcg-charging-api-to-support-nesting.patch
mm-kmem-move-memcg_kmem_bypass-calls-to-get_mem-obj_cgroup_from_current.patch
mm-kmem-remove-redundant-checks-from-get_obj_cgroup_from_current.patch
mm-kmem-prepare-remote-memcg-charging-infra-for-interrupt-contexts.patch
mm-kmem-enable-kernel-memcg-accounting-from-interrupt-contexts.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-12 19:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 19:29 [nacked] mm-workingset-ignore-slab-memory-size-when-calculating-shadows-pressure.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).