Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp126432rdb; Fri, 26 Jan 2024 23:07:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IELH8qIMaF9RZxezzhMNxoXTPxWV9tfbOThsHNiGZjx2tDVc2r72CJuuQu3Xbjpgx695JgQ X-Received: by 2002:a17:907:76c7:b0:a2c:5139:8b11 with SMTP id kf7-20020a17090776c700b00a2c51398b11mr556364ejc.56.1706339248272; Fri, 26 Jan 2024 23:07:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706339248; cv=pass; d=google.com; s=arc-20160816; b=FElQIiEggmYiKUGgwf/BIp/e8bNa4CTZCXYqtUgcSrjVIs1O+gdKYTspmnPVCJaPLq jZmxuqnNK9r+l1lElZznX7pdwDfyG26m7CIoFJO/ue9SFWhfcsRtYpoE2yn1x2srrcpI hIOSXeouj/sq3hfvDgAKdBDcCUVX+5UF2xJCLqPuJA9zvW6GGLmw93iUCNTuVbjn50Vm u5sAOXk+6XqR3jzMl8k/sKuPRM0F7Mo9TAWllCP63le8Jynj0qREkGxZLy997jCVH6Pc 0cbEukvWQ/DmSunbtkD9yDQxD069eOn28iqkAS0R5f4pq9sGmlaQh2lIdZiEjLkuv1I/ l0HA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=eBGs+ebUZlkGvTsOJqztj90i013+3wB5z44wMyWqTTk=; fh=785dg44DIpLZJ9M7c5EKuVY+o2EwuX9e5Yug9Fb6PIw=; b=sE1PiOzOuKldXVmShW3e1X4M/IV0uSyrAD6OqRxkGLGXxiCYZpxn+fHT8dKznPSBEU J109spYXpo3Fj9WPPXeIsHu1JKyjRt9SC2evvl4Y2F057vfVTV53fx8pvJNFgBZN44dZ cSya27bkG+H1V+3IjgHz8SNSvNlicAg7tLDGA8Mp7Db9oPsbqR6H3wHsO07CzdSITZ9l IJXDUPVN69rfaiBTdlvcP2crVAWjyDLdqEuIPldtKK6ymaKi2qA8ScdMCA0jvYiStx/9 HtA6KsNpPujV42MSInt1DcKa/1shdb+w77nDsYIq6R7fRVTND6vqkm5EhPErY72d0FRU ukuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OUWMxGFM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41085-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 u6-20020a170906c40600b00a30d2c1a420si1347081ejz.888.2024.01.26.23.07.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 23:07:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41085-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=OUWMxGFM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41085-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 CEDD11F234CA for ; Sat, 27 Jan 2024 07:07:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E37A1D6A4; Sat, 27 Jan 2024 07:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OUWMxGFM" 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 B69791D524; Sat, 27 Jan 2024 07:07:19 +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=1706339239; cv=none; b=PZT+TPdPVFhJHXz6VVTZessR2xb6V6DakyOee9uq7xiqT7/YSIpmDhsK1pXDL2UrZYaNihdA/qTZKWj2N01wf20rR7/XlHMWK9KpHTIJSKhfn+1tqht4x8qD45PL9EtOYGMezN36SfhhqCW2ZH/f7wTa8mpGaBfs4WtXiOQoHcU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706339239; c=relaxed/simple; bh=cowBM1wENyFzXVov+SQtnhDqzYj/i8BhLeInL+6Gn8s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hwFp72+Y8jrrWmJ7aOoNffrmc4e/EDlO0zoleab/3f7wRT44hG4XvXXSiSvJd4b1LB2fCPOgeiQeDlRPWp6QIfjFyO6lyXs0sYq0IUkOpMKsFtpbwoM5rj25d2bclukQ/x6pzLYYeQti++j/fUFas02O9lemR/UkGad681K/8Pk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OUWMxGFM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C78CC433F1; Sat, 27 Jan 2024 07:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706339239; bh=cowBM1wENyFzXVov+SQtnhDqzYj/i8BhLeInL+6Gn8s=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=OUWMxGFM+DD4G4kelhTUbMh1SlPs/EhWz5qNrMt+vsyM4FckdL5p7j1XACWih0FWl ZYbI0uNwRakxDwW4hR3Vh3L/ZETHfiO++EOGM6pFPlxU/DO4tjvkllwSrQdcKfsP0z orsy4Hc7Qpwpy2uwY2ZtNAqpqCmgZhFzWf1u5zNF9rwI9Y/j1FN8wuTTR5vngIHz9J wdiIfXBkgrIupwb2dXTzLoXPaFFrjnqYI51guo1fjpVWgtuoTR8KBgHuxRm/JNQMZ/ q4OtiPD+wFGQoOKgnVYIqB0KXuLtO8wzZzRxjABZ5n0L85iolqKFMIGYxN9FTxO63r LtIF9PfNjyz6A== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id C627DCE190D; Fri, 26 Jan 2024 23:07:18 -0800 (PST) Date: Fri, 26 Jan 2024 23:07:18 -0800 From: "Paul E. McKenney" To: "Uladzislau Rezki (Sony)" Cc: RCU , Neeraj upadhyay , Boqun Feng , Hillf Danton , Joel Fernandes , LKML , Oleksiy Avramchenko , Frederic Weisbecker Subject: Re: [PATCH v4 0/4] Reduce synchronize_rcu() latency(v4) Message-ID: <620b475d-eef8-4396-9d3a-d3dcf1d70f9a@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20240104162510.72773-1-urezki@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240104162510.72773-1-urezki@gmail.com> On Thu, Jan 04, 2024 at 05:25:06PM +0100, Uladzislau Rezki (Sony) wrote: > This is a v4 that tends to improve synchronize_rcu() call. To be more > specific it is about reducing a waiting time(especially worst cases) > of caller that blocks until a grace period is elapsed. > > In general, this series separates synchronize_rcu() callers from other > callbacks. We keep a dedicated an independent queue, thus the processing > of it starts as soon as grace period is over, so there is no need to wait > until other callbacks are processed one by one. Please note, a number of > callbacks can be 10K, 20K, 60K and so on. That is why this series maintain > a separate track for this call that blocks a context. And before I forget (again), a possible follow-on to this work is to reduce cond_synchronize_rcu() and cond_synchronize_rcu_full() latency. Right now, these wait for a full additional grace period (and maybe more) when the required grace period has not elapsed. In contrast, this work might enable waiting only for the needed portion of a grace period to elapse. Thanx, Paul > v3 -> v4: > - Squash patches; > - Add more description; > - Fix comments based on v3 feedback. > > v3: https://lore.kernel.org/lkml/cd45b0b5-f86b-43fb-a5f3-47d340cd4f9f@paulmck-laptop/T/ > v2: https://lore.kernel.org/all/20231030131254.488186-1-urezki@gmail.com/T/ > v1: https://lore.kernel.org/lkml/20231025140915.590390-1-urezki@gmail.com/T/ > > Neeraj Upadhyay (1): > rcu: Improve handling of synchronize_rcu() users > > Uladzislau Rezki (Sony) (3): > rcu: Reduce synchronize_rcu() latency > rcu: Add a trace event for synchronize_rcu_normal() > rcu: Support direct wake-up of synchronize_rcu() users > > .../admin-guide/kernel-parameters.txt | 14 + > include/trace/events/rcu.h | 27 ++ > kernel/rcu/Kconfig.debug | 12 + > kernel/rcu/tree.c | 361 +++++++++++++++++- > kernel/rcu/tree.h | 19 + > kernel/rcu/tree_exp.h | 2 +- > 6 files changed, 433 insertions(+), 2 deletions(-) > > -- > 2.39.2 >