Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp719286lqc; Fri, 8 Mar 2024 09:38:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUPuFwYggX+7cvvH5kUxpdElP7XbMXiDo5es+BuGlkT4r3bCSnKcX5/TzSWMF1hWqAu8CtIlycMZ7VfOqDxy+hq75PnbAAYAeRFbnV4Cw== X-Google-Smtp-Source: AGHT+IGbCsqpwNaQQkSW+bXQHyx8DTqyN30vqm6OuneuP7ZihFBssgUrnFp6AzOh4kKoxlH7IFtT X-Received: by 2002:a2e:a70e:0:b0:2d3:f689:fe32 with SMTP id s14-20020a2ea70e000000b002d3f689fe32mr3349627lje.24.1709919531676; Fri, 08 Mar 2024 09:38:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709919531; cv=pass; d=google.com; s=arc-20160816; b=yUr0SwVVuY1tb6VCLtPo24jdbtgbtjFCY9p//Xh99xn40uGNXL1L3lKUwJo8tw64B5 Q5+mzSkK7f6wA+tz95YiWkMpRjg6yZOtrVjyzGs+PRlkBV8W8vlULb7aDSf+LgoQxcrp WiEYWL55NDctiwQnEnWHHKGBzRBkgYWD17Fu4PkQVBQ25Uc7q8hDd3lvR9NesH7DAhvL Q+M9XdMVNudKcZ3Xoc7nw8hXHA+NlGesfUkhdv/Ln9cYbzKnKe4LH1zZz1S9LNoLW7/2 pc/6nz0WMp8kmKCgof+LG6oe0VArUe/q9EPWpM693o+nc9+5uQpL2K0aqOKf6uUbCull poRw== 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:date:from:dkim-signature; bh=teOnFOTGOtl/bki2az6QKK97mdgDV3359/DGxszAbqU=; fh=LZNz8zG/CHcowNaMDWP7unx/xSsCK2XlkRa+7zvVH6E=; b=N8OdnJSD/nHuNqfTNFBB64P+0EivcVMs1v04ECkexbqxLq9eF4f8VWCXW/4j6hY256 qgt+JNIxUSIK/eTV0/orZ/lzTTzcS1zLJ2N0oK/AS2FRSnv7b8AMQZPeM+ZPIavgftrg NQATNrOC34dHPlXA4ccMISAA3rJRT08voG7RolmiywA8kszUwcvSLLsGbl1ZS+8OXVTF L1qmSZRzrX43fCeRUmgoUhtpJ1o5LWmzK7oTsdVatFbJLxl+wVw6Xmx9vLu3N/A2ATAN EEfV/Fm18w5bagIr/6s8SdQYN134r03YsXqH5yTsx/9TLD1ofU0zPk5uNCS+Tz90FJbB nhcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QvrtDxcE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-97405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g13-20020a056402090d00b0056721d2a2a4si5801924edz.511.2024.03.08.09.38.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:38:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97405-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=@gmail.com header.s=20230601 header.b=QvrtDxcE; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-97405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97405-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 620071F22277 for ; Fri, 8 Mar 2024 17:38:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DFD6381D4; Fri, 8 Mar 2024 17:38:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QvrtDxcE" Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1040517745; Fri, 8 Mar 2024 17:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919523; cv=none; b=gRemecGO56ddeQ+GbvhKHb/ia2EDwQVgeMW1q1zLICH0oNnJ4vJbKlmtqurqohuOe2gDh9q5YgHeBBGkWuU9vTZWH+2LK5kTY+SLvLrjK5NA/zox/IOf4Knw6GiWW+cRe18WQwnGoKL+SDi13UfIcRsin5jP+fP6XOEeKoa4ZO0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919523; c=relaxed/simple; bh=1szIdl0VmWroeZhI0oBtOtl53dj5u2E6xmup3CVyS0Q=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I1bJXCg6lqJxoUCjJMWcX8emUwCPVWD/MiOkV4dCZ5Bjl7Y+/dCAdFxJAkSuK6mB+QEBsP5hf7sccsFlyhwt7VLG/09UFkgendsKn6xX8V6p3Pqtc5K/nFcsMlRPJZAvyGV+GNCvKnGTFCpk/VVVlWoexoA2foLx/zXpxe3fvVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QvrtDxcE; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-51326436876so3143686e87.1; Fri, 08 Mar 2024 09:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709919520; x=1710524320; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:from:to :cc:subject:date:message-id:reply-to; bh=teOnFOTGOtl/bki2az6QKK97mdgDV3359/DGxszAbqU=; b=QvrtDxcEd309u/iN3ylg1nXR7CNXrhQomIpRGdoDL7MJzwH6brQaIav2sbGxggHQTQ iJt2wr+JlW4QtdMBPO2/rPHif3YOUPs74YRSZH/GHnto4e1nxtLz5kx+OnzfLd8rj37U KQ4dSN6Rvbz5tTaTtaVtcr0pkCkDK4k/AzCAbmDxT0IBAR/PpyZ2LPdFWsOIKYhpQhkt SfJaWvL1keMwWylL1onibe7Ucy6sjfi7GIuvpURxI34FCU4IfFriyHmcI/kWgQhQExPq t21MMwEUbgWzNxYX/vuu7bdK9ns8J4GN0xWE3UMzgvaZfQWjsDp7ZHLTibWX+NV4NJZ6 bnZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709919520; x=1710524320; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=teOnFOTGOtl/bki2az6QKK97mdgDV3359/DGxszAbqU=; b=fM2zviIY827F0MKGFkr8CyIj9JKy3HRvfL0wyePiFO3MUF7Wh6eMEqkIwhFCSwsu4F TRbaLEDTsa+UWr/M0YCRjsEkqIZLzQzUXXFQyYrHJs3PIxX7hSg7QQXOzp37bWFJKrWz AaW0QapEQCjJ1OFZrpNI6J+xkzTyNJcPq63daXR4ysFMoBFOe8DaGPpZ5BaIh4mNH8/7 fsD1JIg1glh7v4LwdViMVo8w5xwqONVg2wAX7Krpatx388P+5ZBDPTc4/wYgDL+61cac D8MAU5F/5uUq7OEVaixTQIRmSyUff7xuZ5McWl3NHYLMYsFHxb140LwTYAUQ04qNsUiL 7FpQ== X-Forwarded-Encrypted: i=1; AJvYcCV+I2Fj4HXeILmV6rZLvYE72cNT/DkGuzMhqCC+TPyBA2tetDUtPGjEldHdQKFFafM/zyYfz5OciP3aF59Nhw218BQNHLZB9QGFGlm9DrCTX0uEizVxd/+txwCba9PAbCFr X-Gm-Message-State: AOJu0YxMVsGo+RvNq3ovA+3joz4mybFzJU7pI+9K5mFpmZ8Ob9s2fSsm oe8PfUyFe2A3ar3bJppdqFiiZhhYxCJuylac5h5zF1FeTwpYeDDpUG//m0CxsEI= X-Received: by 2002:a05:6512:200f:b0:513:3214:ae03 with SMTP id a15-20020a056512200f00b005133214ae03mr3182094lfb.69.1709919520080; Fri, 08 Mar 2024 09:38:40 -0800 (PST) Received: from pc636 (host-90-235-19-15.mobileonline.telia.com. [90.235.19.15]) by smtp.gmail.com with ESMTPSA id q1-20020a05651232a100b005131cc57f49sm3524783lfe.194.2024.03.08.09.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:38:39 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 8 Mar 2024 18:38:37 +0100 To: Joel Fernandes Cc: "Paul E. McKenney" , 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: 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 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? I have not sent your patch because it is not cleanly applied and needs some review. Thank you in advance! -- Uladzislau Rezki