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 947DCC67861 for ; Tue, 9 Apr 2024 21:16:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1023B6B007B; Tue, 9 Apr 2024 17:16:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B2EA6B0082; Tue, 9 Apr 2024 17:16:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EBBCA6B0083; Tue, 9 Apr 2024 17:16:18 -0400 (EDT) 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 C968B6B007B for ; Tue, 9 Apr 2024 17:16:18 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5744FC0271 for ; Tue, 9 Apr 2024 21:16:18 +0000 (UTC) X-FDA: 81991251636.17.B9F04C3 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by imf02.hostedemail.com (Postfix) with ESMTP id 0FE7A8000B for ; Tue, 9 Apr 2024 21:16:14 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=RLlN0xNC; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 198.175.65.19 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=1712697375; 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=1Frb+H+G4Y2SHt7ZqylrJ51+QG9BzUXggrA71k9prL8=; b=SbmFaGFaMx18bQzk/Fwk334oOXeFRtUjvUaPk7yZYTaCJqnv0EsK/NOAMH57Xomab0ItjZ h8WA1/xDum2qS1UKC5znXWv7hLSMGuEOWqauO5iKbdfPLGoEEweZukr+8sWLXo7YxErMEO nZFG1wxEa/WLG7BQqZA+/ezwbXSLf24= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=RLlN0xNC; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf02.hostedemail.com: domain of lkp@intel.com designates 198.175.65.19 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712697375; a=rsa-sha256; cv=none; b=SCw/0qyaED71iqKpQSGSrjtqYngFxQ2wD+yeQSmOS3MBENYkuSnh7FjmgDnbZJ/HcMtvKa w2T0+p46czpDrOaUI7PNtNdQ7rae5tyfJm5dvbzc1J9Dn22DYXYvcQ2VktRqejxvwZ1yPg bwQYy856TStwqr8u+/mhVIh1OWk+hk0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712697376; x=1744233376; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=a6ygL+/fUwPck1ccv8s7ruzmTryeKbeD8k2zVjh+OOM=; b=RLlN0xNCYLuE0mXPOMFyT7g/0Uc0V1BFWyDtFLXwO+J8rcFxwwONzAW2 e5TgQOI4o794Qfg+XqZr2UMsQCKEjhGKpUxXGvUqRMAYIe8l5ZeOt4zO0 6B+Nu9VOLBcA6cUzFFzcpRe1/eCXXna7J7T/udEbIDLLH8HnLIDFn11Me eANdwWyXGwWW2eUB154FGGnKFHod8YTSgf1Mg2IJztugNIaLIYjRGgRn6 gBPCMnbgSBpa6SupgJc26j8AlkmR1wmknBwC0nZ+RzlDlMk9u7vjbVXPA yhpTbVDKppS7WgfEh/HXgzGaD2zhsmhKXU+5mvJgI1LEAGmA9vJZZFwQc w==; X-CSE-ConnectionGUID: n+/ZLm3zTTC4uvAdihOM+A== X-CSE-MsgGUID: T6oGIY/9RqKwwokB1AS5tQ== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="7907332" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="7907332" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2024 14:16:06 -0700 X-CSE-ConnectionGUID: 2twYPn6RTra1WZAfOA0uwA== X-CSE-MsgGUID: niUwqrdZQQy2XgiiTH0liw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="20454084" Received: from lkp-server01.sh.intel.com (HELO e61807b1d151) ([10.239.97.150]) by fmviesa008.fm.intel.com with ESMTP; 09 Apr 2024 14:16:02 -0700 Received: from kbuild by e61807b1d151 with local (Exim 4.96) (envelope-from ) id 1ruIoy-0006W0-1c; Tue, 09 Apr 2024 21:16:00 +0000 Date: Wed, 10 Apr 2024 05:15:01 +0800 From: kernel test robot To: Baolin Wang , vbabka@suse.cz Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, akpm@linux-foundation.org, baolin.wang@linux.alibaba.com, david@redhat.com, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@techsingularity.net, ying.huang@intel.com, ziy@nvidia.com Subject: Re: [PATCH] mm: page_alloc: consolidate free page accounting fix 3 Message-ID: <202404100519.mVXXF6kV-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 0FE7A8000B X-Stat-Signature: bwuu35869cmgfx4ntw9wbqiz9w5i1urj X-Rspam-User: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ucqzceaiX7hAxJ/GAEcpVYN9P/BE/jpiw9vERy7m0mwwywVGLT9o5t2aZrzKRlpAbIbQMIZF7g+ZIOpsOKw6ntC8qQQ3VKvsA9renigQmpit4Bv3lErM8CqITyGvhNG7FZ5zqOGvYx7TJFd6V6xAj0aCvmFz6U+Bkt4s6wCxFnKZq6G+FTbIroWALgxEuKvjrR+UKdI1AWSgSGv35u6vJIocFS8l9WDs1GoT6ttctilIYExDmqUmCv7UCA6YTDngZH0c0VHpshkxo8R4ZeKsRjN6DS8KCv4Ehh/WLpkDHNCkVZ+D8qg+DWHmFbjdtUdgBfGFfnFcTU7qd4MSyKkYB8zUWpAx4GShfSdO40Gkps7MLrp/YxO/ljIRBbk2ydqRw== 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: List-Subscribe: List-Unsubscribe: Hi Baolin, kernel test robot noticed the following build errors: url: https://github.com/intel-lab-lkp/linux/commits/UPDATE-20240409-154935/Johannes-Weiner/mm-page_alloc-remove-pcppage-migratetype-caching/20240321-020814 base: the 10th patch of https://lore.kernel.org/r/20240320180429.678181-11-hannes%40cmpxchg.org patch link: https://lore.kernel.org/r/a2a48baca69f103aa431fd201f8a06e3b95e203d.1712648441.git.baolin.wang%40linux.alibaba.com patch subject: [PATCH] mm: page_alloc: consolidate free page accounting fix 3 config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240410/202404100519.mVXXF6kV-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240410/202404100519.mVXXF6kV-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/202404100519.mVXXF6kV-lkp@intel.com/ All errors (new ones prefixed by >>): >> mm/page_alloc.c:808:54: error: too few arguments to function call, expected 4, have 3 808 | account_freepages(zone, -(1 << order), migratetype); | ~~~~~~~~~~~~~~~~~ ^ mm/page_alloc.c:645:20: note: 'account_freepages' declared here 645 | static inline void account_freepages(struct page *page, struct zone *zone, | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 646 | int nr_pages, int migratetype) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. vim +808 mm/page_alloc.c 759 760 /* 761 * Freeing function for a buddy system allocator. 762 * 763 * The concept of a buddy system is to maintain direct-mapped table 764 * (containing bit values) for memory blocks of various "orders". 765 * The bottom level table contains the map for the smallest allocatable 766 * units of memory (here, pages), and each level above it describes 767 * pairs of units from the levels below, hence, "buddies". 768 * At a high level, all that happens here is marking the table entry 769 * at the bottom level available, and propagating the changes upward 770 * as necessary, plus some accounting needed to play nicely with other 771 * parts of the VM system. 772 * At each level, we keep a list of pages, which are heads of continuous 773 * free pages of length of (1 << order) and marked with PageBuddy. 774 * Page's order is recorded in page_private(page) field. 775 * So when we are allocating or freeing one, we can derive the state of the 776 * other. That is, if we allocate a small block, and both were 777 * free, the remainder of the region must be split into blocks. 778 * If a block is freed, and its buddy is also free, then this 779 * triggers coalescing into a block of larger size. 780 * 781 * -- nyc 782 */ 783 784 static inline void __free_one_page(struct page *page, 785 unsigned long pfn, 786 struct zone *zone, unsigned int order, 787 int migratetype, fpi_t fpi_flags) 788 { 789 struct capture_control *capc = task_capc(zone); 790 unsigned long buddy_pfn = 0; 791 unsigned long combined_pfn; 792 struct page *buddy; 793 bool to_tail; 794 795 VM_BUG_ON(!zone_is_initialized(zone)); 796 VM_BUG_ON_PAGE(page->flags & PAGE_FLAGS_CHECK_AT_PREP, page); 797 798 VM_BUG_ON(migratetype == -1); 799 VM_BUG_ON_PAGE(pfn & ((1 << order) - 1), page); 800 VM_BUG_ON_PAGE(bad_range(zone, page), page); 801 802 account_freepages(page, zone, 1 << order, migratetype); 803 804 while (order < MAX_PAGE_ORDER) { 805 int buddy_mt = migratetype; 806 807 if (compaction_capture(capc, page, order, migratetype)) { > 808 account_freepages(zone, -(1 << order), migratetype); 809 return; 810 } 811 812 buddy = find_buddy_page_pfn(page, pfn, order, &buddy_pfn); 813 if (!buddy) 814 goto done_merging; 815 816 if (unlikely(order >= pageblock_order)) { 817 /* 818 * We want to prevent merge between freepages on pageblock 819 * without fallbacks and normal pageblock. Without this, 820 * pageblock isolation could cause incorrect freepage or CMA 821 * accounting or HIGHATOMIC accounting. 822 */ 823 buddy_mt = get_pfnblock_migratetype(buddy, buddy_pfn); 824 825 if (migratetype != buddy_mt && 826 (!migratetype_is_mergeable(migratetype) || 827 !migratetype_is_mergeable(buddy_mt))) 828 goto done_merging; 829 } 830 831 /* 832 * Our buddy is free or it is CONFIG_DEBUG_PAGEALLOC guard page, 833 * merge with it and move up one order. 834 */ 835 if (page_is_guard(buddy)) 836 clear_page_guard(zone, buddy, order); 837 else 838 __del_page_from_free_list(buddy, zone, order, buddy_mt); 839 840 if (unlikely(buddy_mt != migratetype)) { 841 /* 842 * Match buddy type. This ensures that an 843 * expand() down the line puts the sub-blocks 844 * on the right freelists. 845 */ 846 set_pageblock_migratetype(buddy, migratetype); 847 } 848 849 combined_pfn = buddy_pfn & pfn; 850 page = page + (combined_pfn - pfn); 851 pfn = combined_pfn; 852 order++; 853 } 854 855 done_merging: 856 set_buddy_order(page, order); 857 858 if (fpi_flags & FPI_TO_TAIL) 859 to_tail = true; 860 else if (is_shuffle_order(order)) 861 to_tail = shuffle_pick_tail(); 862 else 863 to_tail = buddy_merge_likely(pfn, buddy_pfn, page, order); 864 865 __add_to_free_list(page, zone, order, migratetype, to_tail); 866 867 /* Notify page reporting subsystem of freed page */ 868 if (!(fpi_flags & FPI_SKIP_REPORT_NOTIFY)) 869 page_reporting_notify_free(order); 870 } 871 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki