Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3756243pxj; Mon, 7 Jun 2021 20:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG5I/VXMBIQG4Bea8pq2mIEpB962YgLUNoLFtJGqM535X28CJaHsaSg+IL4iOU/8uTqp98 X-Received: by 2002:aa7:d558:: with SMTP id u24mr23126225edr.331.1623122294799; Mon, 07 Jun 2021 20:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623122294; cv=none; d=google.com; s=arc-20160816; b=XCKN+SZbHZ2iu57lwjjq50Ys2mSKRAQL7PoHEU69IWSJU/PBJuu2sWTFAlJX+KjYgZ CekEy2qzR5Gwfb/jHt2Simbi3hQYV6jQJ/SwrVcIBCa7D+pflcZFKCkgpkHpMjbUgDrG b2iz6MUeC9V6Kje+Yuq3NPI2OLFttrBw4WOsewduHq8QSlF6b7YzavTyrzS7xDIFF36w R+8Wlk09URwGRNnBKJqfgNMoAOo6TQ35OCWs0tCwHtCy2iKtu4y10uQzNcIGr/Pg0zUX ZdSSe8v5w6miYwT+YjcG5K2GGD5M64PTg+ZpV/rppPdrpz+M3i4ny/Q2caGy2FZphhOT VrcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=E6lIczqSd/2csfngyDeFZqQNgKaAbpt5Jp4pgRSlIPg=; b=SLr7F4D3DrUrTFZXkUu7A+z0aqCWxfykITQIpCMHlUFLpGhaPqSsychLTPcJuuqhHt MnlkKpui5WKDIvSd6qGhvI1cR9aFItvMwAxJNkbElkeDxF1Oqsy/mPhVamqUeRCZ31uN 81+6XHyvOZSvk22H73v+2vfVYSMl7QVJvd9rJpMCuI8RU2i/LGOXWQxrGAnyyJsiMQyu iTW5nhkf9yeskHyLYvtkufO3GOI4SZfX0vhvjJQvudu4HcQdZT7uBW8ur/lJNmNjqr40 2vtND534r7Cw/qPyeFuPlY2ZSKfQWRNSkNuGw7T9nXAjo2tbX1SD/nhjTau08JHKhEf4 3Gvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si14415079edp.279.2021.06.07.20.17.50; Mon, 07 Jun 2021 20:18:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbhFHDQx (ORCPT + 99 others); Mon, 7 Jun 2021 23:16:53 -0400 Received: from mga12.intel.com ([192.55.52.136]:44667 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbhFHDQw (ORCPT ); Mon, 7 Jun 2021 23:16:52 -0400 IronPort-SDR: 7mP66wFXDQrJZ4l9HnXdizMuqkb14lGwlEIli7caZa7oWmuAS2kTKJ9YnkRj7DXQrAf8s4Z4d+ 6CGf7cVTRQIw== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="184448059" X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="184448059" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 20:15:00 -0700 IronPort-SDR: xk21ECQQo6o3Z9GqXtWVsBcywzmVaMXEWDNYfMVx3BmaN6M4K8ZULP63q5kAAn/1c+yANhHy0I DnSWJkwc5CVQ== X-IronPort-AV: E=Sophos;i="5.83,256,1616482800"; d="scan'208";a="447733233" Received: from shao2-debian.sh.intel.com (HELO [10.239.13.11]) ([10.239.13.11]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 20:14:57 -0700 Subject: Re: [kbuild-all] Re: kernel/rcu/tree.c:2073:23: warning: stack frame size of 2704 bytes in function 'rcu_gp_kthread' To: paulmck@kernel.org Cc: kernel test robot , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org References: <202106061253.0X2QKyyI-lkp@intel.com> <20210606044926.GJ4397@paulmck-ThinkPad-P17-Gen-1> <4696fe3d-a7ad-acae-686e-6295ca327737@intel.com> <20210607151939.GP4397@paulmck-ThinkPad-P17-Gen-1> From: Rong Chen Message-ID: Date: Tue, 8 Jun 2021 11:14:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20210607151939.GP4397@paulmck-ThinkPad-P17-Gen-1> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/7/21 11:19 PM, Paul E. McKenney wrote: > On Mon, Jun 07, 2021 at 05:18:21PM +0800, Rong Chen wrote: >> >> On 6/6/21 12:49 PM, Paul E. McKenney wrote: >>> On Sun, Jun 06, 2021 at 12:19:57PM +0800, kernel test robot wrote: >>>> Hi Paul, >>>> >>>> FYI, the error/warning still remains. >>>> >>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >>>> head: f5b6eb1e018203913dfefcf6fa988649ad11ad6e >>>> commit: 7dffe01765d9309b8bd5505503933ec0ec53d192 rcu: Add lockdep_assert_irqs_disabled() to raw_spin_unlock_rcu_node() macros >>>> date: 5 months ago >>>> config: powerpc-randconfig-r023-20210606 (attached as .config) >>>> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 551a697c5cf33275b66add4fc467fcf59084cffb) >>>> 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 >>>> # install powerpc cross compiling tool for clang build >>>> # apt-get install binutils-powerpc-linux-gnu >>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7dffe01765d9309b8bd5505503933ec0ec53d192 >>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >>>> git fetch --no-tags linus master >>>> git checkout 7dffe01765d9309b8bd5505503933ec0ec53d192 >>>> # save the attached .config to linux build tree >>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc >>>> >>>> If you fix the issue, kindly add following tag as appropriate >>>> Reported-by: kernel test robot >>>> >>>> All warnings (new ones prefixed by >>): >>>> >>>> In file included from kernel/rcu/tree.c:21: >>>> In file included from include/linux/kernel.h:12: >>>> In file included from include/linux/bitops.h:29: >>>> In file included from arch/powerpc/include/asm/bitops.h:62: >>>> arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] >>>> #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") >>>> ^ >>>> :310:9: note: previous definition is here >>>> #define __lwsync __builtin_ppc_lwsync >>>> ^ >>>>>> kernel/rcu/tree.c:2073:23: warning: stack frame size of 2704 bytes in function 'rcu_gp_kthread' [-Wframe-larger-than=] >>>> static int __noreturn rcu_gp_kthread(void *unused) >>> Does -rcu commit 2f20de99a63b ("rcu: Make rcu_gp_cleanup() be noinline >>> for tracing") help? >> Hi Paul, >> >> The stack frame size decreased to 2256 bytes: >> >>   kernel/rcu/tree.c:2129:23: warning: stack frame size of 2256 bytes in >> function 'rcu_gp_kthread' [-Wframe-larger-than=] > Very good, thank you! Does the following patch (in addition to that > commit) also help? Hi Paul, I applied the below patch on commit 2f20de99a63b and the warning is gone. Best Regards, Rong Chen > > Thanx, Paul > > ------------------------------------------------------------------------ > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 13bd8eee62bf..ef435aeac993 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -1737,7 +1737,7 @@ static void rcu_strict_gp_boundary(void *unused) > /* > * Initialize a new grace period. Return false if no grace period required. > */ > -static bool rcu_gp_init(void) > +static noinline bool rcu_gp_init(void) > { > unsigned long firstseq; > unsigned long flags; > @@ -1931,7 +1931,7 @@ static void rcu_gp_fqs(bool first_time) > /* > * Loop doing repeated quiescent-state forcing until the grace period ends. > */ > -static void rcu_gp_fqs_loop(void) > +static noinline void rcu_gp_fqs_loop(void) > { > bool first_gp_fqs; > int gf = 0;