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 24361C77B61 for ; Fri, 28 Apr 2023 14:06:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8185E6B0071; Fri, 28 Apr 2023 10:06:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C9076B0072; Fri, 28 Apr 2023 10:06:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 691936B0074; Fri, 28 Apr 2023 10:06:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 591596B0071 for ; Fri, 28 Apr 2023 10:06:43 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 13C421C65E3 for ; Fri, 28 Apr 2023 14:06:43 +0000 (UTC) X-FDA: 80730975486.25.2F82C55 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf02.hostedemail.com (Postfix) with ESMTP id A65778001C for ; Fri, 28 Apr 2023 14:06:39 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=kArN1UGW; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 134.134.136.65 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=1682690799; 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=glT88Pf/HQkEt66QHhWOdaQxu6eOqlFN8oPn8DZI5m4=; b=sbSbOdaAY7ezX8tCGl6LtHrRTg2xrh92gtOXXrFtP0//6ByJuGN1qh46mOEKIXLkuvp6NE I1crNTg6ZAkkK+vKyqAoPnTSQYxt3PzdkvuiB0/IOGDodMX0l0u69GgXvNt/125Kk3OGTd scjZz4F0E5Sch/TApAhWBnvwSGoRfQ4= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=kArN1UGW; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 134.134.136.65 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=1682690799; a=rsa-sha256; cv=none; b=kJJNqFKdJe8gtt0TQvywK9RQbtkDzYswt5wRslMGiy0PGRglqe0uiSzRXQnMpusPZveRio JqViFv1w/mkcJgAUGXcHs5Tqd2djca5kSYLHE8NruD9Xb0OyjYq53fF9HBCShkfGLLxALY r/BDg+WJOmBBwOS39o/4Bv17pb0FwFU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682690799; x=1714226799; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6U2Cuq5bNHHidqMCNuA2/bRalbQNJmzMDJcFmv3qNMA=; b=kArN1UGWZsu+yhcTVllxUPjvdRoLIc5SbCvGPWC+kZ4eG4S97YIqg4IB 4H565Ii4MSeuSKKQZ9i3o9p/nsmtEiF6ac97CktBCZUjbgQ2fTaXI9IuM 1a/3fjA12+NL7Z2jXjjGgp3qO13AYtGcAvV28/u1FiD5xgs3FUr4cKNCX Fs3894ix2cCSkAREPBqoKzLI+iTWQaulzDpQv4VWK0dHceGFojxsGLOA3 VtEMzvQ6T6HMh0VLH6oqPfPAx6Bbwp5FeB1yznIa19cbokWPzedkdVtKN p8Dx3erOtudDjYH4ESiyErtyTKeZkYv3AXumCQQABbRPebvD/qCkLOBfm g==; X-IronPort-AV: E=McAfee;i="6600,9927,10694"; a="350668797" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="350668797" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2023 07:06:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10694"; a="1024607857" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="1024607857" Received: from lkp-server01.sh.intel.com (HELO 5bad9d2b7fcb) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 28 Apr 2023 07:06:35 -0700 Received: from kbuild by 5bad9d2b7fcb with local (Exim 4.96) (envelope-from ) id 1psOk6-0000Tx-14; Fri, 28 Apr 2023 14:06:34 +0000 Date: Fri, 28 Apr 2023 22:05:48 +0800 From: kernel test robot To: "zhaoyang.huang" , Andrew Morton , Roman Gushchin , linux-kernel@vger.kernel.org, Zhaoyang Huang , ke.wang@unisoc.com Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [PATCH] mm: optimization on page allocation when CMA enabled Message-ID: <202304282107.O93rPndb-lkp@intel.com> References: <1682679641-13652-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1682679641-13652-1-git-send-email-zhaoyang.huang@unisoc.com> X-Stat-Signature: 9bnj99ntuerwdtbz7eq3r9mgktk6byac X-Rspam-User: X-Rspamd-Queue-Id: A65778001C X-Rspamd-Server: rspam06 X-HE-Tag: 1682690799-764955 X-HE-Meta: U2FsdGVkX1+4iRAvatT7J+C6gDYXC1mZUEFE799FcLVuoh2WxeX8hWtBsftTsKvhOmjxCy91cIKI8MmPRKTAf4PSgYckuigoRbdkXMtWb7B/G5+SP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lIo+lCDB4xsxzjKdpU0QGc4/EyI4KJIEW6n/wSzUieSDJIAD5hhFvjXBOvMh0Bo1fj/Xwpi/sit2yXyHjn1zkfyqi56RQ/nbd1gzdccrPvwbsmA3Ez46hTj7oGIXvVslK+aAxgKnyB6lmg+AczV7rt+R5zoA0m1fvNMECgt8hz6FZJYKgwtWbdUx7U8QfLdlLohVuP5ztFMRgQj4j1Jj3hCIZqXbDC0KhwYVMM8xOnE= 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 zhaoyang.huang, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/zhaoyang-huang/mm-optimization-on-page-allocation-when-CMA-enabled/20230428-190140 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/1682679641-13652-1-git-send-email-zhaoyang.huang%40unisoc.com patch subject: [PATCH] mm: optimization on page allocation when CMA enabled config: nios2-randconfig-r003-20230428 (https://download.01.org/0day-ci/archive/20230428/202304282107.O93rPndb-lkp@intel.com/config) compiler: nios2-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/dbda57eee661a0c9b47f23720bcc9741495d00a5 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review zhaoyang-huang/mm-optimization-on-page-allocation-when-CMA-enabled/20230428-190140 git checkout dbda57eee661a0c9b47f23720bcc9741495d00a5 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304282107.O93rPndb-lkp@intel.com/ All errors (new ones prefixed by >>): mm/page_alloc.c: In function '__rmqueue': >> mm/page_alloc.c:2328:42: error: implicit declaration of function '__if_use_cma_first' [-Werror=implicit-function-declaration] 2328 | bool cma_first = __if_use_cma_first(zone, order, alloc_flags); | ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/__if_use_cma_first +2328 mm/page_alloc.c 2277 2278 #ifdef CONFIG_CMA 2279 static bool __if_use_cma_first(struct zone *zone, unsigned int order, unsigned int alloc_flags) 2280 { 2281 unsigned long cma_proportion = 0; 2282 unsigned long cma_free_proportion = 0; 2283 unsigned long watermark = 0; 2284 unsigned long wm_fact[ALLOC_WMARK_MASK] = {1, 1, 2}; 2285 long count = 0; 2286 bool cma_first = false; 2287 2288 watermark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK); 2289 /*check if GFP_MOVABLE pass previous watermark check via the help of CMA*/ 2290 if (!zone_watermark_ok(zone, order, watermark, 0, alloc_flags & (~ALLOC_CMA))) 2291 { 2292 alloc_flags &= ALLOC_WMARK_MASK; 2293 /* WMARK_LOW failed lead to using cma first, this helps U&R stay 2294 * around low when being drained by GFP_MOVABLE 2295 */ 2296 if (alloc_flags <= ALLOC_WMARK_LOW) 2297 cma_first = true; 2298 /*check proportion for WMARK_HIGH*/ 2299 else { 2300 count = atomic_long_read(&zone->managed_pages); 2301 cma_proportion = zone->cma_pages * 100 / count; 2302 cma_free_proportion = zone_page_state(zone, NR_FREE_CMA_PAGES) * 100 2303 / zone_page_state(zone, NR_FREE_PAGES); 2304 cma_first = (cma_free_proportion >= wm_fact[alloc_flags] * cma_proportion 2305 || cma_free_proportion >= 50); 2306 } 2307 } 2308 return cma_first; 2309 } 2310 #endif 2311 /* 2312 * Do the hard work of removing an element from the buddy allocator. 2313 * Call me with the zone->lock already held. 2314 */ 2315 static __always_inline struct page * 2316 __rmqueue(struct zone *zone, unsigned int order, int migratetype, 2317 unsigned int alloc_flags) 2318 { 2319 struct page *page; 2320 2321 if (IS_ENABLED(CONFIG_CMA)) { 2322 /* 2323 * Balance movable allocations between regular and CMA areas by 2324 * allocating from CMA when over half of the zone's free memory 2325 * is in the CMA area. 2326 */ 2327 if (migratetype == MIGRATE_MOVABLE) { > 2328 bool cma_first = __if_use_cma_first(zone, order, alloc_flags); 2329 page = cma_first ? __rmqueue_cma_fallback(zone, order) : NULL; 2330 if (page) 2331 return page; 2332 } 2333 } 2334 retry: 2335 page = __rmqueue_smallest(zone, order, migratetype); 2336 if (unlikely(!page)) { 2337 if (alloc_flags & ALLOC_CMA) 2338 page = __rmqueue_cma_fallback(zone, order); 2339 2340 if (!page && __rmqueue_fallback(zone, order, migratetype, 2341 alloc_flags)) 2342 goto retry; 2343 } 2344 return page; 2345 } 2346 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests