From: Lorenzo Stoakes <lstoakes@gmail.com>
To: linux-mm@kvack.org
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Michal Hocko" <mhocko@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Hugh Dickins" <hughd@google.com>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Rik van Riel" <riel@redhat.com>,
"Mel Gorman" <mgorman@techsingularity.net>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls
Date: Wed, 26 Oct 2016 00:46:31 +0100 [thread overview]
Message-ID: <20161025234631.GA5946@lucifer> (raw)
In-Reply-To: <20161025233609.5601-1-lstoakes@gmail.com>
The holdout for unexporting __get_user_pages_unlocked() is its invocation in
mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely _does_
seem to invoke VM_FAULT_RETRY behaviour which get_user_pages_remote() will not
trigger if we were to replace it with the latter.
I'm not sure how to proceed in this case - get_user_pages_remote() invocations
assume mmap_sem is held so can't offer VM_FAULT_RETRY behaviour as the lock
can't be assumed to be safe to release, and get_user_pages_unlocked() assumes
tsk, mm are set to current, current->mm respectively so we can't use that here
either.
Is it important to retain VM_FAULT_RETRY behaviour here, does it matter? If it
isn't so important then we can just go ahead and replace with
get_user_pages_remote() and unexport away.
Of course the whole idea of unexporting __get_user_pages_unlocked() might be
bogus so let me know in that case also :)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Lorenzo Stoakes <lstoakes@gmail.com>
To: linux-mm@kvack.org
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Michal Hocko" <mhocko@kernel.org>, "Jan Kara" <jack@suse.cz>,
"Hugh Dickins" <hughd@google.com>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Rik van Riel" <riel@redhat.com>,
"Mel Gorman" <mgorman@techsingularity.net>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls
Date: Wed, 26 Oct 2016 00:46:31 +0100 [thread overview]
Message-ID: <20161025234631.GA5946@lucifer> (raw)
In-Reply-To: <20161025233609.5601-1-lstoakes@gmail.com>
The holdout for unexporting __get_user_pages_unlocked() is its invocation in
mm/process_vm_access.c: process_vm_rw_single_vec(), as this definitely _does_
seem to invoke VM_FAULT_RETRY behaviour which get_user_pages_remote() will not
trigger if we were to replace it with the latter.
I'm not sure how to proceed in this case - get_user_pages_remote() invocations
assume mmap_sem is held so can't offer VM_FAULT_RETRY behaviour as the lock
can't be assumed to be safe to release, and get_user_pages_unlocked() assumes
tsk, mm are set to current, current->mm respectively so we can't use that here
either.
Is it important to retain VM_FAULT_RETRY behaviour here, does it matter? If it
isn't so important then we can just go ahead and replace with
get_user_pages_remote() and unexport away.
Of course the whole idea of unexporting __get_user_pages_unlocked() might be
bogus so let me know in that case also :)
next prev parent reply other threads:[~2016-10-25 23:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 23:36 [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes
2016-10-25 23:36 ` Lorenzo Stoakes
2016-10-25 23:46 ` Lorenzo Stoakes [this message]
2016-10-25 23:46 ` Lorenzo Stoakes
2016-10-26 9:15 ` Michal Hocko
2016-10-26 9:15 ` Michal Hocko
2016-10-26 9:39 ` Lorenzo Stoakes
2016-10-26 9:39 ` Lorenzo Stoakes
2016-10-26 9:54 ` Michal Hocko
2016-10-26 9:54 ` Michal Hocko
2016-10-26 7:59 ` Lorenzo Stoakes
2016-10-26 7:59 ` Lorenzo Stoakes
2016-10-26 9:07 ` Michal Hocko
2016-10-26 9:07 ` Michal Hocko
2016-10-26 9:12 ` Michal Hocko
2016-10-26 9:12 ` Michal Hocko
2016-10-26 9:25 ` [PATCH v2] " Lorenzo Stoakes
2016-10-26 9:25 ` Lorenzo Stoakes
2016-10-27 0:12 ` Andrew Morton
2016-10-27 0:12 ` Andrew Morton
2016-10-27 7:06 ` Lorenzo Stoakes
2016-10-27 7:06 ` Lorenzo Stoakes
2016-10-27 9:27 ` Paolo Bonzini
2016-10-27 9:27 ` Paolo Bonzini
2016-10-27 9:32 ` Lorenzo Stoakes
2016-10-27 9:32 ` Lorenzo Stoakes
2016-10-27 9:35 ` Paolo Bonzini
2016-10-27 9:35 ` Paolo Bonzini
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=20161025234631.GA5946@lucifer \
--to=lstoakes@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=pbonzini@redhat.com \
--cc=riel@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=torvalds@linux-foundation.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 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.