mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [to-be-updated] mm-dont-setpageworkingset-unconditionally-during-swapin.patch removed from -mm tree
@ 2020-12-23 22:21 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-23 22:21 UTC (permalink / raw)
  To: mm-commits, vbabka, mhocko, iamjoonsoo.kim, hannes, yuzhao


The patch titled
     Subject: mm/swap: don't SetPageWorkingset unconditionally during swapin
has been removed from the -mm tree.  Its filename was
     mm-dont-setpageworkingset-unconditionally-during-swapin.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Yu Zhao <yuzhao@google.com>
Subject: mm/swap: don't SetPageWorkingset unconditionally during swapin

We are capable of SetPageWorkingset based on refault distances after
commit aae466b0052e ("mm/swap: implement workingset detection for
anonymous LRU") This is done by workingset_refault(), which is right above
the unconditional SetPageWorkingset deleted by this patch.

The unconditional SetPageWorkingset miscategorizes pages that are read
ahead or never belonged to the working set (e.g., tmpfs pages accessed by
fd).  When those pages are swapped in (after they were swapped out) for
the first time, they skew PSI (when using async swap).  When this happens
again, depending on their refault distances, they might skew
workingset_restore_anon counter in addition to PSI because their shadows
say they were part of the working set.

Link: https://lkml.kernel.org/r/20201209012400.1771150-1-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/swap_state.c |    1 -
 1 file changed, 1 deletion(-)

--- a/mm/swap_state.c~mm-dont-setpageworkingset-unconditionally-during-swapin
+++ a/mm/swap_state.c
@@ -537,7 +537,6 @@ struct page *__read_swap_cache_async(swp
 		workingset_refault(page, shadow);
 
 	/* Caller will initiate read into locked page */
-	SetPageWorkingset(page);
 	lru_cache_add(page);
 	*new_page_allocated = true;
 	return page;
_

Patches currently in -mm which might be from yuzhao@google.com are

mm-swap-dont-setpageworkingset-unconditionally-during-swapin.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-23 22:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 22:21 [to-be-updated] mm-dont-setpageworkingset-unconditionally-during-swapin.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).