Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2143932rwn; Fri, 16 Sep 2022 06:22:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7dmN8RAFR50VPvHNlrFK6YABZfyB3qIsZvcszDd473hJGAkbvpn7avC2+qE/oijR+UdJRv X-Received: by 2002:a17:907:7f91:b0:77f:c4c7:9155 with SMTP id qk17-20020a1709077f9100b0077fc4c79155mr3586646ejc.476.1663334556975; Fri, 16 Sep 2022 06:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663334556; cv=none; d=google.com; s=arc-20160816; b=ti6Pmg7XYy7aQJByZPpY2GAuuTphdOB26cStv2/dZe5JC/BB7AKCsRmtowZuxPevAa 1Sm0xup7LN5CAfOhJd+nFC+usHv529V+tLISKFKy9jY1O+S4112njnxAD1EY9PDVhBpY MLdSERcuD4WVch1MHA3aiARJUDlMYasm2BBeayRr0w2jCSMMmvNL03mPZ4pk2Dw9MmSz pkcRtrf1ir67lxJjKDZKl8PHsbvsyzNuGP9HHuN3BDeEuR2thF7gDx4dhAKn42Qvof3y aycXPCUrEr0JdggxRj5oYIAFTS5O5Hh3M4RtLjoTaVFgo0gRbSvpqQ0LSwrx4IlgHIK3 B9DQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LEZvBCtK/ZI0W8gswfffDRv6Of2gZ3JsxhgatAQSIQA=; b=e+jogZYOPlI2Ic1oxr2UH/Iq3RySQtrtYGofofuh+/sbuWI/qB2YofStw0iCHUq01f yQTSeQhLU7u3NDl1C4lF6bvSlyY70puyRmMDKDOcO7pQ1OrDi6IjBBKYY1CWVPyGjNv0 mF1do9tpfxrUyLMjBIThYWxKV0LZjWmX3EyqsCXFqfhMXV05zK0WeyeykmtRZ/R39LoC jXLDUmXAUmEWhTSMidOKngx597onp/P+wMEmPCBkYFZP8NulHemPNLqJvsqjEnXW3TWa EBuCiBBQ+QMI7zROJV4M4YqicxUrhrOGRx6igcP+woZuOdPkM7FGxfrw8+iyTrd9rIGs BaTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DWatUGiG; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a1709065d1000b0077fdd87a7dfsi10391247ejt.914.2022.09.16.06.22.09; Fri, 16 Sep 2022 06:22:36 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=DWatUGiG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbiIPMvq (ORCPT + 99 others); Fri, 16 Sep 2022 08:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbiIPMvo (ORCPT ); Fri, 16 Sep 2022 08:51:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29DC5AB04E; Fri, 16 Sep 2022 05:51:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C061962B81; Fri, 16 Sep 2022 12:51:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91040C433D6; Fri, 16 Sep 2022 12:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663332703; bh=syr2iOZ8WLAe2Icyqy1ThqP3eS6SIEsErM11Ey6B3rg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DWatUGiGP06fAQsLcj/fzno2Sad3MZYajIeoz8YDh58G7mP2mVRap6D3P6WXQ5M+T cC+2fg22SkYbre5HxjEf/rLLlV9AOBUQTX8h2S5BvtvKwWMkDDFC5SgQkCMprWrBfZ Gj0s/M4NUmVN9AA4ZArIhb/2EmK5WHH813gbWr805QiZfq+TUwr7mQWuVa0TG3IFCJ 4Y0hIY5w8FXxHXgwyB6JM16UoyZK0FqUdSw4xie1d23IjNkQlmUt7vQCC8iHR26JXA u99DMwUqBwfRBXtbhbLBSFPKctBo48OhxWDoZC/JFkKlGJH8PRR1p21WdhzOx5QiJM WDiOtv38F6ASA== Date: Fri, 16 Sep 2022 14:51:39 +0200 From: Frederic Weisbecker To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , Neeraj Upadhyay , "Paul E. McKenney" , rcu@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH rcu/next 3/3] rcu: Fix late wakeup when flush of bypass cblist happens Message-ID: <20220916125139.GA25891@lothringen> References: <20220915001419.55617-1-joel@joelfernandes.org> <20220915001419.55617-4-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220915001419.55617-4-joel@joelfernandes.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Thu, Sep 15, 2022 at 12:14:19AM +0000, Joel Fernandes (Google) wrote: > When the bypass cblist gets too big or its timeout has occurred, it is > flushed into the main cblist. However, the bypass timer is still running > and the behavior is that it would eventually expire and wake the GP > thread. > > Since we are going to use the bypass cblist for lazy CBs, do the wakeup > soon as the flush happens. Otherwise, the lazy-timer will go off much > later and the now-non-lazy cblist CBs can get stranded for the duration > of the timer. > > This is a good thing to do anyway, since it makes the behavior consistent with > behavior of other code paths where queueing something into the ->cblist makes > the GP kthread in a non-sleeping state quickly. > > Signed-off-by: Joel Fernandes (Google) Reviewed-by: Frederic Weisbecker