From: kernel test robot <lkp@intel.com>
To: Kairui Song <ryncsn@gmail.com>, linux-mm@kvack.org
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Kemeng Shi <shikemeng@huaweicloud.com>,
Nhat Pham <nphamcs@gmail.com>, Baoquan He <bhe@redhat.com>,
Barry Song <baohua@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
linux-kernel@vger.kernel.org, Chris Li <chrisl@kernel.org>,
Kairui Song <kasong@tencent.com>
Subject: Re: [PATCH 09/12] mm, swap: use the swap table to track the swap count
Date: Mon, 26 Jan 2026 05:04:04 +0100 [thread overview]
Message-ID: <202601260524.qYN30lLA-lkp@intel.com> (raw)
In-Reply-To: <20260126-swap-table-p3-v1-9-a74155fab9b0@tencent.com>
Hi Kairui,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 10de4550639e9df9242e32e9affc90ed75a27c7d]
url: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song/mm-swap-protect-si-swap_file-properly-and-use-as-a-mount-indicator/20260126-020149
base: 10de4550639e9df9242e32e9affc90ed75a27c7d
patch link: https://lore.kernel.org/r/20260126-swap-table-p3-v1-9-a74155fab9b0%40tencent.com
patch subject: [PATCH 09/12] mm, swap: use the swap table to track the swap count
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260126/202601260524.qYN30lLA-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260126/202601260524.qYN30lLA-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601260524.qYN30lLA-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/swapfile.c: In function 'unuse_pte_range':
>> mm/swapfile.c:2351:31: warning: variable 'offset' set but not used [-Wunused-but-set-variable]
2351 | unsigned long offset;
| ^~~~~~
>> mm/swapfile.c:2346:34: warning: variable 'si' set but not used [-Wunused-but-set-variable]
2346 | struct swap_info_struct *si;
| ^~
vim +/offset +2351 mm/swapfile.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 2340
^1da177e4c3f41 Linus Torvalds 2005-04-16 2341 static int unuse_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
^1da177e4c3f41 Linus Torvalds 2005-04-16 2342 unsigned long addr, unsigned long end,
10a9c496789fe2 Christoph Hellwig 2022-01-21 2343 unsigned int type)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2344 {
d850fa72987378 Hugh Dickins 2023-06-08 2345 pte_t *pte = NULL;
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 @2346 struct swap_info_struct *si;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2347
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2348 si = swap_info[type];
^1da177e4c3f41 Linus Torvalds 2005-04-16 2349 do {
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2350) struct folio *folio;
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 @2351) unsigned long offset;
0177fe675b3916 Kairui Song 2026-01-26 2352 unsigned long swp_tb;
3f79b187ad2f67 Kairui Song 2022-12-20 2353 unsigned char swp_count;
06fb61462bdea3 Lorenzo Stoakes 2025-11-10 2354 softleaf_t entry;
d850fa72987378 Hugh Dickins 2023-06-08 2355 int ret;
c33c794828f212 Ryan Roberts 2023-06-12 2356 pte_t ptent;
d850fa72987378 Hugh Dickins 2023-06-08 2357
d850fa72987378 Hugh Dickins 2023-06-08 2358 if (!pte++) {
d850fa72987378 Hugh Dickins 2023-06-08 2359 pte = pte_offset_map(pmd, addr);
d850fa72987378 Hugh Dickins 2023-06-08 2360 if (!pte)
d850fa72987378 Hugh Dickins 2023-06-08 2361 break;
d850fa72987378 Hugh Dickins 2023-06-08 2362 }
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2363)
c33c794828f212 Ryan Roberts 2023-06-12 2364 ptent = ptep_get_lockless(pte);
06fb61462bdea3 Lorenzo Stoakes 2025-11-10 2365 entry = softleaf_from_pte(ptent);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2366)
06fb61462bdea3 Lorenzo Stoakes 2025-11-10 2367 if (!softleaf_is_swap(entry))
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2368 continue;
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2369 if (swp_type(entry) != type)
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2370 continue;
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2371
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2372 offset = swp_offset(entry);
044d66c1d2b1c5 Hugh Dickins 2008-02-07 2373 pte_unmap(pte);
d850fa72987378 Hugh Dickins 2023-06-08 2374 pte = NULL;
d850fa72987378 Hugh Dickins 2023-06-08 2375
f28124617f3415 Kairui Song 2025-09-17 2376 folio = swap_cache_get_folio(entry);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2377) if (!folio) {
8c63ca5bc3e19f Will Deacon 2021-01-14 2378 struct vm_fault vmf = {
8c63ca5bc3e19f Will Deacon 2021-01-14 2379 .vma = vma,
8c63ca5bc3e19f Will Deacon 2021-01-14 2380 .address = addr,
824ddc601adc2c Nadav Amit 2022-03-22 2381 .real_address = addr,
8c63ca5bc3e19f Will Deacon 2021-01-14 2382 .pmd = pmd,
8c63ca5bc3e19f Will Deacon 2021-01-14 2383 };
8c63ca5bc3e19f Will Deacon 2021-01-14 2384
94dc8bffd8b7fe Matthew Wilcox (Oracle 2024-08-07 2385) folio = swapin_readahead(entry, GFP_HIGHUSER_MOVABLE,
ebc5951eea4993 Andrea Righi 2020-06-01 2386 &vmf);
ebc5951eea4993 Andrea Righi 2020-06-01 2387 }
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2388) if (!folio) {
0177fe675b3916 Kairui Song 2026-01-26 2389 swp_tb = swap_table_get(__swap_entry_to_cluster(entry),
0177fe675b3916 Kairui Song 2026-01-26 2390 swp_cluster_offset(entry));
0177fe675b3916 Kairui Song 2026-01-26 2391 swp_count = swp_tb_get_count(swp_tb);
0177fe675b3916 Kairui Song 2026-01-26 2392 if (swp_count <= 0)
d850fa72987378 Hugh Dickins 2023-06-08 2393 continue;
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2394 return -ENOMEM;
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2395 }
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2396
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2397) folio_lock(folio);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2398) folio_wait_writeback(folio);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2399) ret = unuse_pte(vma, pmd, addr, entry, folio);
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2400 if (ret < 0) {
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2401) folio_unlock(folio);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2402) folio_put(folio);
d850fa72987378 Hugh Dickins 2023-06-08 2403 return ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2404 }
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2405
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2406) folio_free_swap(folio);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2407) folio_unlock(folio);
f102cd8b173e06 Matthew Wilcox (Oracle 2022-09-02 2408) folio_put(folio);
d850fa72987378 Hugh Dickins 2023-06-08 2409 } while (addr += PAGE_SIZE, addr != end);
b56a2d8af9147a Vineeth Remanan Pillai 2019-03-05 2410
d850fa72987378 Hugh Dickins 2023-06-08 2411 if (pte)
d850fa72987378 Hugh Dickins 2023-06-08 2412 pte_unmap(pte);
d850fa72987378 Hugh Dickins 2023-06-08 2413 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2414 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2415
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-26 4:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 17:57 [PATCH 00/12] mm, swap: swap table phase III: remove swap_map Kairui Song
2026-01-25 17:57 ` [PATCH 01/12] mm, swap: protect si->swap_file properly and use as a mount indicator Kairui Song
2026-01-25 17:57 ` [PATCH 02/12] mm, swap: clean up swapon process and locking Kairui Song
2026-01-25 17:57 ` [PATCH 03/12] mm, swap: remove redundant arguments and locking for enabling a device Kairui Song
2026-01-25 17:57 ` [PATCH 04/12] mm, swap: consolidate bad slots setup and make it more robust Kairui Song
2026-01-25 17:57 ` [PATCH 05/12] mm/workingset: leave highest bits empty for anon shadow Kairui Song
2026-01-25 17:57 ` [PATCH 06/12] mm, swap: implement helpers for reserving data in the swap table Kairui Song
2026-01-26 7:15 ` kernel test robot
2026-01-26 8:28 ` Kairui Song
2026-01-25 17:57 ` [PATCH 07/12] mm, swap: mark bad slots in swap table directly Kairui Song
2026-01-25 17:57 ` [PATCH 08/12] mm, swap: simplify swap table sanity range check Kairui Song
2026-01-25 17:57 ` [PATCH 09/12] mm, swap: use the swap table to track the swap count Kairui Song
2026-01-26 1:03 ` kernel test robot
2026-01-26 4:04 ` kernel test robot [this message]
2026-01-25 17:57 ` [PATCH 10/12] mm, swap: no need to truncate the scan border Kairui Song
2026-01-25 17:57 ` [PATCH 11/12] mm, swap: simplify checking if a folio is swapped Kairui Song
2026-01-25 17:57 ` [PATCH 12/12] mm, swap: no need to clear the shadow explicitly Kairui Song
2026-01-25 22:13 ` [syzbot ci] Re: mm, swap: swap table phase III: remove swap_map syzbot ci
2026-01-26 3:11 ` Kairui Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202601260524.qYN30lLA-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=nphamcs@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ryncsn@gmail.com \
--cc=shikemeng@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.