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 93CE2C3DA5D for ; Thu, 25 Jul 2024 16:33:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02E366B0083; Thu, 25 Jul 2024 12:33:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F20326B0085; Thu, 25 Jul 2024 12:33:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE80B6B0088; Thu, 25 Jul 2024 12:33:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B89466B0083 for ; Thu, 25 Jul 2024 12:33:20 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 107A9A1235 for ; Thu, 25 Jul 2024 16:33:20 +0000 (UTC) X-FDA: 82378820160.19.74A2B0E Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by imf30.hostedemail.com (Postfix) with ESMTP id 5B73D8002A for ; Thu, 25 Jul 2024 16:33:17 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=e3hUwcXO; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721925143; 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=AZTKPgIpW2rS0fepoe+fr2wod45VZh5DhrADu+h+U6I=; b=F78ZjlwCPzRe0IZhpdE8xxZ7m5YTgoPKXIRUyYVjFhcTi/FtgvtE8T2rfwUA60+9gYlRPq woPCf0U7K6ic8H8rJt6H5ORZj5eZYgwq1iJn8mHaXCAghmb/zlPZN2CVL4vpB0+fnPhRig yAAvHXdLbqS8zrF7pGP52vmROzpVipU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721925143; a=rsa-sha256; cv=none; b=A/bKuyWoo7AHVBS0stQlAoqTZdllO/mtYDE9ODYUzYovNhpDPbJ346moKHvt+bmTrIszHk GBITuk//mQck2+2bUR/ipFuGdPTsg+YkAdGevnSM/8OtO8dT/XVtiSZb8XTd/0tI7ltqAR lDuso//9U/eTCSNNMIsb0rtkaKYJ69g= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=e3hUwcXO; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=lkp@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721925197; x=1753461197; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=YhMeQKtI4fdRJzymCqk4WemjTuqWXinoOJd0rboLbzs=; b=e3hUwcXOCfpmSmqPYSk5gph/Y5kc8vCRGAOKt8JDIj3M6SYGRoHSqcYI mZsOusj8yb8+cQ8pHINXF4ZprF5kpsKtW8mwi0FcKVc5S2K+9De2RwUCh Yu0B0NkDBEDj8l/O3tTP3rCwax+E3QyrSkWHdCQzNHLXXIR+BtZwC/dsc Z8PpaMZjjlCWIYbvBpPFIw6rUh/KSI1BguaM1OO61HxZgw9ZWmJkO4xhK 8dFZlKnRoxeGDcsfUY2qZWtXpvDtKdl9R8GdZbzoEieNbSKJfKunqfEO+ oeplHdyqViTsyqBiNznz+DIaIL+Q32F+Wz67sJtKByNgICxCquGeDrMPh A==; X-CSE-ConnectionGUID: xaPtxKMjS9KUZFxgeN0gGw== X-CSE-MsgGUID: DDqElXkOTQS36K5TBmgOag== X-IronPort-AV: E=McAfee;i="6700,10204,11144"; a="12712880" X-IronPort-AV: E=Sophos;i="6.09,236,1716274800"; d="scan'208";a="12712880" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2024 09:33:16 -0700 X-CSE-ConnectionGUID: SZH6upjTT3aAZB/FqqgIuw== X-CSE-MsgGUID: KyVL0BCjT6Ox5BffK9Axsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,236,1716274800"; d="scan'208";a="52907637" Received: from lkp-server01.sh.intel.com (HELO 68891e0c336b) ([10.239.97.150]) by orviesa010.jf.intel.com with ESMTP; 25 Jul 2024 09:33:13 -0700 Received: from kbuild by 68891e0c336b with local (Exim 4.96) (envelope-from ) id 1sX1Ox-000oGq-04; Thu, 25 Jul 2024 16:33:11 +0000 Date: Fri, 26 Jul 2024 00:33:01 +0800 From: kernel test robot To: Kinsey Ho , Andrew Morton Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-kernel@vger.kernel.org, Yosry Ahmed , Roman Gushchin , Kinsey Ho Subject: Re: [PATCH mm-unstable v1 1/4] mm: don't hold css->refcnt during traversal Message-ID: <202407260047.sIuRFLJE-lkp@intel.com> References: <20240724190214.1108049-2-kinseyho@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240724190214.1108049-2-kinseyho@google.com> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 5B73D8002A X-Stat-Signature: 1ga9frt4zkf4wi85e7d9gxz98ckhstgf X-Rspam-User: X-HE-Tag: 1721925197-873006 X-HE-Meta: U2FsdGVkX18DFSdRUVOVW9N1TAHZVcFvxFdJXakI2wliPzpTme0+jsuO0vraqe6+81Z4jv694Ousv8I3sgrieL4xi9FcTJibOfPfAf3J+FFVoCDXl/fraJuG4kcgFUG98fYVKUSpnaa56fXtEnVdXwwaDKGS+0hiwtONaeJIJPbYWvmrWNHXMWEpVQPMhKuKDlSA+WDeQLZptMSEf4gnMkZ2+Sj5GWxq5s3OH/Gb/yGfqWkkhRu0vTWVzWVXmABupAVF/37lvkTP/lN7GB0T3dwC+mMfbRkWCMhaYqFMxV/jJZ7XQDNbyMVfQRjGF9DwnbeHmkHVKkN4O3FapsHfsbZyTLYykTkI09cnGac3SMt75JWvQAAmepuNdUTA7b/AxX475NgFrkR9qoVj72xhi9LkBeEXOR+GtlOXIGmALywoRDKvE76NJlzIqGpFDBOYm1HUZ+2j1ymrMjK0vmQZtcLf7V4PoBDYtb2V/5EMJlqkm70NdTOOL/Yk+4N9ZHFQ8NIoiBStfS9vTjan3QF/IugxpaZRAc50HLeKuM/61drq5DnKCcuvNP2gXMHnWcrKJpLPWcm+Ndto5EFSlQVhIWQLgVAmSRJo5NIMhX1Qtn1YG+Hyp5Nc+TW7ycXu16TZ7uqlkQR8q1CPFzCArCvYgbUPLWdw4OmWSEQoAfq9O7jdz//2+ayaagnjO92wWBTnWTHE5IvLU8NBTkmZrMFKOVSvpsrIRo5gJABFmUrzjFe4i79wZPD/1LxivL/N3TfZU1BIcSc3W+PSuRCvztaKGKNKBg1RwSby9iqu/nRPeYjYVStb7KGYHTz1dnKr/ROdJWlNQpDNA1jxyeCmNf0Wik3J/mZxuyJPL5vO165dnPArrbfSw+NYUZ6I1jl5z+ZQl+4sQtcwiP+4KHw5s5FsA9d+ojpStZk8ODwDvsRF473nvtHaCr18KBmvKm94C7NnKsY9JtWgzztRE2ZZvV/ 8bCDaRgf 0WQSDTpzBfp7MfyK5aIZyvmgcRNKPhIENb8JbiwBhEGNCgfUgWrd354KdSMEldxpIAT7+UI7+SrpC7qs4tUm5q+fA2kNWHZY29ca1UxFteJJeUZ9q8ixO8/9IZ/ETT2m0BevCesXPv5usFgZmu5w8sEl+1/CgKSeGPNa+lIs3siyT17Hu+KoJVmYBi4FabN4NSnjBSFMnc0GEtmMSus3hOwAwSoEipHhG/WhXr2qHm//0ugkX7IqtYrgKtbp8cVk+a6rLbaU05vykRkTh/oasdnkF68I4bjN9XItc6WMmAop1KrMORMIDGXT/LLUtZGfCh+pUQOfSlW0cvvMyn52nWWi57xdX4DYr8ckyHv/SAaLab1VrpH2uzrHPPMfqz66fsPC0sFoxgC/JggJD7/5OUzUjIqejx+03DzqZ3ggP1uTgq/c= 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 Kinsey, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master v6.10 next-20240725] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kinsey-Ho/mm-don-t-hold-css-refcnt-during-traversal/20240725-030750 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20240724190214.1108049-2-kinseyho%40google.com patch subject: [PATCH mm-unstable v1 1/4] mm: don't hold css->refcnt during traversal config: x86_64-randconfig-121-20240725 (https://download.01.org/0day-ci/archive/20240726/202407260047.sIuRFLJE-lkp@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240726/202407260047.sIuRFLJE-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/202407260047.sIuRFLJE-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> mm/memcontrol.c:1063:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct mem_cgroup [noderef] __rcu *__old @@ got struct mem_cgroup *[assigned] pos @@ mm/memcontrol.c:1063:23: sparse: expected struct mem_cgroup [noderef] __rcu *__old mm/memcontrol.c:1063:23: sparse: got struct mem_cgroup *[assigned] pos mm/memcontrol.c:1063:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct mem_cgroup [noderef] __rcu *__new @@ got struct mem_cgroup *[assigned] memcg @@ mm/memcontrol.c:1063:23: sparse: expected struct mem_cgroup [noderef] __rcu *__new mm/memcontrol.c:1063:23: sparse: got struct mem_cgroup *[assigned] memcg >> mm/memcontrol.c:1101:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct mem_cgroup [noderef] __rcu *__old @@ got struct mem_cgroup *dead_memcg @@ mm/memcontrol.c:1101:17: sparse: expected struct mem_cgroup [noderef] __rcu *__old mm/memcontrol.c:1101:17: sparse: got struct mem_cgroup *dead_memcg mm/memcontrol.c: note: in included file (through include/linux/cgroup-defs.h): include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true mm/memcontrol.c: note: in included file: include/linux/memcontrol.h:747:9: sparse: sparse: context imbalance in 'folio_lruvec_lock' - wrong count at exit include/linux/memcontrol.h:747:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irq' - wrong count at exit include/linux/memcontrol.h:747:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irqsave' - wrong count at exit mm/memcontrol.c: note: in included file (through include/linux/cgroup-defs.h): include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true vim +1063 mm/memcontrol.c 4b569387c0d566 Nhat Pham 2023-10-06 974 5660048ccac873 Johannes Weiner 2012-01-12 975 /** 5660048ccac873 Johannes Weiner 2012-01-12 976 * mem_cgroup_iter - iterate over memory cgroup hierarchy 5660048ccac873 Johannes Weiner 2012-01-12 977 * @root: hierarchy root 5660048ccac873 Johannes Weiner 2012-01-12 978 * @prev: previously returned memcg, NULL on first invocation 5660048ccac873 Johannes Weiner 2012-01-12 979 * @reclaim: cookie for shared reclaim walks, NULL for full walks 5660048ccac873 Johannes Weiner 2012-01-12 980 * 5660048ccac873 Johannes Weiner 2012-01-12 981 * Returns references to children of the hierarchy below @root, or 5660048ccac873 Johannes Weiner 2012-01-12 982 * @root itself, or %NULL after a full round-trip. 5660048ccac873 Johannes Weiner 2012-01-12 983 * 5660048ccac873 Johannes Weiner 2012-01-12 984 * Caller must pass the return value in @prev on subsequent 5660048ccac873 Johannes Weiner 2012-01-12 985 * invocations for reference counting, or use mem_cgroup_iter_break() 5660048ccac873 Johannes Weiner 2012-01-12 986 * to cancel a hierarchy walk before the round-trip is complete. 5660048ccac873 Johannes Weiner 2012-01-12 987 * 05bdc520b3ad39 Miaohe Lin 2020-10-13 988 * Reclaimers can specify a node in @reclaim to divide up the memcgs 05bdc520b3ad39 Miaohe Lin 2020-10-13 989 * in the hierarchy among all concurrent reclaimers operating on the 05bdc520b3ad39 Miaohe Lin 2020-10-13 990 * same node. 5660048ccac873 Johannes Weiner 2012-01-12 991 */ 694fbc0fe78518 Andrew Morton 2013-09-24 992 struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, 9f3a0d0933de07 Johannes Weiner 2012-01-12 993 struct mem_cgroup *prev, 694fbc0fe78518 Andrew Morton 2013-09-24 994 struct mem_cgroup_reclaim_cookie *reclaim) 7d74b06f240f1b KAMEZAWA Hiroyuki 2010-10-27 995 { 3f649ab728cda8 Kees Cook 2020-06-03 996 struct mem_cgroup_reclaim_iter *iter; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 997 struct cgroup_subsys_state *css = NULL; 9f3a0d0933de07 Johannes Weiner 2012-01-12 998 struct mem_cgroup *memcg = NULL; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 999 struct mem_cgroup *pos = NULL; 711d3d2c9bc3fb KAMEZAWA Hiroyuki 2010-10-27 1000 694fbc0fe78518 Andrew Morton 2013-09-24 1001 if (mem_cgroup_disabled()) 694fbc0fe78518 Andrew Morton 2013-09-24 1002 return NULL; 5660048ccac873 Johannes Weiner 2012-01-12 1003 9f3a0d0933de07 Johannes Weiner 2012-01-12 1004 if (!root) 9f3a0d0933de07 Johannes Weiner 2012-01-12 1005 root = root_mem_cgroup; 9f3a0d0933de07 Johannes Weiner 2012-01-12 1006 542f85f9ae4acd Michal Hocko 2013-04-29 1007 rcu_read_lock(); 14067bb3e24b96 KAMEZAWA Hiroyuki 2009-04-02 1008 527a5ec9a53471 Johannes Weiner 2012-01-12 1009 if (reclaim) { ef8f2327996b5c Mel Gorman 2016-07-28 1010 struct mem_cgroup_per_node *mz; 527a5ec9a53471 Johannes Weiner 2012-01-12 1011 a3747b53b1771a Johannes Weiner 2021-04-29 1012 mz = root->nodeinfo[reclaim->pgdat->node_id]; 9da83f3fc74b80 Yafang Shao 2019-11-30 1013 iter = &mz->iter; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1014 a9320aae68a1cd Wei Yang 2022-04-28 1015 /* a9320aae68a1cd Wei Yang 2022-04-28 1016 * On start, join the current reclaim iteration cycle. a9320aae68a1cd Wei Yang 2022-04-28 1017 * Exit when a concurrent walker completes it. a9320aae68a1cd Wei Yang 2022-04-28 1018 */ a9320aae68a1cd Wei Yang 2022-04-28 1019 if (!prev) a9320aae68a1cd Wei Yang 2022-04-28 1020 reclaim->generation = iter->generation; a9320aae68a1cd Wei Yang 2022-04-28 1021 else if (reclaim->generation != iter->generation) 542f85f9ae4acd Michal Hocko 2013-04-29 1022 goto out_unlock; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1023 fe6faac115aa89 Kinsey Ho 2024-07-24 1024 pos = rcu_dereference(iter->position); 89d8330ccf2ad4 Wei Yang 2022-04-28 1025 } else if (prev) { 89d8330ccf2ad4 Wei Yang 2022-04-28 1026 pos = prev; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1027 } 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1028 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1029 if (pos) 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1030 css = &pos->css; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1031 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1032 for (;;) { 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1033 css = css_next_descendant_pre(css, &root->css); 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1034 if (!css) { 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1035 /* 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1036 * Reclaimers share the hierarchy walk, and a 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1037 * new one might jump in right at the end of 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1038 * the hierarchy - make sure they see at least 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1039 * one group and restart from the beginning. 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1040 */ 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1041 if (!prev) 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1042 continue; 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1043 break; 542f85f9ae4acd Michal Hocko 2013-04-29 1044 } 5f578161971863 Michal Hocko 2013-04-29 1045 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1046 /* 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1047 * Verify the css and acquire a reference. The root 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1048 * is provided by the caller, so we know it's alive 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1049 * and kicking, and don't take an extra reference. 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1050 */ 41555dadbff8d2 Wei Yang 2022-04-28 1051 if (css == &root->css || css_tryget(css)) { 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1052 memcg = mem_cgroup_from_css(css); 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1053 break; 41555dadbff8d2 Wei Yang 2022-04-28 1054 } 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1055 } 9f3a0d0933de07 Johannes Weiner 2012-01-12 1056 527a5ec9a53471 Johannes Weiner 2012-01-12 1057 if (reclaim) { 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1058 /* 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1059 * The position could have already been updated by a competing 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1060 * thread, so check that the value hasn't changed since we read 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1061 * it to avoid reclaiming from the same cgroup twice. 5ac8fb31ad2ebd Johannes Weiner 2014-12-10 1062 */ 6df38689e0e9a0 Vladimir Davydov 2015-12-29 @1063 (void)cmpxchg(&iter->position, pos, memcg); 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1064 19f39402864ea3 Michal Hocko 2013-04-29 1065 if (!memcg) 527a5ec9a53471 Johannes Weiner 2012-01-12 1066 iter->generation++; 527a5ec9a53471 Johannes Weiner 2012-01-12 1067 } 14067bb3e24b96 KAMEZAWA Hiroyuki 2009-04-02 1068 542f85f9ae4acd Michal Hocko 2013-04-29 1069 out_unlock: 542f85f9ae4acd Michal Hocko 2013-04-29 1070 rcu_read_unlock(); c40046f3ad5e87 Michal Hocko 2013-04-29 1071 if (prev && prev != root) c40046f3ad5e87 Michal Hocko 2013-04-29 1072 css_put(&prev->css); c40046f3ad5e87 Michal Hocko 2013-04-29 1073 9f3a0d0933de07 Johannes Weiner 2012-01-12 1074 return memcg; 9f3a0d0933de07 Johannes Weiner 2012-01-12 1075 } 14067bb3e24b96 KAMEZAWA Hiroyuki 2009-04-02 1076 5660048ccac873 Johannes Weiner 2012-01-12 1077 /** 5660048ccac873 Johannes Weiner 2012-01-12 1078 * mem_cgroup_iter_break - abort a hierarchy walk prematurely 5660048ccac873 Johannes Weiner 2012-01-12 1079 * @root: hierarchy root 5660048ccac873 Johannes Weiner 2012-01-12 1080 * @prev: last visited hierarchy member as returned by mem_cgroup_iter() 5660048ccac873 Johannes Weiner 2012-01-12 1081 */ 5660048ccac873 Johannes Weiner 2012-01-12 1082 void mem_cgroup_iter_break(struct mem_cgroup *root, 9f3a0d0933de07 Johannes Weiner 2012-01-12 1083 struct mem_cgroup *prev) 9f3a0d0933de07 Johannes Weiner 2012-01-12 1084 { 711d3d2c9bc3fb KAMEZAWA Hiroyuki 2010-10-27 1085 if (!root) 711d3d2c9bc3fb KAMEZAWA Hiroyuki 2010-10-27 1086 root = root_mem_cgroup; 9f3a0d0933de07 Johannes Weiner 2012-01-12 1087 if (prev && prev != root) 9f3a0d0933de07 Johannes Weiner 2012-01-12 1088 css_put(&prev->css); 14067bb3e24b96 KAMEZAWA Hiroyuki 2009-04-02 1089 } 9f3a0d0933de07 Johannes Weiner 2012-01-12 1090 54a83d6bcbf8f4 Miles Chen 2019-08-13 1091 static void __invalidate_reclaim_iterators(struct mem_cgroup *from, 54a83d6bcbf8f4 Miles Chen 2019-08-13 1092 struct mem_cgroup *dead_memcg) 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1093 { 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1094 struct mem_cgroup_reclaim_iter *iter; ef8f2327996b5c Mel Gorman 2016-07-28 1095 struct mem_cgroup_per_node *mz; ef8f2327996b5c Mel Gorman 2016-07-28 1096 int nid; 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1097 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1098 for_each_node(nid) { a3747b53b1771a Johannes Weiner 2021-04-29 1099 mz = from->nodeinfo[nid]; 9da83f3fc74b80 Yafang Shao 2019-11-30 1100 iter = &mz->iter; 9da83f3fc74b80 Yafang Shao 2019-11-30 @1101 cmpxchg(&iter->position, dead_memcg, NULL); 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1102 } 6df38689e0e9a0 Vladimir Davydov 2015-12-29 1103 } 54a83d6bcbf8f4 Miles Chen 2019-08-13 1104 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki