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 C4A4BE77188 for ; Sat, 4 Jan 2025 11:29:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD7C16B0082; Sat, 4 Jan 2025 06:29:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D875C6B0088; Sat, 4 Jan 2025 06:29:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4F296B0089; Sat, 4 Jan 2025 06:29:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A8B396B0082 for ; Sat, 4 Jan 2025 06:29:42 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 331131C76BE for ; Sat, 4 Jan 2025 11:29:42 +0000 (UTC) X-FDA: 82969549404.06.83D985A Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by imf30.hostedemail.com (Postfix) with ESMTP id A1A1F80009 for ; Sat, 4 Jan 2025 11:29:39 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jURJSt1I; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 198.175.65.19 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=1735990180; 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=Lgg/CDJamjtQk4Kw32AOd6ZaAsoXN+3rH8vIoZ/uBZ0=; b=nz36Cn19IbaJ2bMKEQEdqfprt0tT1NiyKSrp/IG5fbBpC8MclGYrS/n8/+IzrvZfrBsWOw IeDuM9udjN0QGj5AqkQFGntPXM4uGpaxrhX1bKR1G5D7BBptzLOiAYEqX0+OdWD9yWc5En GFydB3w8EeDc3lz6wRMNoJ5ZwOD2KpY= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jURJSt1I; spf=pass (imf30.hostedemail.com: domain of lkp@intel.com designates 198.175.65.19 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735990180; a=rsa-sha256; cv=none; b=Y7NzYg0g9TMUwFPiOph4gFdsfuNmqPBrVqTCayHzk1TYXUm4DDb2DQOdSlKao9G7/GV1HE w3S4A9wm5SF8oKcFNJ6G5C1PVp9CaVsXXZ7y6amso9QJKDyKkY1+ZEPaRnHX0YEg6h6bb3 1tjFD9Kd8Cnq/M1q6jlRz2k+2/DVZGg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735990179; x=1767526179; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=O9e5wiW1yLi7F+o3o0lqnCbhSuiSTuSEbgt//a05WEQ=; b=jURJSt1I3kwFdzD2hrAJYA/008Dtin4iUv/qHbiaI9JGqf/NttM1QLTJ CKFK2HmZkJYK3GKwwDBP6Ww6NkvTK1UV1JD/JPfZ6IcaZS2ndLvfEwfBh oIHxrrWaSl6vigrl5lXyAkJLIjDZRApMIwqanXyDHhc0/WdID1Ji/wGba AhMuXTa2hYu2nQ+l45U21RoKmvVxeftuUUXpGtRE1zERpK9rZ9gfGcNDs 8aWkKnE05cCSIcizYCYCkuANUDhh9Q25X/8dzl1ar0DvsUr3suHvqI+KF 8rAgc40iqLlivatRUcTbNau72ZzxfL13UfCy2pT01Zzz3sC2P+Vc4b4Qr w==; X-CSE-ConnectionGUID: wTcMt2fHRyuyg7OPLHXuvg== X-CSE-MsgGUID: VvI9ZdjiSfGJa+fwC9ZkOg== X-IronPort-AV: E=McAfee;i="6700,10204,11304"; a="36088842" X-IronPort-AV: E=Sophos;i="6.12,288,1728975600"; d="scan'208";a="36088842" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2025 03:29:36 -0800 X-CSE-ConnectionGUID: jBZErxqVSmW1tQUPDzNn8Q== X-CSE-MsgGUID: B1kwv7fMRbWxHQJW49Yaig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,288,1728975600"; d="scan'208";a="106856287" Received: from lkp-server01.sh.intel.com (HELO d63d4d77d921) ([10.239.97.150]) by fmviesa004.fm.intel.com with ESMTP; 04 Jan 2025 03:29:33 -0800 Received: from kbuild by d63d4d77d921 with local (Exim 4.96) (envelope-from ) id 1tU2LT-000Asd-0p; Sat, 04 Jan 2025 11:29:31 +0000 Date: Sat, 4 Jan 2025 19:28:46 +0800 From: kernel test robot To: yangge1116@126.com, akpm@linux-foundation.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, 21cnbao@gmail.com, david@redhat.com, baolin.wang@linux.alibaba.com, hannes@cmpxchg.org, liuzixing@hygon.cn, yangge Subject: Re: [PATCH] mm: compaction: skip memory compaction when there are not enough migratable pages Message-ID: <202501041908.jDpLhAgL-lkp@intel.com> References: <1735981122-2085-1-git-send-email-yangge1116@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1735981122-2085-1-git-send-email-yangge1116@126.com> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A1A1F80009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+em7nsEI2R+JhHmoxBQwFWbmKFLPeiuUd3IBjneuAo+RPo2RS1trkMCHM6DWPwvWZL/aWGTWMz/+sP6jm6CC5bZDv37RLfYEN0v2143Pwq/W41AA4YX0ZnijgAN670wiZ8okq1vBLqZhYdspRovY3GQu6zNB5J94sm3WDlG6ExBUpF2Ni2CKJO5ufRJ3KdePL05tpQG708ifnAMJPhhfgoKCrLcr7KSat9fhL/c90cm1d+3cB/ZJeiwWubpeYgdUroB+WTI9EHVDGHtLEZtC9gfiy9ilK7FQWwlGySESN8+I4shWCPG9dT7CdfBVC2F+BerQVWCgySXsQOmrNVs+//V1RdJuPNO5YinSR48p8xCueU8KUNovZrWSF2VT0JnNOo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/yangge1116-126-com/mm-compaction-skip-memory-compaction-when-there-are-not-enough-migratable-pages/20250104-170112 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/1735981122-2085-1-git-send-email-yangge1116%40126.com patch subject: [PATCH] mm: compaction: skip memory compaction when there are not enough migratable pages config: i386-buildonly-randconfig-001-20250104 (https://download.01.org/0day-ci/archive/20250104/202501041908.jDpLhAgL-lkp@intel.com/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250104/202501041908.jDpLhAgL-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/202501041908.jDpLhAgL-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/compaction.c:15: include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 49 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/compaction.c:2386:13: warning: unused variable 'pgdat' [-Wunused-variable] 2386 | pg_data_t *pgdat = zone->zone_pgdat; | ^~~~~ 3 warnings generated. vim +/pgdat +2386 mm/compaction.c 2381 2382 static bool __compaction_suitable(struct zone *zone, int order, 2383 int highest_zoneidx, 2384 unsigned long wmark_target) 2385 { > 2386 pg_data_t *pgdat = zone->zone_pgdat; 2387 unsigned long sum, nr_pinned; 2388 unsigned long watermark; 2389 2390 sum = node_page_state(pgdat, NR_INACTIVE_FILE) + 2391 node_page_state(pgdat, NR_INACTIVE_ANON) + 2392 node_page_state(pgdat, NR_ACTIVE_FILE) + 2393 node_page_state(pgdat, NR_ACTIVE_ANON); 2394 2395 nr_pinned = node_page_state(pgdat, NR_FOLL_PIN_ACQUIRED) - 2396 node_page_state(pgdat, NR_FOLL_PIN_RELEASED); 2397 2398 /* 2399 * Gup-pinned pages are non-migratable. After subtracting these pages, 2400 * we need to check if the remaining pages are sufficient for memory 2401 * compaction. 2402 */ 2403 if ((sum - nr_pinned) < (1 << order)) 2404 return false; 2405 2406 /* 2407 * Watermarks for order-0 must be met for compaction to be able to 2408 * isolate free pages for migration targets. This means that the 2409 * watermark and alloc_flags have to match, or be more pessimistic than 2410 * the check in __isolate_free_page(). We don't use the direct 2411 * compactor's alloc_flags, as they are not relevant for freepage 2412 * isolation. We however do use the direct compactor's highest_zoneidx 2413 * to skip over zones where lowmem reserves would prevent allocation 2414 * even if compaction succeeds. 2415 * For costly orders, we require low watermark instead of min for 2416 * compaction to proceed to increase its chances. 2417 * ALLOC_CMA is used, as pages in CMA pageblocks are considered 2418 * suitable migration targets 2419 */ 2420 watermark = (order > PAGE_ALLOC_COSTLY_ORDER) ? 2421 low_wmark_pages(zone) : min_wmark_pages(zone); 2422 watermark += compact_gap(order); 2423 return __zone_watermark_ok(zone, 0, watermark, highest_zoneidx, 2424 ALLOC_CMA, wmark_target); 2425 } 2426 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki