Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp864901lqc; Fri, 8 Mar 2024 14:11:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVAbYrCoXWzdW36LqZ2wI8KokpgHVQB4WNywg+WQPfkdjgufysC6DHpdlGys/hrQr7VFpRNQDfR1J7E2QvAVDBVk+cpMRfY9DhKTR/8Og== X-Google-Smtp-Source: AGHT+IEVV1YHClL0xEnOJr5eCs5Q02f6cBElwfmfCnvWHXNNSouwCKJrWvv6A22Sr9NCbD3y+ws2 X-Received: by 2002:a17:906:a1c9:b0:a45:f9c5:3024 with SMTP id bx9-20020a170906a1c900b00a45f9c53024mr8386ejb.11.1709935888841; Fri, 08 Mar 2024 14:11:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709935888; cv=pass; d=google.com; s=arc-20160816; b=zCL8OS8VimjBRKSZIsXwaCNrEQkuTKCqQ90gsq5LcFYeF/Qdvlj7jolaaufJkVDmf1 VhOTj8jQd3E94LPGq70lo33WcronzTxrkp25XjmEPbs5GzNhJf0qyiDuiNY4yXmQMGzY qOSb0q4KWku+9fJ3WJ8we56dRgVKTw8kOU19WDU9gDb8C2Cr/T7BYOuKEY3oBXpgTR8+ 2YQVywCvLh4I4upyi3JufaCfXP3nRbnh/NgCcZ6iVxPaef62CoV5CsAbSsnvr0E685yj unEXhWFe/Bu17HBbOYdLnPGZulns7/7zKLZ1vvK1gAhSwzIstu79bplPeTphV0CVmP51 zTaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PbhsaibRtYleUwAE/CnoqLhSaafITMexmxiUPQ+cO8A=; fh=6vcb+bg9J5w0rOJJ4K8ipAxTxRr7WLwmFZ/LbyKoyyc=; b=lG3nIiM4PobVfTfROytZBpfcBhlsePdPQdayqRM7dpvvCXXIqZRjX8T2+GUTJkbeXD Q5OA8F6bTrzpUstnh1CyT09+Hpu1ITq/CryWXdkQcjPxFvS7wHGPG7noliFvF4epLU+r Vsgi/5aIqsiaHU9DuT4qb1Lca1dDgkVLGv+3CUwtvhvlOT9Ofmz38IGDsgF8qAPwuXXM Msvwye7YKpxjmsjFT48uTjCIjxHxYT8ppzF3kkyUA30lMM0AAH9wBkBdi/lSG7WHdsfy AN+9QK7X7a1GUTxlhZ53rXptklAIOC4nA59PZirnQ/DU0pFDr1IKKEAaROdpCOlCoHfV bzjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="C/C5gEt+"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k18-20020a17090646d200b00a45882f034asi187211ejs.216.2024.03.08.14.11.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 14:11:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="C/C5gEt+"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97628-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 88C971F2276A for ; Fri, 8 Mar 2024 22:11:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BFEE6087E; Fri, 8 Mar 2024 22:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C/C5gEt+" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92B93605DB; Fri, 8 Mar 2024 22:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709935830; cv=none; b=EtzxQpbOJ7icERF12Dcf++lDJymmGJZjPa0MfO8asddHkzXYi1ZR7plEjxzIKTGivrOA8OBwOLRV88pUljKTGiIvHBKEIFfVhD+/lbTvdm3K3kQels1egu3gfkRMSOw089URH5KpSkkxfR+FMgXsZjVufeEuKAkmEdQIWcpcnz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709935830; c=relaxed/simple; bh=h2IGNEEl+lBukqb70q3Af7Z6YogeUDNZLXtgJsNvBW8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TvQzUFv9t5QMaDGgrC7ier4HBtsfEULxM1qqizb7nDYI18INviYoxlppFu9jwtoyvNoRIVuUfvIx858Bh4h5cEVq0pS3xjevi0YjI6HKykeUt4gJxnDbrWKBIREozzqyNYoMoJFYukbTwZhIGEAMmyJI47mkGww/63CKSyKoblQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C/C5gEt+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4767C433C7; Fri, 8 Mar 2024 22:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709935830; bh=h2IGNEEl+lBukqb70q3Af7Z6YogeUDNZLXtgJsNvBW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C/C5gEt+uB+9gq6IZ3G2/nWmEeCxoUuxbY+vEpY5y4ppcptGzBGAovQRwZJQ0C8Ac 1GsuOg7iE+jfT4raua3sEgtBq3oRxE1frFp5jSkGP7z7p7248WKU8IgInYRY6yg3dZ fPiN5YgeYNVDV4egJ2HGtFPlj9JPMLDNR2oc/Q/Gi4nc3cDvMPan3nUxNEAZV7FKb0 YExR6MFbfd3Led9fI+bwd9nFmXkuVEZ0SGm8Z1b7skKJqcbpzl+g6aE/mx/J/OXjwP dUMRQDYfNvXaspBm9i3K06fKIhyloLJBZlhRYRdnwc2FE+JAugipmRYg3wOu26zlMB Z5GJCbJGyzb7w== Date: Fri, 8 Mar 2024 23:10:27 +0100 From: Frederic Weisbecker To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, urezki@gmail.com, neeraj.iitr10@gmail.com, rcu@vger.kernel.org, rostedt@goodmis.org, "Paul E. McKenney" , Neeraj Upadhyay , Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , Zqiang Subject: Re: [PATCH] [RFC] rcu/tree: Reduce wake up for synchronize_rcu() common case Message-ID: References: <20240307234852.2132637-1-joel@joelfernandes.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240307234852.2132637-1-joel@joelfernandes.org> Le Thu, Mar 07, 2024 at 06:48:51PM -0500, Joel Fernandes (Google) a ?crit : > In the synchronize_rcu() common case, we will have less than > SR_MAX_USERS_WAKE_FROM_GP number of users per GP. Waking up the kworker > is pointless just to free the last injected wait head since at that point, > all the users have already been awakened. > > Introduce a new counter to track this and prevent the wakeup in the > common case. > > Signed-off-by: Joel Fernandes (Google) Reviewed-by: Frederic Weisbecker