Re: [PATCH mm-unstable v9 14/31] s390: Convert various pgalloc functions to use ptdescs
Vishal Moola <[email protected]>
| Newsgroups | gmane.linux.ports.m68k,gmane.linux.kernel.mm,gmane.linux.kernel.cross-arch,gmane.linux.ports.arm.kernel,gmane.linux.ports.hexagon,gmane.linux.ports.mips,gmane.linux.ports.ppc64.devel,gmane.linux.ports.riscv,gmane.linux.ports.sh.devel,gmane.linux.ports.sparc,gmane.linux.uml.devel,gmane.comp.emulators.xen.devel,gmane.comp.emulators.kvm.devel |
|---|---|
| Message-ID | <CAOzc2px-SFSnmjcPriiB3cm1fNj3+YC8S0VSp4t1QvDR0f4E2A@mail.gmail.com> |
On Thu, Oct 12, 2023 at 12:25 AM Heiko Carstens <[email protected]> wrote: > > On Mon, Aug 07, 2023 at 04:04:56PM -0700, Vishal Moola (Oracle) wrote: > > As part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents, convert various page table functions to use ptdescs. > > > > Some of the functions use the *get*page*() helper functions. Convert > > these to use pagetable_alloc() and ptdesc_address() instead to help > > standardize page tables further. > > > > Acked-by: Mike Rapoport (IBM) <[email protected]> > > Signed-off-by: Vishal Moola (Oracle) <[email protected]> > > --- > > arch/s390/include/asm/pgalloc.h | 4 +- > > arch/s390/include/asm/tlb.h | 4 +- > > arch/s390/mm/pgalloc.c | 128 ++++++++++++++++---------------- > > 3 files changed, 69 insertions(+), 67 deletions(-) > ... > > diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c > > index d7374add7820..07fc660a24aa 100644 > > --- a/arch/s390/mm/pgalloc.c > > +++ b/arch/s390/mm/pgalloc.c > ... > > @@ -488,16 +486,20 @@ static void base_pgt_free(unsigned long *table) > > static unsigned long *base_crst_alloc(unsigned long val) > > { > > unsigned long *table; > > + struct ptdesc *ptdesc; > > > > - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER); > > - if (table) > > - crst_table_init(table, val); > > + ptdesc = pagetable_alloc(GFP_KERNEL & ~__GFP_HIGHMEM, CRST_ALLOC_ORDER); > > I guess I must miss something, but what is the reason to mask out > __GFP_HIGHMEM here? It is not part of GFP_KERNEL, nor does s390 support > HIGHMEM. You're not missing anything. This was replacing __get_free_pages() which also doesn't support HIGHMEM, so I had that in to ensure a non-HIGHMEM allocation in case a passed-in gfp_flags had it set. In hindsight since we're just passing in the GFP flags directly here, we don't actually need to mask out GFP_HIGHMEM.