Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1777727pxm; Sun, 27 Feb 2022 02:45:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/ypwh+hyVxiJ5D6p1y+WNmIJAj/ZfPsxwR9W3RBm/Cx6nVY1hAXUe+LA7IuwqInS5kkq3 X-Received: by 2002:a63:f511:0:b0:378:3b1e:7600 with SMTP id w17-20020a63f511000000b003783b1e7600mr8439669pgh.247.1645958742024; Sun, 27 Feb 2022 02:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645958742; cv=none; d=google.com; s=arc-20160816; b=El9bdqA3SSxbmXqWSDcv01a+jT1DF7XlsHbfKb82614YxTlawIDPnoUAUWr8NH34yM Fn2Wa+av3xC60MnyJZ9CFhnsWcC4oxTiav+KQ9yfyVYr5tHMbE7RPJjSZDOkvEnsptkh pLQhXMpUTTcvI8zLlo7weQzISxptOnpr0Heai7Y2IxL8QzTbMovZcSs65rMYRpZfhg6W ve0WbfqZ1JpP0oTla8Q3QUg1ApN5My583nbneiotksXc6ElrDkNovQkp/vHM2pDCZgHz /F1a12hiuHVWOYrjUcXC4OV/u8CHKKEBRTodhH0OArA9ylf7Q7A2PVZI7au21sQjXAyl n2Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FgpB87FoSz1WmQ/uDxx7QjCu4GkKga6C7NlIiE83HBc=; b=CbzPPDXwvL1MfJz6hrVaMJ1pX36Bfw/V0MDKg2TrMcnuE9bAyAQYqupsgP0Ka9w9QC tNJX0/agqKfRaKxxB63FGwSrn0heHBNhUEasYjv8Xl9qkrZ1K1ubnxQe+Jo39VqJ7mS8 Mq4NXru1vmQ3cGI2VeEo1NXrw0U24Gw5s0c7gqvl9W5Knhgkw+TdiyIa6oCpfwZW+0f7 OokJZ2qmrb6IkKZ0kLUMAEVF8e+PZbvdAO30hzNsy7MsXMvpZcE/xaETmHcWJ4uVHr+r MFucXXIeSfeuQgkeIKDkUOltJZNE4OYRxqs8aXvoihpBkG2rfgo2adNXtCjrjBdSZk5w LSlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XfJvUwbp; 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 s1-20020a170902ea0100b0014d6bde583dsi6952246plg.188.2022.02.27.02.45.17; Sun, 27 Feb 2022 02:45:42 -0800 (PST) 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=XfJvUwbp; 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 S229935AbiB0KCQ (ORCPT + 99 others); Sun, 27 Feb 2022 05:02:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229922AbiB0KCN (ORCPT ); Sun, 27 Feb 2022 05:02:13 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BD025B8A3 for ; Sun, 27 Feb 2022 02:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645956097; x=1677492097; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DJ1kfd7SxR1+46Z6EvJQ3aQtuzdkv2EwULYwp8b8FNQ=; b=XfJvUwbpb7FdsLU7NULS2q08GnzTms8QXHZGzPv0rpRQGdcOt4Gs7Ea0 +kGMGADODJJ0NKiMwHngTRsXPGW99nNj+O1HuSGkIgTtbl/s6OCjUWsHR t54dX/FxVhm1gueGWgC9/VCkPbFN1s80DbG3AJxYk/WgOk2GBJ/+Vn6qY lk5PXHQq7pP/qDCkG/EIEBkpdukyCYK3E07V2rWPyx9ylVsfVOvNvNfWt 8diZkHLP3f+FaLvrJcj1EQXw9zbyPVwGkX74oYb7k0YsjYKRHyJTIUGTW Lu977blVXhW9utNseAfdS5JVfH+uvy6ob/UwYa2vRLzp8af3L/ExYrHLV Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10270"; a="339158592" X-IronPort-AV: E=Sophos;i="5.90,141,1643702400"; d="scan'208";a="339158592" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2022 02:01:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,141,1643702400"; d="scan'208";a="608165268" Received: from lkp-server01.sh.intel.com (HELO 788b1cd46f0d) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 27 Feb 2022 02:01:31 -0800 Received: from kbuild by 788b1cd46f0d with local (Exim 4.92) (envelope-from ) id 1nOGMs-0006Qr-W9; Sun, 27 Feb 2022 10:01:31 +0000 Date: Sun, 27 Feb 2022 18:00:46 +0800 From: kernel test robot To: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Vlastimil Babka Cc: kbuild-all@lists.01.org, David Rientjes , Christoph Lameter , Joonsoo Kim , Pekka Enberg , Roman Gushchin , Andrew Morton , Linux Memory Management List , patches@lists.linux.dev, linux-kernel@vger.kernel.org, Oliver Glitta , Faiyaz Mohammed , Dmitry Vyukov , Eric Dumazet , Jarkko Sakkinen , Johannes Berg , Yury Norov , Arnd Bergmann , James Bottomley , Matteo Croce , Marco Elver , Andrey Konovalov , Imran Khan , Zqiang , Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: Re: [PATCH] lib/stackdepot: Use page allocator if both slab and memblock is unavailable Message-ID: <202202271714.D69JHjzb-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_FMBLA_NEWDOM, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Hyeonggon, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.17-rc5 next-20220225] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Hyeonggon-Yoo/lib-stackdepot-Use-page-allocator-if-both-slab-and-memblock-is-unavailable/20220227-111029 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2293be58d6a18cab800e25e42081bacb75c05752 config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220227/202202271714.D69JHjzb-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/fd37f88eccc357002cc03a6a5fac60fb42552bc7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Hyeonggon-Yoo/lib-stackdepot-Use-page-allocator-if-both-slab-and-memblock-is-unavailable/20220227-111029 git checkout fd37f88eccc357002cc03a6a5fac60fb42552bc7 # save the config file to linux build tree mkdir build_dir make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> lib/stackdepot.c:187:32: sparse: sparse: incompatible types in comparison expression (different type sizes): >> lib/stackdepot.c:187:32: sparse: unsigned int * >> lib/stackdepot.c:187:32: sparse: unsigned long * vim +187 lib/stackdepot.c 168 169 /* 170 * __ref because of memblock_alloc(), which will not be actually called after 171 * the __init code is gone, because at that point slab_is_available() is true 172 */ 173 __ref int stack_depot_init(void) 174 { 175 static DEFINE_MUTEX(stack_depot_init_mutex); 176 177 mutex_lock(&stack_depot_init_mutex); 178 if (!stack_depot_disable && !stack_table) { 179 size_t size = (stack_hash_size * sizeof(struct stack_record *)); 180 int i; 181 182 if (slab_is_available()) { 183 pr_info("Stack Depot allocating hash table with kvmalloc\n"); 184 stack_table = kvmalloc(size, GFP_KERNEL); 185 } else if (totalram_pages() > 0) { 186 /* Reduce size because vmalloc may be unavailable */ > 187 size = min(size, PAGE_SIZE << (MAX_ORDER - 1)); 188 stack_hash_size = size / sizeof(struct stack_record *); 189 190 pr_info("Stack Depot allocating hash table with __get_free_pages\n"); 191 stack_table = (struct stack_record **) 192 __get_free_pages(GFP_KERNEL, get_order(size)); 193 } else { 194 pr_info("Stack Depot allocating hash table with memblock_alloc\n"); 195 stack_table = memblock_alloc(size, SMP_CACHE_BYTES); 196 } 197 198 if (stack_table) { 199 pr_info("Stack Depot hash table size=%u\n", stack_hash_size); 200 for (i = 0; i < stack_hash_size; i++) 201 stack_table[i] = NULL; 202 } else { 203 pr_err("Stack Depot hash table allocation failed, disabling\n"); 204 stack_depot_disable = true; 205 mutex_unlock(&stack_depot_init_mutex); 206 return -ENOMEM; 207 } 208 } 209 mutex_unlock(&stack_depot_init_mutex); 210 return 0; 211 } 212 EXPORT_SYMBOL_GPL(stack_depot_init); 213 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org