From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: linux-mm@kvack.org, kvm list <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>
Subject: mm/gup/writeback: add callbacks for inaccessible pages: fixup for linux-next
Date: Wed, 26 Feb 2020 12:12:27 +0100 [thread overview]
Message-ID: <1da2ebcf-59bd-65a1-222a-26af953ac7c5@de.ibm.com> (raw)
Claudio,
the patch with the arch callbacks has a (simple) merge conflict with
the longterm pinning changes in next. Can you maybe re-do this patch
on top of linux-next and send this patch to Andrew. This actually
also means that this patch should ideally go via Andrew and not via
my tree.
Patch is here.
https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git/commit/?h=next&id=732b80e677b80813e2f862ce92448436540222a3
this is my quick attempt to fix this up
diff --cc mm/gup.c
index f589299b0d4a,354bcfbd844b..a025d28ffbfd
--- a/mm/gup.c
+++ b/mm/gup.c
@@@ -470,11 -269,18 +468,17 @@@ retry
goto retry;
}
- if (flags & FOLL_GET) {
- if (unlikely(!try_get_page(page))) {
- page = ERR_PTR(-ENOMEM);
- goto out;
- }
- ret = arch_make_page_accessible(page);
- if (ret) {
- put_page(page);
- page = ERR_PTR(ret);
- goto out;
- }
+ /* try_grab_page() does nothing unless FOLL_GET or FOLL_PIN is set. */
+ if (unlikely(!try_grab_page(page, flags))) {
+ page = ERR_PTR(-ENOMEM);
+ goto out;
+ }
++ ret = arch_make_page_accessible(page);
++ if (ret) {
++ put_page(page);
++ page = ERR_PTR(ret);
++ goto out;
+ }
if (flags & FOLL_TOUCH) {
if ((flags & FOLL_WRITE) &&
!pte_dirty(pte) && !PageDirty(page))
reply other threads:[~2020-02-26 11:12 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=1da2ebcf-59bd-65a1-222a-26af953ac7c5@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox