Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5218918imm; Tue, 12 Jun 2018 04:39:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI278PiOZv9xeKPSfzVvydNdFNdiZLLGEq5HyOd3wLvk8JsxgzHWhGVH14YRvNaHsyPHpCO X-Received: by 2002:a17:902:1347:: with SMTP id r7-v6mr32298ple.62.1528803573544; Tue, 12 Jun 2018 04:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528803573; cv=none; d=google.com; s=arc-20160816; b=0Bn/SyFQ3HCj8LhVN0qJtxYLTdV8iVKnpfpKXIiIU3vsRWWXL41HYg0K53lc2GosvL kiMwZ8SOL1EBDGp5CogwHkscL9OVqy8GtEkQwfZUMYAOR+A7Dy4y6ej3LL49S/oBVf5n GW/LQ6fCw2qv56fRlrr5chTiML80MdVH/2yHH8C3Np2m+h9Ho4aKK6dIjc0tw1ZsjHPI lrntV3V8vby3qDz9MFH7leLNkzjrTryo+aQwuYRZHtvJErzzHh5naqM/6BwhJus4ZKmc OMDC3JGmNl/noEZGPPyGxVQbYKJqiAV5GvVqZYYsVOHm/H8xXbCeC3tVShOYZteTmMaG 4/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=H4X4PY3Sh28vECDqqehlSB7B/FJezuV4Z7/PKtArjS0=; b=AbqJ0ZFNSR7zhVlrMWTXTUAT8oJzs0JQAxvFNU9M8yBeEcSV0O0RQhtHlKlM7jnspA 25uJewHhgTUftL+eICAbvDBZJvuVkGHV2E++8JZWg9Mm1TKXo7GrCc7ndz7iCXAeKjrM E1qJOL5hEijJeZro4VesgT2a8Kynl23zekL5ZnlmHiIc0J2AWcuh6a47tH6BNgIKzogr 3QFBjcVfJH0W36qZu8r6evUyhXUUp//GDOVIzgFzyiyyrpwz6DckcgoBn4djj3UoUjnL EUlZpn7XdNvGDDXpmChH6crvoKfE08t98qXLGRvGnJbyGrvFSa2uG/ewevcAR+uW+U24 /3NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si661501pfk.93.2018.06.12.04.39.18; Tue, 12 Jun 2018 04:39:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754315AbeFLLiy convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Jun 2018 07:38:54 -0400 Received: from mout.gmx.net ([212.227.17.22]:54077 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753915AbeFLLiw (ORCPT ); Tue, 12 Jun 2018 07:38:52 -0400 Received: from [172.17.45.7] ([122.224.77.194]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MYsEZ-1fntft24lH-00Vcrv; Tue, 12 Jun 2018 13:38:03 +0200 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: [RESEND PATCH] x86: remove redundant check for kmem_cache_create() From: "cgxu519@gmx.com" In-Reply-To: <201806121906.PXavKo7M%fengguang.wu@intel.com> Date: Tue, 12 Jun 2018 19:37:43 +0800 Cc: "cgxu519@gmx.com" , kbuild-all@01.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <1528798609-111951-1-git-send-email-cgxu519@gmx.com> <201806121906.PXavKo7M%fengguang.wu@intel.com> To: kbuild test robot X-Mailer: Apple Mail (2.3445.6.18) X-Provags-ID: V03:K1:NmwVc4OftpJrSbGbJ26n9RMLIqVMnmrGHksWGJvaDZ8HWwHvJyL 0iS6vlpcR0gUU9/tQiQF7dFc5M+45tATzoaoU6EhuCVdDjdaxjGCx9tvJ9APhHSDBSHQ7ZB hZoz0ecW6MpYnlOZ3YZwWrFsTcn/DJ74/0jS9Xbkp/T4vuumWzN2LV4erxpS9pyJeJbwO1W vuZ7pPp5arPwmDzAUh4Rg== X-UI-Out-Filterresults: notjunk:1;V01:K0:RigYA+bwwwk=:6aIdN/W6Tnsj5S09aH2ALG da4BILoSLFLIGfClx18OIHqV6C7YfY3S6shrTJMpCkXEgh6P1w8U2YZnYqyVJvmb0C/2OF+BE CQxQ1HDdt5nqPz4GVxavuhSmU8dN+xJLZ+OhzO9cXrmgMeW53+qvCwASwpDoSpdqgWp+pQfpu ctl3u5sLIzTPJLGvPcuNfOe1x2aFGAiyMWUc5o+0IXPe2QqYPsEFyD87zFULuV/ZBswTkuhU5 2TVxO7hOlIUu9M9s4vZsyo8iKFs7jaC0MSRHf6BfdYBwB9q89s8vvoNKg0qoys3vb/ealAyg6 aUnxXG7lkfQLWUVEMwefbByferKmxrDARVJkl5uFUZAuZk/E3LHHoC5DlA8Sl4PYVMRpE8Fam n7rhpZMF6J6ulmx1LN+6arHl3d8EhWWCaAdjbzbVAWuEqKiTk2ga6iitaH1VeXodmrmAHvQY2 FUy4THpd3MTTiLvSIwUuIYgCRBMDDlzuM5ufKGGfLLvMyNdWu5o62ACHsXyqlW7QNWts3evEP CseTyG4heJ5Sj8OgyaVnWBVv06QjNct7anO0oO8ZAaXd5Mi34GP/S4Ut2RanzDIQLUoNlinhr ZDHWF1SO+mfNJUicx0imCADApX1H1vUoXt8ZeuFkJJ5ApPpiFQPrA4VnXeYt2bDsQOd18tGcO i3A17clWXgu4bWzsovs6I/f1lLVifkXsVXpCHGKv1pzcHSaDq9lyDgENWf61+UW4hcd5iIeSX YFcbECuKrpZ3mcdvtKS191NPdTzsK6pCUCwr8Z6NIA+7lM19isPBx9h+8VmPDg/qEHB4ZUhUM KM+vcNA Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So still need to keep return type as int, I??ll fix in V2. Thanks. > ?? 2018??6??12?գ?????7:27??kbuild test robot д???? > > Hi Chengguang, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on tip/x86/core] > [also build test WARNING on v4.17 next-20180612] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Chengguang-Xu/x86-remove-redundant-check-for-kmem_cache_create/20180612-182134 > config: i386-randconfig-a1-201823 (attached as .config) > compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All warnings (new ones prefixed by >>): > > In file included from include/linux/printk.h:5:0, > from include/linux/kernel.h:13, > from include/asm-generic/bug.h:15, > from arch/x86/include/asm/bug.h:81, > from include/linux/bug.h:4, > from include/linux/mmdebug.h:4, > from include/linux/mm.h:8, > from arch/x86/mm/pgtable.c:1: >>> arch/x86/mm/pgtable.c:327:15: warning: initialization from incompatible pointer type > core_initcall(pgd_cache_init); > ^ > include/linux/init.h:166:58: note: in definition of macro '__define_initcall' > __attribute__((__section__(".initcall" #id ".init"))) = fn; > ^ > arch/x86/mm/pgtable.c:327:1: note: in expansion of macro 'core_initcall' > core_initcall(pgd_cache_init); > ^ > > vim +327 arch/x86/mm/pgtable.c > > 1db491f7 Fenghua Yu 2015-01-15 308 > d524db50 Chengguang Xu 2018-06-12 309 static void __init pgd_cache_init(void) > 1db491f7 Fenghua Yu 2015-01-15 310 { > 1db491f7 Fenghua Yu 2015-01-15 311 /* > 1db491f7 Fenghua Yu 2015-01-15 312 * When PAE kernel is running as a Xen domain, it does not use > 1db491f7 Fenghua Yu 2015-01-15 313 * shared kernel pmd. And this requires a whole page for pgd. > 1db491f7 Fenghua Yu 2015-01-15 314 */ > 1db491f7 Fenghua Yu 2015-01-15 315 if (!SHARED_KERNEL_PMD) > d524db50 Chengguang Xu 2018-06-12 316 return; > 1db491f7 Fenghua Yu 2015-01-15 317 > 1db491f7 Fenghua Yu 2015-01-15 318 /* > 1db491f7 Fenghua Yu 2015-01-15 319 * when PAE kernel is not running as a Xen domain, it uses > 1db491f7 Fenghua Yu 2015-01-15 320 * shared kernel pmd. Shared kernel pmd does not require a whole > 1db491f7 Fenghua Yu 2015-01-15 321 * page for pgd. We are able to just allocate a 32-byte for pgd. > 1db491f7 Fenghua Yu 2015-01-15 322 * During boot time, we create a 32-byte slab for pgd table allocation. > 1db491f7 Fenghua Yu 2015-01-15 323 */ > 1db491f7 Fenghua Yu 2015-01-15 324 pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN, > 1db491f7 Fenghua Yu 2015-01-15 325 SLAB_PANIC, NULL); > 1db491f7 Fenghua Yu 2015-01-15 326 } > 1db491f7 Fenghua Yu 2015-01-15 @327 core_initcall(pgd_cache_init); > 1db491f7 Fenghua Yu 2015-01-15 328 > > :::::: The code at line 327 was first introduced by commit > :::::: 1db491f77b6ed0f32f1d4a3ac40a5be9524f1914 x86/mm: Reduce PAE-mode per task pgd allocation overhead from 4K to 32 bytes > > :::::: TO: Fenghua Yu > :::::: CC: Ingo Molnar > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation > <.config.gz>