Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1508964
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls |
| Date | 2016-10-26 11:10 +0200 |
| Message-ID | <swsnD-1Bb-19@gated-at.bofh.it> (permalink) |
| References | <swju2-3SL-19@gated-at.bofh.it> <swrrA-U4-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed 26-10-16 08:59:52, Lorenzo Stoakes wrote:
> On Wed, Oct 26, 2016 at 12:36:09AM +0100, Lorenzo Stoakes wrote:
> > In hva_to_pfn_slow() we are able to replace __get_user_pages_unlocked() with
> > get_user_pages_unlocked() since we can now pass gup_flags.
> >
> > In async_pf_execute() we need to pass different tsk, mm arguments so
> > get_user_pages_remote() is the sane replacement here (having added manual
> > acquisition and release of mmap_sem.)
> >
> > Since we pass a NULL pages parameter the subsequent call to
> > __get_user_pages_locked() will have previously bailed any attempt at
> > VM_FAULT_RETRY, so we do not change this behaviour by using
> > get_user_pages_remote() which does not invoke VM_FAULT_RETRY logic at all.
> >
> > Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
>
> Note that the use of get_user_pages_remote() in async_pf_execute() reintroduces
> the use of the FOLL_TOUCH flag - I don't think this is a problem as this flag
> was dropped by 1e987790 ("mm/gup: Introduce get_user_pages_remote()") which
> states 'Without protection keys, this patch should not change any behavior', so
> I don't think this was intentional.
Yes, I have already mentioned this in one of my previous emails. This
indeed doesn't seem to be intentional
--
Michal Hocko
SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 01:40 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 01:50 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:20 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 11:40 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 12:00 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 10:10 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:10 +0200
Re: [PATCH] mm: remove unnecessary __get_user_pages_unlocked() calls Michal Hocko <mhocko@kernel.org> - 2016-10-26 11:20 +0200
[PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 11:30 +0200
Re: [PATCH v2] mm: remove unnecessary __get_user_pages_unlocked() calls Andrew Morton <akpm@linux-foundation.org> - 2016-10-27 02:20 +0200
csiph-web