Re: [PATCH v2 6/6] mm: Introduce ctor/dtor at PGD level

2025-01-22 Thread Alexander Gordeev
On Wed, Jan 22, 2025 at 03:06:05PM +0100, Alexander Gordeev wrote: Hi Kevin, > On Wed, Jan 22, 2025 at 08:49:54AM +0100, Heiko Carstens wrote: > > > > static inline pgd_t *pgd_alloc(struct mm_struct *mm) > > > > { > > > > - return (pgd_t *) crst_table_alloc(mm); > > > > + unsigned l

Re: [PATCH v2 6/6] mm: Introduce ctor/dtor at PGD level

2025-01-22 Thread Alexander Gordeev
On Wed, Jan 22, 2025 at 08:49:54AM +0100, Heiko Carstens wrote: > > > static inline pgd_t *pgd_alloc(struct mm_struct *mm) > > > { > > > - return (pgd_t *) crst_table_alloc(mm); > > > + unsigned long *table = crst_table_alloc(mm); > > > + > > > + if (!table) > > > + return NULL; > > > >

Re: [PATCH v2 6/6] mm: Introduce ctor/dtor at PGD level

2025-01-21 Thread Heiko Carstens
On Tue, Jan 21, 2025 at 05:37:33PM +0100, Alexander Gordeev wrote: > On Fri, Jan 03, 2025 at 06:44:15PM +, Kevin Brodsky wrote: > > Hi Kevin, > ... > > diff --git a/arch/s390/include/asm/pgalloc.h > > b/arch/s390/include/asm/pgalloc.h > > index 5fced6d3c36b..b19b6ed2ab53 100644 > > --- a/arch

Re: [PATCH v2 6/6] mm: Introduce ctor/dtor at PGD level

2025-01-21 Thread Alexander Gordeev
On Fri, Jan 03, 2025 at 06:44:15PM +, Kevin Brodsky wrote: Hi Kevin, ... > diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h > index 5fced6d3c36b..b19b6ed2ab53 100644 > --- a/arch/s390/include/asm/pgalloc.h > +++ b/arch/s390/include/asm/pgalloc.h > @@ -130,11 +130,

[PATCH v2 6/6] mm: Introduce ctor/dtor at PGD level

2025-01-03 Thread Kevin Brodsky
Following on from the introduction of P4D-level ctor/dtor, let's finish the job and introduce ctor/dtor at PGD level. The incurred improvement in page accounting is minimal - the main motivation is to create a single, generic place where construction/destruction hooks can be added for all page tabl