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 90523C3DA6F for ; Thu, 24 Aug 2023 14:00:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AAC8A2800A9; Thu, 24 Aug 2023 10:00:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A0E8F28006F; Thu, 24 Aug 2023 10:00:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8AE1A2800A9; Thu, 24 Aug 2023 10:00:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7E87F28006F for ; Thu, 24 Aug 2023 10:00:11 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 26E3EA038B for ; Thu, 24 Aug 2023 14:00:11 +0000 (UTC) X-FDA: 81159157422.20.A0BD327 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by imf12.hostedemail.com (Postfix) with ESMTP id 238A040004 for ; Thu, 24 Aug 2023 14:00:07 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ZJZEb4qh; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf12.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 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=1692885609; 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=UHdCIzsUneLg8+Ehf8DLGQmtSwAcnUMYD3XxEZ/0Opg=; b=q20R3sHWuaTer3BsgvJEQUsdQpz9E4GqV37Xo9GixWuvgZcJXwFBNE1QZONmMEucIQqEen PMZegkJsZ5tUf2T5c14xGgb+0uTtkStBf/cWQEU+RrqtA9xmctB1TJudiyWJOeTocdrBuv IWkJ+qwFv2Vsw/MgtQKOAnuu7nCXS/M= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ZJZEb4qh; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf12.hostedemail.com: domain of lkp@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692885609; a=rsa-sha256; cv=none; b=r341hFpW13G8BHMFkCiozmW4Z3Nu0YAd2BxzC0lyF/xkdAc+Cw5Qe/uNI2HkSDkVq5PtTC aPurN5uviUAAW9zLmWnnf21I+5rRp7PuIzBKs4J7isgXVed31IteTdi/u21naf9Rjv4TXG gUxFEv3JFGMGAHyGPBGi1SzqqzzhOKo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692885608; x=1724421608; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=GBSyGk8xGxYynVKmO5H//T8q5CbtNF6TMMZQKQdxkDY=; b=ZJZEb4qhZ+c0lC18rJ1uBFntZQiq2jGRJ6aWs4MGxC50CnKvfig0nJgP Sze9ZvY9hgwvbTVO7kv0TFLci27iiAqVLCJyIsuJTZm/mJAsaF01voVGS GCxOXsK0v++hBgGP7T58ft6zhcLjhS2tKbXwU+YzndXjyxzBKj3z7++PY 66+Jmi8jqDHIjvT+iHBKRQYvLlqDP+vUFTkBB7xwr/UjXziQHnQ71cMU8 i+sQMZysJ8MKN5IaufDmxATskn91rX6YHp3xiv8TfF3KI/AfYuO0fiPyU 33ewopulm3TC7wmrBtfOM/WxJvMKxLPlHEtuhs5x6epzXWEEHtePVpAkN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="373323948" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="373323948" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 07:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10812"; a="860709978" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="860709978" Received: from lkp-server02.sh.intel.com (HELO daf8bb0a381d) ([10.239.97.151]) by orsmga004.jf.intel.com with ESMTP; 24 Aug 2023 07:00:03 -0700 Received: from kbuild by daf8bb0a381d with local (Exim 4.96) (envelope-from ) id 1qZAsU-0002k8-0c; Thu, 24 Aug 2023 14:00:02 +0000 Date: Thu, 24 Aug 2023 21:59:31 +0800 From: kernel test robot To: "Matthew Wilcox (Oracle)" , Mike Kravetz Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, "Matthew Wilcox (Oracle)" , Muchun Song , linux-mm@kvack.org, Sidhartha Kumar Subject: Re: [PATCH 2/3] hugetlb: Remove a few calls to page_folio() Message-ID: <202308242115.E2LcVeIB-lkp@intel.com> References: <20230822162808.4131399-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230822162808.4131399-2-willy@infradead.org> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 238A040004 X-Stat-Signature: fp1p5ipbn88cyj4mywfqz7b64ef6xnde X-Rspam-User: X-HE-Tag: 1692885607-751587 X-HE-Meta: U2FsdGVkX1+egVdZdOYJlEvZyQqVaWmlr0VRnk8IOU1U0CopwAnKMC530PI0V/BqIgZjEnBS9EKvt9jOuglUxyeZvtwAVMpIy8bb62av/YQTO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Jb/FqUX8KCeR3LN0akqRkHgwTA419HMz2wPtn0dmhUi8WEgbBZvjDmSpWoR7ZiBj4X33qlS8KZg013bLw/nA3sUVf0OBj/lLftvhpuo+GjZGlDIfUA6zSuzFahNl00l15f6eM2lJ56QO/KK2tu1b23Z/egWLO3ygIQIh2piz3NUbOOYpx5R92hzxxWGS90xVRc1TfGX8iCSa5qlR/XKKs6a3MytnHuKgO2WfN0+UbqMpsLSYo70A3MSOY1zQcvMJZgU4VMSpc6pmRrXC/ro 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: Hi Matthew, 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.5-rc7 next-20230824] [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/Matthew-Wilcox-Oracle/hugetlb-Remove-a-few-calls-to-page_folio/20230823-002932 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20230822162808.4131399-2-willy%40infradead.org patch subject: [PATCH 2/3] hugetlb: Remove a few calls to page_folio() config: s390-randconfig-001-20230824 (https://download.01.org/0day-ci/archive/20230824/202308242115.E2LcVeIB-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230824/202308242115.E2LcVeIB-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/202308242115.E2LcVeIB-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:78: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) | ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' 102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) | ^ In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:78: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) | ^ include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32' 115 | #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) | ^ In file included from mm/hugetlb.c:19: In file included from include/linux/memblock.h:13: In file included from arch/s390/include/asm/dma.h:5: In file included from include/linux/io.h:13: In file included from arch/s390/include/asm/io.h:78: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ >> mm/hugetlb.c:2232:32: warning: variable 'folio' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] 2232 | for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/hugetlb.c:1469:3: note: expanded from macro 'for_each_node_mask_to_free' 1469 | nr_nodes > 0 && \ | ^~~~~~~~~~~~ mm/hugetlb.c:2246:10: note: uninitialized use occurs here 2246 | return &folio->page; | ^~~~~ mm/hugetlb.c:2232:32: note: remove the '&&' if its condition is always true 2232 | for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) { | ^ mm/hugetlb.c:2229:21: note: initialize the variable 'folio' to silence this warning 2229 | struct folio *folio; | ^ | = NULL 13 warnings generated. vim +2232 mm/hugetlb.c b2261026825ed3 Joonsoo Kim 2013-09-11 2216 e8c5c8249878fb Lee Schermerhorn 2009-09-21 2217 /* 10c6ec49802b17 Mike Kravetz 2021-05-04 2218 * Remove huge page from pool from next node to free. Attempt to keep 10c6ec49802b17 Mike Kravetz 2021-05-04 2219 * persistent huge pages more or less balanced over allowed nodes. 10c6ec49802b17 Mike Kravetz 2021-05-04 2220 * This routine only 'removes' the hugetlb page. The caller must make 10c6ec49802b17 Mike Kravetz 2021-05-04 2221 * an additional call to free the page to low level allocators. e8c5c8249878fb Lee Schermerhorn 2009-09-21 2222 * Called with hugetlb_lock locked. e8c5c8249878fb Lee Schermerhorn 2009-09-21 2223 */ 10c6ec49802b17 Mike Kravetz 2021-05-04 2224 static struct page *remove_pool_huge_page(struct hstate *h, 10c6ec49802b17 Mike Kravetz 2021-05-04 2225 nodemask_t *nodes_allowed, 6ae11b278bca1c Lee Schermerhorn 2009-12-14 2226 bool acct_surplus) e8c5c8249878fb Lee Schermerhorn 2009-09-21 2227 { b2261026825ed3 Joonsoo Kim 2013-09-11 2228 int nr_nodes, node; cfd5082b514765 Sidhartha Kumar 2022-11-29 2229 struct folio *folio; e8c5c8249878fb Lee Schermerhorn 2009-09-21 2230 9487ca60fd7fa2 Mike Kravetz 2021-05-04 2231 lockdep_assert_held(&hugetlb_lock); b2261026825ed3 Joonsoo Kim 2013-09-11 @2232 for_each_node_mask_to_free(h, nr_nodes, node, nodes_allowed) { 685f345708096e Lee Schermerhorn 2009-09-21 2233 /* 685f345708096e Lee Schermerhorn 2009-09-21 2234 * If we're returning unused surplus pages, only examine 685f345708096e Lee Schermerhorn 2009-09-21 2235 * nodes with surplus pages. 685f345708096e Lee Schermerhorn 2009-09-21 2236 */ b2261026825ed3 Joonsoo Kim 2013-09-11 2237 if ((!acct_surplus || h->surplus_huge_pages_node[node]) && b2261026825ed3 Joonsoo Kim 2013-09-11 2238 !list_empty(&h->hugepage_freelists[node])) { e601ce76a2aabd Matthew Wilcox (Oracle 2023-08-22 2239) folio = list_entry(h->hugepage_freelists[node].next, e601ce76a2aabd Matthew Wilcox (Oracle 2023-08-22 2240) struct folio, lru); cfd5082b514765 Sidhartha Kumar 2022-11-29 2241 remove_hugetlb_folio(h, folio, acct_surplus); 9a76db09970938 Lee Schermerhorn 2009-12-14 2242 break; e8c5c8249878fb Lee Schermerhorn 2009-09-21 2243 } b2261026825ed3 Joonsoo Kim 2013-09-11 2244 } e8c5c8249878fb Lee Schermerhorn 2009-09-21 2245 e601ce76a2aabd Matthew Wilcox (Oracle 2023-08-22 2246) return &folio->page; e8c5c8249878fb Lee Schermerhorn 2009-09-21 2247 } e8c5c8249878fb Lee Schermerhorn 2009-09-21 2248 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki