Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp612875lqc; Fri, 8 Mar 2024 07:05:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWbRsr7Ju/nD06GQWQI7QdwO4qyyRExaA/SF+SZIP2eYpJttB0MbYrmy2Z6K49NFGV2/eNfv3pBl0jKQUWl46FkBwwi0fpaOUj2pmfhfw== X-Google-Smtp-Source: AGHT+IF9oHvVz4wSOPXipxPoJhbiipJ2aj+jCWJz/WhNbiiJ2L0QxRMRlyWL8m0LpExK+RLhg9uW X-Received: by 2002:a05:622a:1393:b0:42f:20b3:45af with SMTP id o19-20020a05622a139300b0042f20b345afmr297184qtk.58.1709910339558; Fri, 08 Mar 2024 07:05:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709910339; cv=pass; d=google.com; s=arc-20160816; b=tFGgWCNJaEGpR2B0WPbG09Bl1rO7U1uGVrtBtU/JlBz+jGOrcDkpoYr573GzA1f/Ov onlynDLjr1tYpsuVvwTEG0jLnQR/mLJvrXYkik37BREf3EHzmJeSxCvGlZrOiTSJaEEb 79qpQBr7oo27gNsdBIH9KpeJghLFO67Lbq11+AfyO82IEH3Y2+oiKbEHigXoUY60p5ur JeG2l6QfHv07MFYe0Dz40NM2/7AfXYUlu3c2j3fzuGjFRsvLSYytbnl156MzYM4f5alo yoq7YqBx7/eu+gEYaMh5ZjEm1+WK7CFqIto2yoKPMqe8suuqIUZit6LZtpBEyvhNu6/n w7pw== 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=QZ7RvVvOlckHBQMf9F2I+Mtrwc2yTclL5994XgQW8m4=; fh=j4WCPgo/rKAsbP1b/3KW7L4BC0iD8oXqzq5vE//L+Wo=; b=KeeqyfUP09mQf3PCCDFpBsIUnkkI+xWfbHL7lwlhSjM9s/Pnn3gl80iGUuejHF84I1 NP52oExkbyEMhO1qiNwg9LujIk394P4Ui1nd9k5JZWJjBfQ+/DQ5GoK4+etPHT44hX/+ 0xkwtjG2bpbX6hyh8G6MX1bh8IZ+P2ZpSR9Gb8yMc9pIPBmwM5EZqJ/QLDV9oTgFBmPL yYhv15z3wNoaNsOk3Y6J7HCGZ5fZczR5cVMQlCpk+vJx4o4zkqDFzXHjMhi2bmdcBWW+ t6cAF9puSBcS9nN26/Q8cSluXvEhMvx72hQY8wLUy8MPHJT66EERvFfV1Cyikr/zG0o8 TvIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NdLo5CVM; 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-97209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97209-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pe1-20020a05620a850100b0078826477b9bsi11996898qkn.290.2024.03.08.07.05.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 07:05:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NdLo5CVM; 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-97209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97209-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 12F371C21CA5 for ; Fri, 8 Mar 2024 15:05:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 765E31DFFB; Fri, 8 Mar 2024 15:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NdLo5CVM" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 03FB41D54D; Fri, 8 Mar 2024 15:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709910322; cv=none; b=j6nmN9Py+70iX2lB/u1l0BPnw2ZrV/RuwUyix5DOgA5AL054FOrDlaI0vKVkXsa2T+mCk76Ht1fqX+PFhE71klq3KOck63wwJRFIpyO5fbul26oGjqd2mdg3Riy9JK/jP6ZW6DzNp1lhwpZBzPjqFD9bx6czM2zJtKhFJ8iZ0Uc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709910322; c=relaxed/simple; bh=22+TL+g0R+mDpEkSxUftfZ3Jch3HXDCSUfWz772B9+Q=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u393/Y8obLnLLIlw9BCgNUU4j2yq/FFImXyG+ax9F/K+NJFeHqJrLEPK6Ccj7qIe7NQVGGKogQX2RCJiLVHdkIg1t91ESXkvbJsPkInEOoTgy5cUsh4BF717Sqnrai3q5WVEBzlFms995GeUrwDyZOgZbzWROwEKVw29jiYxpww= 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=NdLo5CVM; arc=none smtp.client-ip=209.85.208.182 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-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d269dc3575so19823781fa.1; Fri, 08 Mar 2024 07:05:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709910319; x=1710515119; 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=QZ7RvVvOlckHBQMf9F2I+Mtrwc2yTclL5994XgQW8m4=; b=NdLo5CVM8S7tdi7GyXrwRdegmHwKQ2UUKxBIbFythdiaFIM7LupWG0ZR+uXgQvDHhW gFKVk4CnNCUDdMK5cmV0H768J6//m3RcUJ0jpkeTb9aPdImTIIOJE8NKWI+8lKn/nnr+ 7AMopPpXYIcuQcx8ozG9jcyl3P0csrTn/MRi5hQgtumbWI7JJJ5f3Ol+q8xpY1B8gDcC Z5Ol/edIKW2ESkBwHzw8hWfEWVNf5o84lfpTmNzFQzw/PEELc/+QDeW1Rpg76mzb503E poV7Ct/uD48+YVTFY3sGkWUCVckQLGkjKXhr1B/WbQ928m9HiEr7Xc5lSpjEDVRhlGNo 9LPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709910319; x=1710515119; 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=QZ7RvVvOlckHBQMf9F2I+Mtrwc2yTclL5994XgQW8m4=; b=RiSh1/qIEA6SDN9o9/yHbO4Hd2db6SeMUvAzYkRZf8JnnigcirDXippie5ZFYRVibb 3+/XY/MQ+6OA3DiahBg4qXosKpX3PFYtvtbuKnmZEjkfuBjH5taQfxnMh2u2w8EPCzux gMchIaKwTNRGq4ZoqisGU1BJVH10ixIe5rbh59Rz6jwZ6myIZUwrc/vh11Hj/0ZY31j1 Cb1QpYRyyi1KYq1DGIDeHF1AR/UR3H2snQNnk0TTEfCE3BXHSdYQUEhK+S0TmOMkA1hp FexZRafyRvyv+hOxXMLuLuZe/sWVH1V7i4M8xwyHP6I7O0HyT/WqjG1bmfYzL4BXHDST o/iQ== X-Forwarded-Encrypted: i=1; AJvYcCUoQyg1z3aPvnczsqBHONvbagau68yrZaJS7xM55JAYC5ZQ+CVvVp2WfrsmibnRWUIDs8kOjBAWC77VjK6TZIeWADKMbi8KUHscMhRoSjvNpwvfwwyVREvfNlzJ/OX86Nm2 X-Gm-Message-State: AOJu0Yz2Uqt8nsicRotBR/tXSyMaOOPcBf0Y75eKtvSDhRmNAxvwIDT1 oUiywvrHuA3mG36hF5eSrZERbp9HoYuffTPN40emsqAcXnJtUPvn X-Received: by 2002:a2e:9b45:0:b0:2d2:b5cb:cc3f with SMTP id o5-20020a2e9b45000000b002d2b5cbcc3fmr216381ljj.2.1709910318810; Fri, 08 Mar 2024 07:05:18 -0800 (PST) Received: from pc636 (host-90-235-19-15.mobileonline.telia.com. [90.235.19.15]) by smtp.gmail.com with ESMTPSA id i18-20020a2e8652000000b002d21d8fa04bsm3478248ljj.122.2024.03.08.07.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 07:05:18 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Fri, 8 Mar 2024 16:05:15 +0100 To: "Paul E. McKenney" Cc: Joel Fernandes , linux-kernel@vger.kernel.org, frederic@kernel.org, boqun.feng@gmail.com, urezki@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 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! -- Uladzislau Rezki