Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2183373rwr; Fri, 28 Apr 2023 07:12:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5aG4GXaou89waMnlhpv6X+MD5RrGR7AHewPG0SdO3cn5LoGOR75fjCAYphXGzjvxqKgBH4 X-Received: by 2002:a05:6a00:23c1:b0:63d:3d08:4792 with SMTP id g1-20020a056a0023c100b0063d3d084792mr8674123pfc.32.1682691162398; Fri, 28 Apr 2023 07:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682691162; cv=none; d=google.com; s=arc-20160816; b=h27RbbpNpjsl+DDKanSeqoVwtk8KfxkVlxxxXEDLB5BVjhv5+SphRTTsBm3QmIV+4x EimBM/vZO09XnuDCBn2swVSizA6XHW4bHiDN+Khp4PjAxyIgDgchznJohCSSpRsVekdj A9D5KlMwcQ/Njr6PWZ7wTLv1sqjZi7Fw8+amOSgZoZ1bxhKH4ivB/AR5cDmEXP3P5ANh kBCf9iQpUKo6aFjNEuhTYF7yKN2+YiQJm5f1DVBzxWGHJ9z+TfWnwXs5mGhST//YnPmM gVkrt6s7nS2kIsGI4dRg5I90Lv/pV6YcjjcLPArkd9cJY5eoJusMOBGE3BU8RgEupg1+ /5yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=glT88Pf/HQkEt66QHhWOdaQxu6eOqlFN8oPn8DZI5m4=; b=RUgCv4qnYMBdEnx9KVClTse0jk4XX5KMf7BV4ujTK3OSFdUTcVFzfVzEsaK5Ds8CUs 8fORjqnbJ78IjLPlNhvjy+lks20w+RxpZPY9yhqdTiy75wD8F0CotsDBCKWaSxH5Hsof xCaKIjRWgN2c9w9W99t+dRyjdf3H0vxJBEPK4UKIBIcevH4g/xKLxDp2M28a3fi9cHRj JHfywFUOOFCbFJuOypPEArdcWc3hDbAUdZTL7qdgPLlHni0UoPzn7KU7hmkIT3YK8w9m zBsTGxQ1dFHKYe9vnppmjbzyDcocGOh23JDEHRK3FFYycSip4eX/NviE6kBgHiYSPtDt qNJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FDHzaaJr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 72-20020a63074b000000b0051b71bd43b9si22542580pgh.784.2023.04.28.07.12.30; Fri, 28 Apr 2023 07:12:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FDHzaaJr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346090AbjD1OGq (ORCPT + 99 others); Fri, 28 Apr 2023 10:06:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345631AbjD1OGj (ORCPT ); Fri, 28 Apr 2023 10:06:39 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 676E526A6 for ; Fri, 28 Apr 2023 07:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682690798; x=1714226798; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6U2Cuq5bNHHidqMCNuA2/bRalbQNJmzMDJcFmv3qNMA=; b=FDHzaaJrvU5CEwVFekmiM4HSKcFaC9eqxoTtMR3SRzJ1FVzy8PFL7FtS uBunp7tJrK6undiOjok5NQ+yAoJU5vQiHq90WDfEN6JMOVOd+XYTgV8Xc +nUZynnXXtN2K7YZo4l93lP3yBYSPquhgoPNlMX2A9wuGdxyfJGlY0fXZ zUShd9oT8diwtKWWZSLeyoEzce+G6wIQ3R3vw0LpI8DSf8jQWA77ZviUk IIcfus8E5cpjSw/y+IjgVZRnULL3rI2pzAocBI1eUAkjIQzNpZAYTgx4g yr5q0WTrym74eihVKha8mCqop6AszWXOAhSTE2+T/ct+oRY+Pdo9MBppJ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10694"; a="350668795" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="350668795" 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-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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