[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2766e825-4a45-47b9-8544-95a427123547@os.amperecomputing.com>
Date: Wed, 14 May 2025 08:25:05 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: Ignacio Moreno Gonzalez <Ignacio.MorenoGonzalez@...a.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: "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 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.
>
>
Powered by blists - more mailing lists