[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90bfbe27-ba24-4f18-9f94-fb58ecc03586@lucifer.local>
Date: Wed, 14 May 2025 16:29:46 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Yang Shi <yang@...amperecomputing.com>
Cc: Ignacio Moreno Gonzalez <Ignacio.MorenoGonzalez@...a.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>, willy@...radead.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: madvise: make MADV_NOHUGEPAGE a no-op if !THP
On Wed, May 14, 2025 at 08:25:05AM -0700, Yang Shi wrote:
>
>
> On 5/14/25 8:07 AM, Ignacio Moreno Gonzalez wrote:
> > On 5/14/2025 3:52 PM, Lorenzo Stoakes wrote:
> >
> > > I have pinged s390 people on there, but I don't think this is going to make this
> > > cycle given we will probably need to coordinate with them to fix up this enum
> > > name (which seems the best solution to me!...)
> > They answered that it would be ok for them to do a quick fix over the mm tree:
> >
> > https://lore.kernel.org/linux-mm/6f8f3780-902b-49d4-a766-ea2e1a8f85ea@linux.ibm.com/
> >
> >
> > > > +#include <uapi/asm/mman.h>
> > > Also this should be linux/mman.h I believe, sorry for not catching first time round...!
> > >
> > Including linux/mman.h leads to a compilation error:
> >
> > ../include/linux/huge_mm.h:601:23: error: ‘MADV_NOHUGEPAGE’
> >
> > Including uapi/linux/mman.h works, but I am not sure if that is correct.
>
> Is this build on x86? I actually tried this on my arm64 build before I
> suggested uapi/asm/mman.h. But I saw a lot of compilation errors, like:
>
> In file included from ./include/linux/memcontrol.h:22,
> from ./include/linux/swap.h:9,
> from ./include/linux/userfaultfd_k.h:18,
> from ./include/linux/hugetlb.h:16,
> from ./arch/arm64/include/asm/mman.h:10,
> from ./include/uapi/linux/mman.h:5,
> from ./include/linux/huge_mm.h:512,
> from ./include/linux/mm.h:1238,
> from ./include/linux/memblock.h:12,
> from ./arch/arm64/include/asm/acpi.h:14,
> from ./include/acpi/acpi_io.h:7,
> from ./include/linux/acpi.h:39,
> from ./include/acpi/apei.h:9,
> from ./include/acpi/ghes.h:5,
> from ./include/linux/arm_sdei.h:8,
> from arch/arm64/kernel/asm-offsets.c:10:
> ./include/linux/vmstat.h: In function ‘__zone_stat_mod_folio’:
> ./include/linux/vmstat.h:414:31: error: implicit declaration of function
> ‘folio_zone’; did you mean ‘folio_zonenum’?
> [-Wimplicit-function-declaration]
> 414 | __mod_zone_page_state(folio_zone(folio), item, nr);
> | ^~~~~~~~~~
> | folio_zonenum
> ./include/linux/vmstat.h:414:31: error: passing argument 1 of
> ‘__mod_zone_page_state’ makes pointer from integer without a cast
> [-Wint-conversion]
> 414 | __mod_zone_page_state(folio_zone(folio), item, nr);
> | ^~~~~~~~~~~~~~~~~
> | |
> | int
> ./include/linux/vmstat.h:273:28: note: expected ‘struct zone *’ but argument
> is of type ‘int’
> 273 | void __mod_zone_page_state(struct zone *, enum zone_stat_item item,
> long);
> | ^~~~~~~~~~~~~
> ./include/linux/vmstat.h: In function ‘__zone_stat_add_folio’:
> ./include/linux/vmstat.h:420:56: error: implicit declaration of function
> ‘folio_nr_pages’; did you mean ‘folio_page’?
> [-Wimplicit-function-declaration]
> 420 | __mod_zone_page_state(folio_zone(folio), item,
> folio_nr_pages(folio));
> | ^~~~~~~~~~~~~~
>
>
> The build used default Fedora kernel config with THP disabled and v6.15-rc6
> kernel.
Yeah I suspect this is because of circular dependencies as I mentioned in reply
to Ignacio :) Sorry I missed you'd suggested it Yang, you were right to do so :)
You can see mm.h -> huge_mm.h there so it does seem to be same thing.
C headers are a source of many sighs.
>
> >
> >
>
Powered by blists - more mailing lists