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 X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E818C433ED for ; Fri, 2 Apr 2021 00:48:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F366661130 for ; Fri, 2 Apr 2021 00:48:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233803AbhDBAs6 (ORCPT ); Thu, 1 Apr 2021 20:48:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:42158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233258AbhDBAs5 (ORCPT ); Thu, 1 Apr 2021 20:48:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D76C60FDC; Fri, 2 Apr 2021 00:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617324537; bh=KfXoY1mgwJmxb+bJhkOwC+Nz3gGAstOSDTpNN6B9UyU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=bfpWsQHy3884cLMaRILUIICATovsQQtSMe8FLC/Oso+emczJHIUgSelegfGAHCSPc bn7HUMdaLlM/WHks6z/XBoNX5LF803F9znhh6HHhWsm0KNNvrcSnxjz7DLrz+TgEnl gFpB8M7+DNTxpcwouSK64mhaMxnK7BYmxel2bQwjlTZnYJfb0JAAWDKh4LDtKacXpu aV0f3PqKZjA9fyJ5QSRkanGjwh9sEWRonG2e9fFjdFR5TWh5rAZglCoLRtp69kKl3i EnGZVqAr5WQTxpeu3bAdYXC4DC1YA2ZVBqsF62i7h7ExZR31pF7iWHZhtgfnH6v42l ALpHRZa/VQ/Wg== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id D031B3523A03; Thu, 1 Apr 2021 17:48:56 -0700 (PDT) Date: Thu, 1 Apr 2021 17:48:56 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: LKML , Uladzislau Rezki , Boqun Feng , Lai Jiangshan , Neeraj Upadhyay , Josh Triplett , Joel Fernandes Subject: Re: [PATCH 1/3] srcu: Remove superfluous ssp initialization on deferred work queue Message-ID: <20210402004856.GM2696@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20210401234704.125498-1-frederic@kernel.org> <20210401234704.125498-2-frederic@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210401234704.125498-2-frederic@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 02, 2021 at 01:47:02AM +0200, Frederic Weisbecker wrote: > When an ssp has already started a grace period and queued an early work > to flush after SRCU workqueues are created, we expect the ssp to be > properly initialized already. So we can skip this step at this stage. > > Signed-off-by: Frederic Weisbecker > Cc: Boqun Feng > Cc: Lai Jiangshan > Cc: Neeraj Upadhyay > Cc: Josh Triplett > Cc: Joel Fernandes > Cc: Uladzislau Rezki > --- > kernel/rcu/srcutree.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c > index 036ff5499ad5..7197156418e4 100644 > --- a/kernel/rcu/srcutree.c > +++ b/kernel/rcu/srcutree.c > @@ -1396,7 +1396,6 @@ void __init srcu_init(void) > while (!list_empty(&srcu_boot_list)) { > ssp = list_first_entry(&srcu_boot_list, struct srcu_struct, > work.work.entry); > - check_init_srcu_struct(ssp); You lost me on this one. What happens if the only pre-initialization invocation on the statically allocated srcu_struct pointed to by ssp was call_srcu()? I am not seeing how the initialization has already happened in that case. What am I missing here? Thanx, Paul > list_del_init(&ssp->work.work.entry); > queue_work(rcu_gp_wq, &ssp->work.work); > } > -- > 2.25.1 >