Re: [PATCH v2 1/6] mm/gup: Provide gup_get_pte() more generic

2020-11-26 Thread Peter Zijlstra
On Thu, Nov 26, 2020 at 12:43:00PM +, Matthew Wilcox wrote: > On Thu, Nov 26, 2020 at 01:01:15PM +0100, Peter Zijlstra wrote: > > +#ifdef CONFIG_GUP_GET_PTE_LOW_HIGH > > +/* > > + * WARNING: only to be used in the get_user_pages_fast() implementation. > > + * With get_user_pages_fast(), we walk

Re: [PATCH v2 1/6] mm/gup: Provide gup_get_pte() more generic

2020-11-26 Thread Matthew Wilcox
On Thu, Nov 26, 2020 at 01:01:15PM +0100, Peter Zijlstra wrote: > +#ifdef CONFIG_GUP_GET_PTE_LOW_HIGH > +/* > + * WARNING: only to be used in the get_user_pages_fast() implementation. > + * With get_user_pages_fast(), we walk down the pagetables without taking any > + * locks. For this we would li

[PATCH v2 1/6] mm/gup: Provide gup_get_pte() more generic

2020-11-26 Thread Peter Zijlstra
In order to write another lockless page-table walker, we need gup_get_pte() exposed. While doing that, rename it to ptep_get_lockless() to match the existing ptep_get() naming. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/pgtable.h | 55 +