Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3343642pxj; Mon, 7 Jun 2021 08:22:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZVEaJXqB/1R3heP0Nppe5jXSJcpeNxSjaXQpv9HEd5W5R7fYOLvcMYhyLo1nZf6ygZKb3 X-Received: by 2002:a17:907:1de6:: with SMTP id og38mr17237909ejc.471.1623079371605; Mon, 07 Jun 2021 08:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623079371; cv=none; d=google.com; s=arc-20160816; b=gPou1BUyNhk6mIe/diulX+4ExLBWixjGKygiOeJlj7yCFec8PoJ/QBGAV0fifBQTKC b82ZowFw0m/SfRZLl/Ppl5DpkzcuGHDRE30BsO6stE6cdJqhrvYQSLYKN51QMBo2OX4N bquGIoBJ1FGY9jn27Tm0wWPBcKEldG8bRCvyvitC/lUVmh67eMaIWoznoakwtJ0BNAnz F5kzELfDWaR0BnBcCU0DFzOquKjMfghaMy6szgccjMoBZ+56bqwryEd4ns2RWkkwj5I8 FXPCCAI4aJh+I4nfLWhYgzg/w0cy4eG95O+kB1hPDbEAhQkOKm2ShADlkxFZgXIbVyUl tAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=0K1W9LgoJwGPhiUg95dolULdtCtpdNxlaD7DaQG5JnM=; b=NbTz25B5mFnpjWtPsM7saY0rxIlprE82AxLgkqAIqKZRScO+RWRxeOlZ5yfZkj2ACe Pj4zD1aWwiHkgByQtCQb3loMQk+H1c3LQmr3W1ba475F1+SFFH6nojDLYv+6ZOmttdkW E1jG0R6aAwlbiClTFEdWUMCjODwMm2wJ0WcPefn+WooSsGXn1MoBCUNAAo9SXQNBRtVy HmEy8qjwcuKZYCHOL4MkNRqKE+e0Pc/fkpqeiaSpuGCx8HMx14lqVnBs8p0AJCXMKRKa GEefYebAlcqVhk2eBreDR7RbTFCTrI3g7ySKmM4ETM7uGK1hKqWGEbHYoEUkXxd3VNrP V/JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZIPoT4F7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a24si12292378ejy.602.2021.06.07.08.22.29; Mon, 07 Jun 2021 08:22:51 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZIPoT4F7; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230291AbhFGPVb (ORCPT + 99 others); Mon, 7 Jun 2021 11:21:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:58372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbhFGPVa (ORCPT ); Mon, 7 Jun 2021 11:21:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 95C6460C3D; Mon, 7 Jun 2021 15:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623079179; bh=gRAx/lJY4XGf/yyqlKLAwN3sna6sTnL3Tq8JWuaEA3E=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=ZIPoT4F7Afpqi3r0ZlxDdxZKpvJ2Hwc6OL5WoCMbfHaxQIYh7jj5cAq9JoFymhdXR +Ekst7rUle0ROh6Qebb2eeIRWwS28F9K6TfRmVOnpyeKSdbNM78WRqdydEHFgr4TCA UatqMH7wJdNBDXFIbZGCk7XFn4vvygFUA7oJlJQvUDqNsyzKjE5iwAij4mowP7GvvK NW+duj8QpsjFfp/hPk49oDHAKJk4icAbWaNWAuxBX6Yq0IxdkSZhKeDCjxciMDVPLQ Hapjonkhoqp3nlD/SMCWy4lsANaNQWCXD/zlclbDOEUiO3fCQWMSYey9FLofvD30a+ 00BH3HMoHwDnQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 5EE645C0395; Mon, 7 Jun 2021 08:19:39 -0700 (PDT) Date: Mon, 7 Jun 2021 08:19:39 -0700 From: "Paul E. McKenney" To: Rong Chen Cc: kernel test robot , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [kbuild-all] Re: kernel/rcu/tree.c:2073:23: warning: stack frame size of 2704 bytes in function 'rcu_gp_kthread' Message-ID: <20210607151939.GP4397@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <202106061253.0X2QKyyI-lkp@intel.com> <20210606044926.GJ4397@paulmck-ThinkPad-P17-Gen-1> <4696fe3d-a7ad-acae-686e-6295ca327737@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4696fe3d-a7ad-acae-686e-6295ca327737@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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;