Re: [PATCH 00/29] Speculative page faults (anon vmas only)
From: Michel Lespinasse
Date: Tue Jun 01 2021 - 03:41:41 EST
On Thu, May 20, 2021 at 03:10:24PM -0700, Suren Baghdasaryan wrote:
> Hi Paul,
> I promised you to look into this but somehow forgot to reply, sorry
> about that. The issue is the new "#include <linux/mm_types.h>" in mm.h
> which causes page_pgdat() usage before it is defined:
>
> mm.h includes mm_types.h
> mm_types.h includes vmstat.h
> vmstat.h uses page_pgdat()
> mm.h defines page_pgdat()
>
> Not sure if this is the best way to fix it but this worked fine for me:
>
> ---
> include/linux/mmap_lock.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h
> index 98f24a9910a9..13d4a706c0eb 100644
> --- a/include/linux/mmap_lock.h
> +++ b/include/linux/mmap_lock.h
> @@ -7,7 +7,7 @@
> #include <linux/rwsem.h>
> #include <linux/tracepoint-defs.h>
> #include <linux/types.h>
> -#include <linux/vmstat.h>
> +#include <linux/vm_event_item.h>
Thanks for looking into this.
I have to say, C's handling of header files is one of my least
favourite features, it tends to be very unmaintainable when there are
multiple configs involved :/
I haven't spent any time trying to reproduce the issue yet.
Paul, could you send your .config file to give me a starting point ?
Or maybe Suren already figured out what combination of config options
triggers the issue ?
Thanks,
--
Michel "walken" Lespinasse