Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1508961
| From | Lorenzo Stoakes <lstoakes@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags |
| Date | 2016-10-26 11:00 +0200 |
| Message-ID | <swsdY-1ge-49@gated-at.bofh.it> (permalink) |
| References | <srC4h-3JZ-3@gated-at.bofh.it> <stEEF-3BE-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 18, 2016 at 05:30:50PM +0200, Michal Hocko wrote:
>I am wondering whether we can go further. E.g. it is not really clear to
>me whether we need an explicit FOLL_REMOTE when we can in fact check
>mm != current->mm and imply that. Maybe there are some contexts which
>wouldn't work, I haven't checked.
>
>Then I am also wondering about FOLL_TOUCH behavior.
>__get_user_pages_unlocked has only few callers which used to be
>get_user_pages_unlocked before 1e9877902dc7e ("mm/gup: Introduce
>get_user_pages_remote()"). To me a dropped FOLL_TOUCH seems
>unintentional. Now that get_user_pages_unlocked has gup_flags argument I
>guess we might want to get rid of the __g-u-p-u version altogether, no?
>
>__get_user_pages is quite low level and imho shouldn't be exported. It's
>only user - kvm - should rather pull those two functions to gup instead
>and export them. There is nothing really KVM specific in them.
I believe I've attacked each of these, other than the use of explicit
FOLL_REMOTE which was explained by Dave.
> I also cannot say I would be entirely thrilled about get_user_pages_locked,
> we only have one user which can simply do lock g-u-p unlock AFAICS.
The principle difference here seems to be the availability of VM_FAULT_RETRY
behaviour (by passing a non-NULL locked argument), and indeed the comments in
gup.c recommends using get_user_pages_locked() if possible (though it seems not
to have been heeded too much :), so I'm not sure if this would be a fruitful
refactor, let me know!
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Michal Hocko <mhocko@kernel.org> - 2016-10-18 17:40 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Michal Hocko <mhocko@kernel.org> - 2016-10-19 16:20 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Dave Hansen <dave.hansen@linux.intel.com> - 2016-10-19 19:00 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Michal Hocko <mhocko@kernel.org> - 2016-10-19 19:10 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Dave Hansen <dave.hansen@linux.intel.com> - 2016-10-19 19:30 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Michal Hocko <mhocko@kernel.org> - 2016-10-20 21:30 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-19 18:20 +0200
Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags Lorenzo Stoakes <lstoakes@gmail.com> - 2016-10-26 11:00 +0200
csiph-web