[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <223c560b-0234-4203-a11d-661656317808@linux.dev>
Date: Thu, 11 Sep 2025 10:54:19 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: Kairui Song <ryncsn@...il.com>
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 2025/9/11 10:48, Kairui Song wrote:
> 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/
Ah, I was testing V2. My apologies for the noise!
Powered by blists - more mailing lists