[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMgjq7CtYpe4sEYaw2carqGskvchV9Z+1yn2Wa3nMP2VguV_eQ@mail.gmail.com>
Date: Thu, 11 Sep 2025 10:48:26 +0800
From: Kairui Song <ryncsn@...il.com>
To: Lance Yang <lance.yang@...ux.dev>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>, Hugh Dickins <hughd@...gle.com>, Chris Li <chrisl@...nel.org>,
Barry Song <baohua@...nel.org>, Baoquan He <bhe@...hat.com>, Nhat Pham <nphamcs@...il.com>,
Kemeng Shi <shikemeng@...weicloud.com>, Baolin Wang <baolin.wang@...ux.alibaba.com>,
Ying Huang <ying.huang@...ux.alibaba.com>, Johannes Weiner <hannes@...xchg.org>,
David Hildenbrand <david@...hat.com>, Yosry Ahmed <yosryahmed@...gle.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Zi Yan <ziy@...dia.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 11/15] mm, swap: use the swap table for the swap cache
and switch API
On Thu, Sep 11, 2025 at 10:34 AM Lance Yang <lance.yang@...ux.dev> wrote:
>
> On Thu, Sep 11, 2025 at 10:27 AM Lance Yang <lance.yang@...ux.dev> wrote:
> >
> > Hi Kairui,
> >
> > I'm hitting a build error with allnoconfig:
> >
> > In file included from mm/shmem.c:44:
> > mm/swap.h: In function ‘folio_index’:
> > mm/swap.h:462:24: error: implicit declaration of function
> > ‘swp_offset’; did you mean ‘pmd_offset’?
> > [-Wimplicit-function-declaration]
> > 462 | return swp_offset(folio->swap);
> >
> > It looks like a header might be missing in mm/swap.h. Please let me know
> > if you need any more information.
>
> Confirmed that just adding #include <linux/swapops.h> into mm/swap.h fixes it.
>
> diff --git a/mm/swap.h b/mm/swap.h
> index ad339547ee8c..271e8c560fcc 100644
> --- a/mm/swap.h
> +++ b/mm/swap.h
> @@ -3,6 +3,7 @@
> #define _MM_SWAP_H
>
> #include <linux/atomic.h> /* for atomic_long_t */
> +#include <linux/swapops.h>
> struct mempolicy;
> struct swap_iocb;
>
> Cheers,
> Lance
>
Hi Lance,
You are testing V2 not V3 right? The build error is in V2 and I can
confirm that. But In V3 I've added "ifdef CONFIG_SWAP" for the
swp_offset usage in swap.h. I've just tested allnoconfig and it
works fine on aarch64 and x86_64.
V2: https://lore.kernel.org/linux-mm/20250905191357.78298-12-ryncsn@gmail.com/
Powered by blists - more mailing lists