* [folded-merged] memcg-charge-before-adding-to-swapcache-on-swapin-fix.patch removed from -mm tree
@ 2021-04-30 5:23 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-04-30 5:23 UTC (permalink / raw)
To: borntraeger, guro, hannes, hca, hughd, mhocko, mm-commits, sfr, shakeelb
The patch titled
Subject: memcg: set page->private before calling swap_readpage
has been removed from the -mm tree. Its filename was
memcg-charge-before-adding-to-swapcache-on-swapin-fix.patch
This patch was dropped because it was folded into memcg-charge-before-adding-to-swapcache-on-swapin.patch
------------------------------------------------------
From: Shakeel Butt <shakeelb@google.com>
Subject: memcg: set page->private before calling swap_readpage
The function swap_readpage() (and other functions it call) extracts swap
entry from page->private. However for SWP_SYNCHRONOUS_IO, the kernel
skips the swapcache and thus we need to manually set the page->private
with the swap entry before calling swap_readpage().
Link: https://lkml.kernel.org/r/20210318015959.2986837-1-shakeelb@google.com
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Reported-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Heiko Carstens <hca@linux.ibm.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/mm/memory.c~memcg-charge-before-adding-to-swapcache-on-swapin-fix
+++ a/mm/memory.c
@@ -3324,7 +3324,11 @@ vm_fault_t do_swap_page(struct vm_fault
workingset_refault(page, shadow);
lru_cache_add(page);
+
+ /* To provide entry to swap_readpage() */
+ set_page_private(page, entry.val);
swap_readpage(page, true);
+ set_page_private(page, 0);
}
} else {
page = swapin_readahead(entry, GFP_HIGHUSER_MOVABLE,
_
Patches currently in -mm which might be from shakeelb@google.com are
memcg-cleanup-root-memcg-checks.patch
memcg-enable-memcg-oom-kill-for-__gfp_nofail.patch
memcg-charge-before-adding-to-swapcache-on-swapin.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-30 5:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 5:23 [folded-merged] memcg-charge-before-adding-to-swapcache-on-swapin-fix.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.