Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-09 Thread Christophe Leroy
On Tue, 2020-09-08 at 16:15 +0200, Alexander Gordeev wrote: > On Tue, Sep 08, 2020 at 10:16:49AM +0200, Christophe Leroy wrote: > > >Yes, and also two more sources :/ > > > arch/powerpc/mm/kasan/8xx.c > > > arch/powerpc/mm/kasan/kasan_init_32.c > > > > > >But these two are not quite obvious

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 07:14:38AM +0200, Christophe Leroy wrote: [...] > You forgot arch/powerpc/mm/book3s64/subpage_prot.c it seems. If this one would be okay? diff --git a/arch/powerpc/mm/book3s64/subpage_prot.c b/arch/powerpc/mm/book3s64/subpage_prot.c index 60c6ea16..3690d22 100644 ---

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 10:16:49AM +0200, Christophe Leroy wrote: > >Yes, and also two more sources :/ > > arch/powerpc/mm/kasan/8xx.c > > arch/powerpc/mm/kasan/kasan_init_32.c > > > >But these two are not quite obvious wrt pgd_addr_end() used > >while traversing pmds. Could you please

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Jason Gunthorpe
On Mon, Sep 07, 2020 at 08:00:57PM +0200, Gerald Schaefer wrote: > From: Alexander Gordeev > > Unlike all other page-table abstractions pXd_addr_end() do not take > into account a particular table entry in which context the functions > are called. On architectures with dynamic page-tables

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Dave Hansen
On 9/7/20 11:00 AM, Gerald Schaefer wrote: > x86: > add/remove: 0/0 grow/shrink: 2/0 up/down: 10/0 (10) > Function old new delta > vmemmap_populate 587 592 +5 > munlock_vma_pages_range 556 561

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Christophe Leroy
Le 08/09/2020 à 09:46, Alexander Gordeev a écrit : On Tue, Sep 08, 2020 at 07:14:38AM +0200, Christophe Leroy wrote: You forgot arch/powerpc/mm/book3s64/subpage_prot.c it seems. Yes, and also two more sources :/ arch/powerpc/mm/kasan/8xx.c

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-08 Thread Alexander Gordeev
On Tue, Sep 08, 2020 at 07:14:38AM +0200, Christophe Leroy wrote: > You forgot arch/powerpc/mm/book3s64/subpage_prot.c it seems. Yes, and also two more sources :/ arch/powerpc/mm/kasan/8xx.c arch/powerpc/mm/kasan/kasan_init_32.c But these two are not quite obvious wrt

Re: [RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-07 Thread Christophe Leroy
Le 07/09/2020 à 20:00, Gerald Schaefer a écrit : From: Alexander Gordeev Unlike all other page-table abstractions pXd_addr_end() do not take into account a particular table entry in which context the functions are called. On architectures with dynamic page-tables folding that might lead to

[RFC PATCH v2 2/3] mm: make pXd_addr_end() functions page-table entry aware

2020-09-07 Thread Gerald Schaefer
From: Alexander Gordeev Unlike all other page-table abstractions pXd_addr_end() do not take into account a particular table entry in which context the functions are called. On architectures with dynamic page-tables folding that might lead to lack of necessary information that is difficult to