From: kernel test robot <lkp@intel.com>
To: Suren Baghdasaryan <surenb@google.com>, akpm@linux-foundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
david@redhat.com, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, vbabka@suse.cz,
alexandru.elisei@arm.com, peterx@redhat.com, sj@kernel.org,
rppt@kernel.org, mhocko@suse.com, corbet@lwn.net,
axboe@kernel.dk, viro@zeniv.linux.org.uk, brauner@kernel.org,
hch@infradead.org, jack@suse.cz, willy@infradead.org,
m.szyprowski@samsung.com, robin.murphy@arm.com,
hannes@cmpxchg.org, zhengqi.arch@bytedance.com,
shakeel.butt@linux.dev, axelrasmussen@google.com,
yuanchu@google.com, weixugc@google.com, minchan@kernel.org,
surenb@google.com, linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] mm/tests: add cleancache kunit test
Date: Sat, 11 Oct 2025 10:57:22 +0800 [thread overview]
Message-ID: <202510111059.aKceYLLH-lkp@intel.com> (raw)
In-Reply-To: <20251010011951.2136980-6-surenb@google.com>
Hi Suren,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 70478cb9da6fc4e7b987219173ba1681d5f7dd3d]
url: https://github.com/intel-lab-lkp/linux/commits/Suren-Baghdasaryan/mm-implement-cleancache/20251010-134501
base: 70478cb9da6fc4e7b987219173ba1681d5f7dd3d
patch link: https://lore.kernel.org/r/20251010011951.2136980-6-surenb%40google.com
patch subject: [PATCH 5/8] mm/tests: add cleancache kunit test
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251011/202510111059.aKceYLLH-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251011/202510111059.aKceYLLH-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/202510111059.aKceYLLH-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/tests/cleancache_kunit.c:358:6: warning: variable 'unused' set but not used [-Wunused-but-set-variable]
358 | int unused = 0;
| ^
1 warning generated.
vim +/unused +358 mm/tests/cleancache_kunit.c
353
354 static void cleancache_backend_api_test(struct kunit *test)
355 {
356 struct folio *folio;
357 LIST_HEAD(folios);
> 358 int unused = 0;
359 int used = 0;
360
361 /* Store inode folios into cleancache */
362 fill_cleancache(test);
363
364 /* Get all donated folios back */
365 for (int fidx = 0; fidx < FOLIO_COUNT; fidx++) {
366 KUNIT_EXPECT_EQ(test, cleancache_backend_get_folio(test_data.pool_id,
367 test_data.pool_folios[fidx]), 0);
368 set_page_refcounted(&test_data.pool_folios[fidx]->page);
369 }
370
371 /* Try putting a refcounted folio */
372 KUNIT_EXPECT_NE(test, cleancache_backend_put_folio(test_data.pool_id,
373 test_data.pool_folios[0]), 0);
374
375 /* Put some of the folios back into cleancache */
376 for (int fidx = 0; fidx < FOLIOS_PER_INODE; fidx++) {
377 folio_ref_freeze(test_data.pool_folios[fidx], 1);
378 KUNIT_EXPECT_EQ(test, cleancache_backend_put_folio(test_data.pool_id,
379 test_data.pool_folios[fidx]), 0);
380 }
381
382 /* Put the rest back into cleancache but keep half of folios still refcounted */
383 for (int fidx = FOLIOS_PER_INODE; fidx < FOLIO_COUNT; fidx++) {
384 if (fidx % 2) {
385 folio_ref_freeze(test_data.pool_folios[fidx], 1);
386 unused++;
387 } else {
388 used++;
389 }
390 list_add(&test_data.pool_folios[fidx]->lru, &folios);
391 }
392 KUNIT_EXPECT_NE(test, cleancache_backend_put_folios(test_data.pool_id,
393 &folios), 0);
394 /* Used folios should be still in the list */
395 KUNIT_EXPECT_EQ(test, list_count_nodes(&folios), used);
396
397 /* Release refcounts and put the remaining folios into cleancache */
398 list_for_each_entry(folio, &folios, lru)
399 folio_ref_freeze(folio, 1);
400 KUNIT_EXPECT_EQ(test, cleancache_backend_put_folios(test_data.pool_id,
401 &folios), 0);
402 KUNIT_EXPECT_TRUE(test, list_empty(&folios));
403 }
404
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-11 2:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 1:19 [PATCH 0/8] Guaranteed CMA Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 1/8] mm: implement cleancache Suren Baghdasaryan
2025-10-10 1:31 ` Andrew Morton
2025-10-10 1:42 ` Suren Baghdasaryan
2025-10-10 2:39 ` Matthew Wilcox
2025-10-10 14:53 ` Suren Baghdasaryan
2025-10-10 21:17 ` kernel test robot
2025-10-10 21:42 ` Suren Baghdasaryan
2025-10-13 6:44 ` Christoph Hellwig
2025-10-13 15:43 ` Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 2/8] mm/cleancache: add cleancache LRU for folio aging Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 3/8] mm/cleancache: readahead support Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 4/8] mm/cleancache: add sysfs interface Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 5/8] mm/tests: add cleancache kunit test Suren Baghdasaryan
2025-10-11 2:57 ` kernel test robot [this message]
2025-10-11 21:47 ` Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 6/8] add cleancache documentation Suren Baghdasaryan
2025-10-10 20:20 ` SeongJae Park
2025-10-10 22:09 ` Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 7/8] mm: introduce GCMA Suren Baghdasaryan
2025-10-10 21:11 ` SeongJae Park
2025-10-10 22:05 ` Suren Baghdasaryan
2025-10-10 1:19 ` [PATCH 8/8] mm: integrate GCMA with CMA using dt-bindings Suren Baghdasaryan
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=202510111059.aKceYLLH-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=alexandru.elisei@arm.com \
--cc=axboe@kernel.dk \
--cc=axelrasmussen@google.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=lorenzo.stoakes@oracle.com \
--cc=m.szyprowski@samsung.com \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterx@redhat.com \
--cc=robin.murphy@arm.com \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.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.