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 5E5F0C433EF for ; Fri, 22 Apr 2022 09:07:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D06606B0074; Fri, 22 Apr 2022 05:07:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CB5826B0075; Fri, 22 Apr 2022 05:07:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7CF86B0078; Fri, 22 Apr 2022 05:07:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id A5C106B0074 for ; Fri, 22 Apr 2022 05:07:46 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5E199F32 for ; Fri, 22 Apr 2022 09:07:46 +0000 (UTC) X-FDA: 79383937332.27.15CF006 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf25.hostedemail.com (Postfix) with ESMTP id 4A7E9A0033 for ; Fri, 22 Apr 2022 09:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650618465; x=1682154465; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jaQBEI9gtWcbNllBCZ+EzKEbzFVZLPK+E0m9hNofpRY=; b=aBhLyLwPAcnd3SUYayBGcMWAEFD0ufU3Mm6k3Ww8z4vC5kwqpPsPQ0B/ veWCxYLbNoaUoaQBlfKdYuV3RrywRMzXR45OBeevC6+8/VuIfiVJFtZA+ L/2+nH9E3arZSNIGz1tZ+zBA/0dHW02EBvOrZW66WX7Id+3S360FlWd3+ RZMyc/iu6c0AREP9NjA9GP0loeWq2/a1AZxBD2xK0BR1CG5jnQDiGCn9J vr8TA57QWtXzQlOv5yC2UGtHNdQIoM0oJ6vSeiCmtQbZnzJBBGtyjCqTl NsweOgTU0T2ja6tYrQJ+mtRSQc/JWdfAg1yT1FTUeTQFEYO39Q/ya0oqH w==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="251953461" X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="251953461" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 02:07:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="867315839" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by fmsmga005.fm.intel.com with ESMTP; 22 Apr 2022 02:07:38 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1nhpGL-0009xW-LC; Fri, 22 Apr 2022 09:07:37 +0000 Date: Fri, 22 Apr 2022 17:06:50 +0800 From: kernel test robot To: Song Liu , bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: kbuild-all@lists.01.org, ast@kernel.org, daniel@iogearbox.net, kernel-team@fb.com, akpm@linux-foundation.org, rick.p.edgecombe@intel.com, hch@infradead.org, imbrenda@linux.ibm.com, mcgrof@kernel.org, Song Liu , Christoph Hellwig Subject: Re: [PATCH bpf 2/4] page_alloc: use vmalloc_huge for large system hash Message-ID: <202204221628.82Qczjsq-lkp@intel.com> References: <20220422051813.1989257-3-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220422051813.1989257-3-song@kernel.org> X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4A7E9A0033 X-Stat-Signature: 7a33waejkm1jymo741pmjqpomf8i6oie Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aBhLyLwP; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf25.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.20) smtp.mailfrom=lkp@intel.com X-HE-Tag: 1650618461-224701 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 Song, I love your patch! Yet something to improve: [auto build test ERROR on bpf/master] url: https://github.com/intel-lab-lkp/linux/commits/Song-Liu/bpf_prog_pack-and-vmalloc-on-huge-page-fixes/20220422-133605 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master config: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220422/202204221628.82Qczjsq-lkp@intel.com/config) compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/239fb9ca743cf33db8d56df7957726e19aea87d5 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Song-Liu/bpf_prog_pack-and-vmalloc-on-huge-page-fixes/20220422-133605 git checkout 239fb9ca743cf33db8d56df7957726e19aea87d5 # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All error/warnings (new ones prefixed by >>): mm/page_alloc.c: In function 'alloc_large_system_hash': >> mm/page_alloc.c:8921:33: error: implicit declaration of function 'vmalloc_huge'; did you mean 'vmalloc_no_huge'? [-Werror=implicit-function-declaration] 8921 | table = vmalloc_huge(size, gfp_flags); | ^~~~~~~~~~~~ | vmalloc_no_huge >> mm/page_alloc.c:8921:31: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 8921 | table = vmalloc_huge(size, gfp_flags); | ^ cc1: some warnings being treated as errors vim +8921 mm/page_alloc.c 8876 8877 /* limit to 1 bucket per 2^scale bytes of low memory */ 8878 if (scale > PAGE_SHIFT) 8879 numentries >>= (scale - PAGE_SHIFT); 8880 else 8881 numentries <<= (PAGE_SHIFT - scale); 8882 8883 /* Make sure we've got at least a 0-order allocation.. */ 8884 if (unlikely(flags & HASH_SMALL)) { 8885 /* Makes no sense without HASH_EARLY */ 8886 WARN_ON(!(flags & HASH_EARLY)); 8887 if (!(numentries >> *_hash_shift)) { 8888 numentries = 1UL << *_hash_shift; 8889 BUG_ON(!numentries); 8890 } 8891 } else if (unlikely((numentries * bucketsize) < PAGE_SIZE)) 8892 numentries = PAGE_SIZE / bucketsize; 8893 } 8894 numentries = roundup_pow_of_two(numentries); 8895 8896 /* limit allocation size to 1/16 total memory by default */ 8897 if (max == 0) { 8898 max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4; 8899 do_div(max, bucketsize); 8900 } 8901 max = min(max, 0x80000000ULL); 8902 8903 if (numentries < low_limit) 8904 numentries = low_limit; 8905 if (numentries > max) 8906 numentries = max; 8907 8908 log2qty = ilog2(numentries); 8909 8910 gfp_flags = (flags & HASH_ZERO) ? GFP_ATOMIC | __GFP_ZERO : GFP_ATOMIC; 8911 do { 8912 virt = false; 8913 size = bucketsize << log2qty; 8914 if (flags & HASH_EARLY) { 8915 if (flags & HASH_ZERO) 8916 table = memblock_alloc(size, SMP_CACHE_BYTES); 8917 else 8918 table = memblock_alloc_raw(size, 8919 SMP_CACHE_BYTES); 8920 } else if (get_order(size) >= MAX_ORDER || hashdist) { > 8921 table = vmalloc_huge(size, gfp_flags); 8922 virt = true; 8923 if (table) 8924 huge = is_vm_area_hugepages(table); 8925 } else { 8926 /* 8927 * If bucketsize is not a power-of-two, we may free 8928 * some pages at the end of hash table which 8929 * alloc_pages_exact() automatically does 8930 */ 8931 table = alloc_pages_exact(size, gfp_flags); 8932 kmemleak_alloc(table, size, 1, gfp_flags); 8933 } 8934 } while (!table && size > PAGE_SIZE && --log2qty); 8935 8936 if (!table) 8937 panic("Failed to allocate %s hash table\n", tablename); 8938 8939 pr_info("%s hash table entries: %ld (order: %d, %lu bytes, %s)\n", 8940 tablename, 1UL << log2qty, ilog2(size) - PAGE_SHIFT, size, 8941 virt ? (huge ? "vmalloc hugepage" : "vmalloc") : "linear"); 8942 8943 if (_hash_shift) 8944 *_hash_shift = log2qty; 8945 if (_hash_mask) 8946 *_hash_mask = (1 << log2qty) - 1; 8947 8948 return table; 8949 } 8950 -- 0-DAY CI Kernel Test Service https://01.org/lkp