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 35A35C433F5 for ; Thu, 19 May 2022 21:15:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BAF486B0071; Thu, 19 May 2022 17:15:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B5DE76B0072; Thu, 19 May 2022 17:15:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A27266B0073; Thu, 19 May 2022 17:15:40 -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 9462C6B0071 for ; Thu, 19 May 2022 17:15:40 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 68E4A33A83 for ; Thu, 19 May 2022 21:15:40 +0000 (UTC) X-FDA: 79483749240.10.A53E9F9 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf06.hostedemail.com (Postfix) with ESMTP id C3B0E180011 for ; Thu, 19 May 2022 21:15:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652994939; x=1684530939; h=date:from:to:cc:subject:message-id:mime-version; bh=nX+KNtxV6LhwhQ+aMKM6gPlNwu/uEushJibQXpPwDkg=; b=aCGm1BsyQhNWuoizfFssRYMcptugnERXwbQ9mtg2MX0/etQpvq3RdRD+ xTv/LnbickPbLi3Ca6JLihpw55o9uue9LLSdZpgQl82Hq7xPc9klgumEb se8XijzHeSKZbJBrly5e2jiHEokVLs8hriaol6/EcXwXx/pzDtHlgu523 PAan/G59EWJIUl4QjkaSqUzoVCPygprFHEyLuYKQ/X1dB7RmvpCc7xZr1 2+LWmm+g0S5zjUMQkJFERNjSrgiMMTSnPAeIRTPwCnX8li3pPHk9A4/fU dxtD6BgU21vmI4UeL6D7WQs9x5eC4A5hFLRpNrNxt44sFWtWdX2Z15MHg g==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="272081828" X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="272081828" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 14:15:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="818197143" Received: from lkp-server02.sh.intel.com (HELO 242b25809ac7) ([10.239.97.151]) by fmsmga006.fm.intel.com with ESMTP; 19 May 2022 14:15:36 -0700 Received: from kbuild by 242b25809ac7 with local (Exim 4.95) (envelope-from ) id 1nrnUd-0003xD-P2; Thu, 19 May 2022 21:15:35 +0000 Date: Fri, 20 May 2022 05:14:52 +0800 From: kernel test robot To: Mel Gorman Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Andrew Morton , Linux Memory Management List Subject: mm/page_alloc.c:984:9: warning: iteration 119304648 invokes undefined behavior Message-ID: <202205200521.65W2rpLt-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aCGm1Bsy; spf=none (imf06.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.24) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C3B0E180011 X-Stat-Signature: 6fpg8died9tbbm7aaespm3xcnm431rd1 X-HE-Tag: 1652994936-164712 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: b015dcd62b86d298829990f8261d5d154b8d7af5 commit: 44042b4498728f4376e84bae1ac8016d146d850b mm/page_alloc: allow high-order pages to be stored on the per-cpu lists date: 11 months ago config: powerpc-randconfig-r002-20220519 (https://download.01.org/0day-ci/archive/20220520/202205200521.65W2rpLt-lkp@intel.com/config) compiler: powerpc-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=44042b4498728f4376e84bae1ac8016d146d850b git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 44042b4498728f4376e84bae1ac8016d146d850b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): mm/page_alloc.c:3823:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes] 3823 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) | ^~~~~~~~~~~~~~~~~~~~~~ {standard input}: Assembler messages: {standard input}:6471: Error: unrecognized opcode: `wrteei' {standard input}:6700: Error: unrecognized opcode: `wrtee' mm/page_alloc.c: In function 'rmqueue.isra': >> mm/page_alloc.c:984:9: warning: iteration 119304648 invokes undefined behavior [-Waggressive-loop-optimizations] 984 | list_add(&page->lru, &area->free_list[migratetype]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/page_alloc.c:2305:21: note: within this loop 2305 | while (high > low) { | ~~~~~^~~~~ {standard input}:9878: Error: unrecognized opcode: `wrteei' {standard input}:10902: Error: unrecognized opcode: `wrtee' {standard input}:11103: Error: unrecognized opcode: `wrteei' {standard input}:11321: Error: unrecognized opcode: `wrtee' {standard input}:12224: Error: unrecognized opcode: `wrteei' {standard input}:12816: Error: unrecognized opcode: `wrtee' {standard input}:12822: Error: unrecognized opcode: `wrteei' {standard input}:12831: Error: unrecognized opcode: `wrtee' {standard input}:14310: Error: unrecognized opcode: `wrteei' {standard input}:14402: Error: unrecognized opcode: `wrteei' {standard input}:14431: Error: unrecognized opcode: `wrteei' {standard input}:14476: Error: unrecognized opcode: `wrtee' {standard input}:14484: Error: unrecognized opcode: `wrtee' {standard input}:14503: Error: unrecognized opcode: `wrtee' {standard input}:17180: Error: unrecognized opcode: `wrteei' {standard input}:17816: Error: unrecognized opcode: `wrtee' {standard input}:17828: Error: unrecognized opcode: `wrtee' vim +984 mm/page_alloc.c 5e1f0f098b4649 Mel Gorman 2019-03-05 977 6ab0136310961e Alexander Duyck 2020-04-06 978 /* Used for pages not on another list */ 6ab0136310961e Alexander Duyck 2020-04-06 979 static inline void add_to_free_list(struct page *page, struct zone *zone, 6ab0136310961e Alexander Duyck 2020-04-06 980 unsigned int order, int migratetype) 6ab0136310961e Alexander Duyck 2020-04-06 981 { 6ab0136310961e Alexander Duyck 2020-04-06 982 struct free_area *area = &zone->free_area[order]; 6ab0136310961e Alexander Duyck 2020-04-06 983 6ab0136310961e Alexander Duyck 2020-04-06 @984 list_add(&page->lru, &area->free_list[migratetype]); 6ab0136310961e Alexander Duyck 2020-04-06 985 area->nr_free++; 6ab0136310961e Alexander Duyck 2020-04-06 986 } 6ab0136310961e Alexander Duyck 2020-04-06 987 :::::: The code at line 984 was first introduced by commit :::::: 6ab0136310961ebf4b5ecb565f0bf52c233dc093 mm: use zone and order instead of free area in free_list manipulators :::::: TO: Alexander Duyck :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://01.org/lkp