Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp855554lqc; Fri, 8 Mar 2024 13:52:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWrv/q00XH+PUUQx6uMDMvWiZkLbyk2hS91zXn38hjRsvAXjhV8QcBKxyCcnKw6pJ05GbF/1TxHc4da9Z16T2yJDnWv+vIcf42r5mi5mg== X-Google-Smtp-Source: AGHT+IE9atotSSBUTRSwVsIhim78gIdpsp0eS8aEJ0Peq0+GeYtuBvgPpPlTm8jaRB0djqmH9IbD X-Received: by 2002:a50:c04a:0:b0:568:32ed:4e2c with SMTP id u10-20020a50c04a000000b0056832ed4e2cmr306920edd.33.1709934733525; Fri, 08 Mar 2024 13:52:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709934733; cv=pass; d=google.com; s=arc-20160816; b=02wUgQMZppM5dBMr2l9FKqdK6QY+a+6tsvo10bO1Vt6go0r45mLvhIJAFGmP/Zq+yV 3gqzYcMXIiuG9Boo5M5gqtqhBziwnViA3y/0z7AnAdtGUBQmqJfM/+Z3O0KHcXX8e0Rs cy0c50XbZRJkK1embFEIO3b7PFahz7GTr1iV/Btx9/L8RWY4Mv89N4DJh1wUuA75VMbM WF6p215gQxDql/IWmwOnJ8+qmaKxcWiQxAA5JNCS+Ec8ryDZWkDo8/0BqZmXG6GBmTz4 iy/JDBcbgtqRhZAXeVABSwNmtv+CQBiWlYLqf4OSWhIanFTV14mswKjXZZVOiiyNpmll /nng== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3oXSxytb7TLdvwut9F0EfTKgPpxRUT9+GBoTaNxKTOU=; fh=m6bonSQhxd5EhC1NyswlQeVxNMSymBSJDc4oI6b46g0=; b=aRkNiZNzqECFVA10HIf7gqojuspZemDeq1wXBObvmpAYlDSk/cHjdMZq5l6xTpspQF 0InAeuah26em86warRGVZUmIcav1YBAY5cnZxbq/DJhdfRn7UONuRHeEs4UU2/Ua0hqq VHhhmtDypDl8qJN5WdAshrUgv3qH2OZhjL0M51Qgsn63O/18Q6pCqDaxwVxBidY4Z6VB VNE0XNZYdyPU05k3OMz8l46h5pRI3JD/mVYaRgZYGEANYmr2T9QnQgANmSGNslDwx0Sn qeFsE5ilG8zovJIeGTmOxJIOtSlDaXGZLOK38ZatJEr8wXhSq6gF9vL5ormYDS7Cx+qF oSKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rewK1cN9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97617-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97617-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. [147.75.80.249]) by mx.google.com with ESMTPS id n26-20020a05640206da00b0056484c0505asi157799edy.201.2024.03.08.13.52.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 13:52:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97617-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rewK1cN9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97617-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97617-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 4586E1F2212E for ; Fri, 8 Mar 2024 21:52:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEF265FB9B; Fri, 8 Mar 2024 21:52:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rewK1cN9" 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 D8BB35FB8A; Fri, 8 Mar 2024 21:52:05 +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=1709934725; cv=none; b=rK6OexFKfMV01q1dO3wjL9obgrY9DIFjeQkCvPKc3CE32kcflO287cajdNYMTBKmGFmt6wMIzcNHhvSRLGwW+JSBZa3CtgXtf1HqFOidfqSjUeStnwZCprlO6EVOWngDxC9pOYdvy4cpJR+SG7oaDB7iWg8Xn+leop5aGwHtsF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709934725; c=relaxed/simple; bh=dbXkGWO24AcaqW30+bWpUykQ8s/OPhFTkOUOiAbXrr0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cS7IgJjHDFLkdkE67QdvpJEuSvP53I4ZQwcs0pI/fktVcloe5RaYkY9CT/axox26UK2SCZU1mBW+I185/HsLkwruvA6NV/5JlTVV4O0elfO/vVxr3nxamtuzIfmQX5rBKah0g1Af6jGs1mhDABldLe6oqYpHIg9+ZjcT0JauR0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rewK1cN9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5666FC433F1; Fri, 8 Mar 2024 21:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709934725; bh=dbXkGWO24AcaqW30+bWpUykQ8s/OPhFTkOUOiAbXrr0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rewK1cN96yTC30A1Dsk2GivqNSpEhDRJI8qw2saB6PRX2GFjpd3iYtD5uMoBpEIsS RlxNDbT6CirSso3TWQaUlHdPf4tCVUIg7H3ApN07G9GGg+Pb5OudVn8lbb6PhBf2x/ uhUPjIUF2QTCNjAMqdWYpIfqYbWXH+/RErw1VWSc2kySpzb5KYKLqwR55Gq9rGPmXO WN46Mk/GyYaHHpGsHbHV5CDonjx+uETPDe/w0wxrcXQrwPHfLSJL0BtXJZwbgM4lbV hUAr96R85X84byUqE91+cGf5QWPdTeQpfiZPfAGdbcSCiJf1DitM0MfJqHziNhFZjN XNoZo2qV30lOA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 06E5DCE0548; Fri, 8 Mar 2024 13:52:05 -0800 (PST) Date: Fri, 8 Mar 2024 13:52:05 -0800 From: "Paul E. McKenney" To: Uladzislau Rezki Cc: Joel Fernandes , linux-kernel@vger.kernel.org, frederic@kernel.org, boqun.feng@gmail.com, neeraj.iitr10@gmail.com, rcu@vger.kernel.org, rostedt@goodmis.org, 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: Reply-To: paulmck@kernel.org 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Mar 08, 2024 at 06:38:37PM +0100, Uladzislau Rezki wrote: > On Fri, Mar 08, 2024 at 04:05:15PM +0100, Uladzislau Rezki wrote: > > On Thu, Mar 07, 2024 at 04:06:06PM -0800, Paul E. McKenney wrote: > > > On Thu, Mar 07, 2024 at 06:52:14PM -0500, Joel Fernandes wrote: > > > > On Thu, Mar 7, 2024 at 6:48 PM Joel Fernandes (Google) > > > > wrote: > > > > > > > > > > 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) > > > > > --- > > > > > > > > Forgot to mention, this is based on the latest RCU -dev branch and > > > > passes light rcutorture testing on all configs. Heavier rcutorture > > > > testing (60 minutes) was performed on TREE03. > > > > > > Very good, thank you! > > > > > > Uladzislau, could you please pull this into the next series you send? > > > I can then replace your commits in -rcu with the updated series. > > > > > Absolutely. I will go through it and send out the next version! > > > > Joel, i sent out the v6: [PATCH v6 0/6] Reduce synchronize_rcu() latency(v6) > > Could you please rework the patch on latest tip once the series i sent is > settled on Paul's dev? It is there now. Thanx, Paul > I have not sent your patch because it is not cleanly applied and needs some > review. > > Thank you in advance! > > -- > Uladzislau Rezki