From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5762EC83F1A for ; Fri, 18 Jul 2025 17:09:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE4B66B0092; Fri, 18 Jul 2025 13:09:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E94BB6B0093; Fri, 18 Jul 2025 13:09:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D846C6B0095; Fri, 18 Jul 2025 13:09:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id BDBA76B0092 for ; Fri, 18 Jul 2025 13:09:47 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 86FE5563F1 for ; Fri, 18 Jul 2025 17:09:47 +0000 (UTC) X-FDA: 83678022414.23.DF02C98 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by imf26.hostedemail.com (Postfix) with ESMTP id 84105140005 for ; Fri, 18 Jul 2025 17:09:44 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=CsXfxd3G; spf=pass (imf26.hostedemail.com: domain of lkp@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752858585; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/LjSW9KRVC8sGHC1+KNb6X+8TTM5mK154LkmgYv4mzY=; b=wM/0BK6kegYirvxhELGMrX+kokPCILRy4gGIJz2MQidg1aqmI54UZYn429aO2oPSKAAEG1 5Bn8YZIWV51sTADe00aKMZsLz7zCA4Qd2vNdZG1HccpUeh+0qPXCNZT0WWZHXn46z+JJLN KrK7/RjiFKc5z7SyCt1q3QwKUVoLITQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752858585; a=rsa-sha256; cv=none; b=vPTMQGufTARDnwqFEeRZtXwK5x1F4ocEb8zIg+K39CdEedETvvZBoHCz4l7Kbcf0MyvodU lKxsZKBFzM/O+p8VuLyAuRU4ZW8kawa/BRPrID+ow5hiHATD+Trsb4sRRgNoKwsIt1zK2e n0ACr99xLc9kzE0z/NKgdqlHS9I0Shs= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=CsXfxd3G; spf=pass (imf26.hostedemail.com: domain of lkp@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1752858585; x=1784394585; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ooxJn1LruN/YvEQn9D12u6VstnqMl47g6HfhdNYMq3Y=; b=CsXfxd3GE7kbT1vKTvs1H+btqXjLStmcrDp4rLtVkkV9pfSYHQvbCMtb jdkBMehqKIQz45gUQHcvIk/AyqJu4sxktmUVSkvm0tS8oQS0INknnIAay PTfwhMDd+3pOHuhp0pNFER+//aVHbiXz6jb15bZS7SM+kAovdVnICJFL1 ul27nXQ4YknNMeJde+oJ1/ks//OKmgz+7gpN7Zw7QUdt/ZuZFyD5s/i0d DXxi0szoXQJg37Yc7OfdIIhveBvAktLa9BIpjdb9MV1u6JJGdez/ftZKQ t/AZq1yH/S8biSv3CEacHdLcuFft9bu5z4rEKOqoiwjJ7/kLSrpoJFy5f g==; X-CSE-ConnectionGUID: yX20eW9UQ0iJL3b6QOHZLA== X-CSE-MsgGUID: ofRzayzeTwy7NBPjwlyEkA== X-IronPort-AV: E=McAfee;i="6800,10657,11496"; a="55314250" X-IronPort-AV: E=Sophos;i="6.16,322,1744095600"; d="scan'208";a="55314250" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2025 10:09:43 -0700 X-CSE-ConnectionGUID: Ene6RaO6QquDZSHnOFG6jA== X-CSE-MsgGUID: EVNguCNxQU2ugcLqigJ96w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,322,1744095600"; d="scan'208";a="163735712" Received: from lkp-server01.sh.intel.com (HELO 9ee84586c615) ([10.239.97.150]) by orviesa005.jf.intel.com with ESMTP; 18 Jul 2025 10:09:38 -0700 Received: from kbuild by 9ee84586c615 with local (Exim 4.96) (envelope-from ) id 1ucoaV-000EuZ-0P; Fri, 18 Jul 2025 17:09:35 +0000 Date: Sat, 19 Jul 2025 01:08:46 +0800 From: kernel test robot To: Youngjun Park , akpm@linux-foundation.org, hannes@cmpxchg.org Cc: oe-kbuild-all@lists.linux.dev, mhocko@kernel.org, roman.gushchin@linux.dev, shakeel.butt@linux.dev, muchun.song@linux.dev, shikemeng@huaweicloud.com, kasong@tencent.com, nphamcs@gmail.com, bhe@redhat.com, baohua@kernel.org, chrisl@kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, gunho.lee@lge.com, iamjoonsoo.kim@lge.com, taejoon.song@lge.com, Youngjun Park , Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH 1/4] mm/swap, memcg: Introduce infrastructure for cgroup-based swap priority Message-ID: <202507190037.RCDNmMsJ-lkp@intel.com> References: <20250716202006.3640584-2-youngjun.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250716202006.3640584-2-youngjun.park@lge.com> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 84105140005 X-Stat-Signature: k7i7tpe86p1w5h6wt4ttzs3qgnedpb38 X-Rspam-User: X-HE-Tag: 1752858584-954777 X-HE-Meta: U2FsdGVkX18fDq9M1barVoKZWbT2WjKYYae3gqcfrTXRW66IGeB02EBV6x9Z2HDip57mJSH+mKypgBfe9dvMAn3Re7KCTIYuhtTKf9/Vwn37kw0dilYcKaHFVHPM4eoxNTmSGhTzq+UM/1V83q8cgzMI2aQeIvlDuhrFeeEAmHG2Oor+REdAG6ZJYajn+rH5U5CcHNWjwt9l7S4KVmOVVjVO6jUMHUILUxsqcolJqjnef1yujg10vId2+JTimehboNmJc2J37iidxgWW+YLrJip1nWJiL0xjipHmAgth8dtYQHebPFnhd83m0Qwx2hcmlN9YM+HYasYVJ929G3ciVVEcwOfqWWshhzKxtnsGRupGBkbhZUOeYtWY7yI7RvMwwou4XtgjB3FTQ46MhWCjD1cN+e0wVkymAXqfs74yZqqDL5XjtGiSHmlHx8Q1ffsoHZSf+vihRMx4ybyNq12qNpPHw/f+1Z+/7+PVYDjrSQbk48QzjJ5Pu1+OF9apwK9MrtMaVl1K1ZKyH41Y/ceiVnKw9YopR+XavfUWyHN3uNhUuTm9GCnBxr4Vjqb65oUGIOB9HrBkd8d4N+JNQYIFU7FU8qfY26TFWjeSFSOeCmHN0QBIi3IFbTwp5aZqylbnPDfPw1weReqjF0Xsc1k/8M6lrjNbacQ+8bWKxhN64p+zrLkoN4H8/iaZ5vv0Z0H1hbESJNMPkbJFPu2fYXH9TpnN97Dw86MlUJ52u7U9eeAqKHs9AgT3gO6RHQ3mE+eXnHRvJiK8/59xu7CDOeKzOdPQNXQqq1oxVw1nHCpG9CYCbfwIPPJv0eE3wZWgoc6wokM+Z8X5vSDPdCKY97ZodSIXbMb/grqC8BfvA5sSk1sRwYSRfMlaLmjZi2tTjaSvH9hS/PY9fAytvXVTNKcy3lDRM1IY4bvJCrlnPeyt3MyEjsRtw9m/apCRbz/miexTZPkBvLL3uDmsTRJbfrU SiznlMCu HcV8tUeBF6admQ8RK9L4pbCbgmV1Mi3x5G6lH94r0hvwYUiMzewlL0M43u4XzLvate2YhK3Fcuzoxwbd3jdWehlo2xUXZRUcWIqp3uULL9DbdnZL8Pkk45+9S3VljO14BIodKV+Dgcku383aAQ9oS+e/V12WKNF9EUsNsI7NRB6jF0735mYKseglILHwt+ySeBEzRGDtrhbZBhFv2/WgW2Dp01XHzmWJURkkI3UVfA68c07Jt90eJkFNXRY2uNMobxonhBhtLA4qoWf/SSXwqtba7HHWBDvLiSKif2JO42Ee65LceoUktuqbCfNrJ7r5yicyJDDg0RH9FZIUi43yZp030fkOZpmZct1Ou X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Youngjun, kernel test robot noticed the following build errors: [auto build test ERROR on 347e9f5043c89695b01e66b3ed111755afcf1911] url: https://github.com/intel-lab-lkp/linux/commits/Youngjun-Park/mm-swap-memcg-Introduce-infrastructure-for-cgroup-based-swap-priority/20250717-042648 base: 347e9f5043c89695b01e66b3ed111755afcf1911 patch link: https://lore.kernel.org/r/20250716202006.3640584-2-youngjun.park%40lge.com patch subject: [PATCH 1/4] mm/swap, memcg: Introduce infrastructure for cgroup-based swap priority config: sparc64-randconfig-r054-20250718 (https://download.01.org/0day-ci/archive/20250719/202507190037.RCDNmMsJ-lkp@intel.com/config) compiler: sparc64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250719/202507190037.RCDNmMsJ-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202507190037.RCDNmMsJ-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/rbtree.h:24, from include/linux/mm_types.h:11, from include/linux/mmzone.h:22, from include/linux/swap.h:7, from mm/swap_cgroup_priority.c:16: mm/swap_cgroup_priority.c: In function 'get_swap_cgroup_priority': >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/rcupdate.h:532:17: note: in definition of macro '__rcu_dereference_check' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/rcupdate.h:532:38: note: in definition of macro '__rcu_dereference_check' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ In file included from : >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:518:27: note: in definition of macro '__unqual_scalar_typeof' 518 | _Generic((x), \ | ^ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ In file included from ./arch/sparc/include/generated/asm/rwonce.h:1, from include/linux/compiler.h:390, from include/linux/export.h:5, from include/linux/linkage.h:7, from include/linux/preempt.h:10, from include/linux/spinlock.h:56, from include/linux/swap.h:5: >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ >> mm/swap_cgroup_priority.c:115:37: error: invalid use of undefined type 'struct mem_cgroup' 115 | return rcu_dereference(memcg->swap_priority); | ^~ include/linux/rcupdate.h:535:19: note: in definition of macro '__rcu_dereference_check' 535 | ((typeof(*p) __force __kernel *)(local)); \ | ^ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:115:16: note: in expansion of macro 'rcu_dereference' 115 | return rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c: In function 'show_swap_cgroup_priority': mm/swap_cgroup_priority.c:186:30: error: invalid use of undefined type 'struct mem_cgroup' 186 | swap_priority = memcg->swap_priority; | ^~ mm/swap_cgroup_priority.c: In function 'swap_alloc_cgroup_priority': mm/swap_cgroup_priority.c:285:26: error: invalid use of undefined type 'struct mem_cgroup' 285 | if (memcg->swap_priority != swap_priority) | ^~ mm/swap_cgroup_priority.c: In function 'apply_swap_cgroup_priority': mm/swap_cgroup_priority.c:638:46: error: invalid use of undefined type 'struct mem_cgroup' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~ include/linux/rcupdate.h:532:17: note: in definition of macro '__rcu_dereference_check' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:25: note: in expansion of macro 'rcu_dereference' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:46: error: invalid use of undefined type 'struct mem_cgroup' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~ include/linux/rcupdate.h:532:38: note: in definition of macro '__rcu_dereference_check' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:25: note: in expansion of macro 'rcu_dereference' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:46: error: invalid use of undefined type 'struct mem_cgroup' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) | ^~~~~~~~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:25: note: in expansion of macro 'rcu_dereference' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~~~~~~~~~~~~~~ mm/swap_cgroup_priority.c:638:46: error: invalid use of undefined type 'struct mem_cgroup' 638 | swap_priority = rcu_dereference(memcg->swap_priority); | ^~ include/linux/compiler_types.h:548:23: note: in definition of macro '__compiletime_assert' 548 | if (!(condition)) \ | ^~~~~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:532:50: note: in expansion of macro 'READ_ONCE' 532 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \ | ^~~~~~~~~ include/linux/rcupdate.h:680:9: note: in expansion of macro '__rcu_dereference_check' 680 | __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rcupdate.h:752:28: note: in expansion of macro 'rcu_dereference_check' 752 | #define rcu_dereference(p) rcu_dereference_check(p, 0) vim +115 mm/swap_cgroup_priority.c > 16 #include 17 #include 18 #include 19 #include 20 #include "swap.h" 21 #include "swap_cgroup_priority.h" 22 #include "memcontrol-v1.h" 23 24 static LIST_HEAD(swap_cgroup_priority_list); 25 26 /* 27 * struct swap_cgroup_priority 28 * 29 * This structure is RCU protected. Its lifecycle is determined by its 30 * owning memcg or when its 'distance' reaches zero. The 'distance' field 31 * tracks priority differences from global swap. If zero, and its default_prio 32 * follows global swap priority(SWAP_PRIORITY_GLOBAL), the object is destroyed. 33 * 34 * pnode - Array of pointers to swap device priority nodes. 35 * owner - The owning memory cgroup. 36 * rcu - RCU free callback. 37 * link - Global linked list entry. 38 * least_priority - Current lowest priority. 39 * distance - Priority differences from global swap priority. 40 * default_prio - Default priority for this cgroup. 41 * plist - Priority list head. 42 */ 43 struct swap_cgroup_priority { 44 struct swap_cgroup_priority_pnode *pnode[MAX_SWAPFILES]; 45 struct mem_cgroup *owner; 46 47 union { 48 struct rcu_head rcu; 49 struct list_head link; 50 }; 51 52 int least_priority; 53 s8 distance; 54 int default_prio; 55 struct plist_head plist[]; 56 }; 57 58 /* 59 * struct swap_cgroup_priority_pnode 60 * 61 * This structure represents a priority node for a specific swap device 62 * within a cgroup. 63 * 64 * swap - Pointer to the associated swap device. 65 * id - Unique identifier for the swap device. 66 * prio - Configured priority for this device. 67 * avail_lists - Connections to various priority lists. 68 */ 69 struct swap_cgroup_priority_pnode { 70 struct swap_info_struct *swap; 71 u64 id; 72 signed short prio; 73 struct plist_node avail_lists[]; 74 }; 75 76 /* 77 * Even with a zero distance, a swap device isn't assigned if it doesn't 78 * meet global swap priority conditions; thus, we don't clear it. 79 */ 80 static bool should_clear_swap_cgroup_priority( 81 struct swap_cgroup_priority *swap_priority) 82 { 83 WARN_ON_ONCE(swap_priority->distance < 0 || 84 swap_priority->distance > MAX_SWAPFILES); 85 86 if (swap_priority->distance == 0 && 87 swap_priority->default_prio == SWAP_PRIORITY_GLOBAL) 88 return true; 89 90 return false; 91 } 92 93 /* 94 * swapdev_id 95 * 96 * A unique identifier for a swap device. 97 * 98 * This ID ensures stable identification for users and crucial synchronization 99 * for swap cgroup priority settings. It provides a reliable reference even if 100 * device paths or numbers change. 101 */ 102 static atomic64_t swapdev_id_counter; 103 104 void get_swapdev_id(struct swap_info_struct *si) 105 { 106 si->id = atomic64_inc_return(&swapdev_id_counter); 107 } 108 109 static struct swap_cgroup_priority *get_swap_cgroup_priority( 110 struct mem_cgroup *memcg) 111 { 112 if (!memcg) 113 return NULL; 114 > 115 return rcu_dereference(memcg->swap_priority); 116 } 117 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki