All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: borntraeger@de.ibm.com, guro@fb.com, hannes@cmpxchg.org,
	hca@linux.ibm.com, hughd@google.com, mhocko@kernel.org,
	mm-commits@vger.kernel.org, sfr@canb.auug.org.au,
	shakeelb@google.com
Subject: [folded-merged] memcg-charge-before-adding-to-swapcache-on-swapin-fix.patch removed from -mm tree
Date: Thu, 29 Apr 2021 22:23:58 -0700	[thread overview]
Message-ID: <20210430052358.6QyRDxi-C%akpm@linux-foundation.org> (raw)


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


                 reply	other threads:[~2021-04-30  5:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210430052358.6QyRDxi-C%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hca@linux.ibm.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=shakeelb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.