From: kernel test robot <lkp@intel.com>
To: Kairui Song <kasong@tencent.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 8522/9137] mm/memcontrol-v1.c:651:31: error: implicit declaration of function 'swp_cluster_offset'
Date: Fri, 29 May 2026 13:55:04 +0800 [thread overview]
Message-ID: <202605291334.abNeADbG-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f7af91adc230aa99e23330ecf85bc9badd9780ad
commit: 93680c2b51fa1f84fe50800b71140dbd283372b8 [8522/9137] mm/memcg, swap: store cgroup id in cluster table directly
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260529/202605291334.abNeADbG-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260529/202605291334.abNeADbG-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/202605291334.abNeADbG-lkp@intel.com/
All errors (new ones prefixed by >>):
mm/memcontrol-v1.c: In function '__memcg1_swapout':
>> mm/memcontrol-v1.c:651:31: error: implicit declaration of function 'swp_cluster_offset' [-Wimplicit-function-declaration]
651 | __swap_cgroup_set(ci, swp_cluster_offset(folio->swap), nr_entries,
| ^~~~~~~~~~~~~~~~~~
vim +/swp_cluster_offset +651 mm/memcontrol-v1.c
606
607 /**
608 * __memcg1_swapout - transfer a memsw charge to swap
609 * @folio: folio whose memsw charge to transfer
610 * @ci: the locked swap cluster holding the swap entries
611 *
612 * Transfer the memsw charge of @folio to the swap entry stored in
613 * folio->swap.
614 *
615 * Context: folio must be isolated, unmapped, locked and is just about to
616 * be freed, and caller must disable IRQs and hold the swap cluster lock.
617 */
618 void __memcg1_swapout(struct folio *folio, struct swap_cluster_info *ci)
619 {
620 struct mem_cgroup *memcg, *swap_memcg;
621 struct obj_cgroup *objcg;
622 unsigned int nr_entries;
623
624 VM_WARN_ON_ONCE_FOLIO(!folio_test_swapcache(folio), folio);
625 VM_WARN_ON_ONCE_FOLIO(!folio_test_locked(folio), folio);
626 VM_BUG_ON_FOLIO(folio_test_lru(folio), folio);
627 VM_BUG_ON_FOLIO(folio_ref_count(folio), folio);
628
629 if (mem_cgroup_disabled())
630 return;
631
632 if (!do_memsw_account())
633 return;
634
635 objcg = folio_objcg(folio);
636 VM_WARN_ON_ONCE_FOLIO(!objcg, folio);
637 if (!objcg)
638 return;
639
640 rcu_read_lock();
641 memcg = obj_cgroup_memcg(objcg);
642 /*
643 * In case the memcg owning these pages has been offlined and doesn't
644 * have an ID allocated to it anymore, charge the closest online
645 * ancestor for the swap instead and transfer the memory+swap charge.
646 */
647 nr_entries = folio_nr_pages(folio);
648 swap_memcg = mem_cgroup_private_id_get_online(memcg, nr_entries);
649 mod_memcg_state(swap_memcg, MEMCG_SWAP, nr_entries);
650
> 651 __swap_cgroup_set(ci, swp_cluster_offset(folio->swap), nr_entries,
652 mem_cgroup_private_id(swap_memcg));
653
654 folio_unqueue_deferred_split(folio);
655 folio->memcg_data = 0;
656
657 if (!obj_cgroup_is_root(objcg))
658 page_counter_uncharge(&memcg->memory, nr_entries);
659
660 if (memcg != swap_memcg) {
661 if (!mem_cgroup_is_root(swap_memcg))
662 page_counter_charge(&swap_memcg->memsw, nr_entries);
663 page_counter_uncharge(&memcg->memsw, nr_entries);
664 }
665
666 /*
667 * The caller must hold the swap cluster lock with IRQ off. It is
668 * important here to have the interrupts disabled because it is the
669 * only synchronisation we have for updating the per-CPU variables.
670 */
671 preempt_disable_nested();
672 VM_WARN_ON_IRQS_ENABLED();
673 memcg1_charge_statistics(memcg, -folio_nr_pages(folio));
674 preempt_enable_nested();
675 memcg1_check_events(memcg, folio_nid(folio));
676
677 rcu_read_unlock();
678 obj_cgroup_put(objcg);
679 }
680
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-29 5:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202605291334.abNeADbG-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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.