Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp598273rdb; Mon, 29 Jan 2024 11:44:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKMhwyQmXHABmSZHgVVeDwuIzkQIR0/590ocY9tjLpfL8Z38fTcIo8FoAlW/g0WpaNEP2i X-Received: by 2002:a05:6a00:1798:b0:6db:d5b5:e380 with SMTP id s24-20020a056a00179800b006dbd5b5e380mr4654745pfg.24.1706557462122; Mon, 29 Jan 2024 11:44:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706557462; cv=pass; d=google.com; s=arc-20160816; b=rvR8BAQUcwgz9tT/29xTA7ruEcKECsBPC7wHn3prnY0ZKEYZfQaD3SW/7o+fKy9T1G T9hbLF8Oxqw4FxRSkLko1yg8+WSHoN+szaPcOqViSI16qVauz5NxfU8DZRia3otrgqB4 f4l1hk7qe1TCVjqhrMSYwOh9DdzZkidNDdo5CgWcoRJ0ZkAMVZpOEd8NLaqqjmtSmfs+ 0p+PZ4z7ioiX+eRYBYS3TqI5iZ0hDZHDlcp+LpKW6T8goKm4ne6zSH6PGX9m0/+H6iv0 ucTnpdoE9jq3K8WZdHJpt45p7av09AaiijSKbUgrCfQgm2lQuEXa8/CGKPh5QWJsdhMg huYg== 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=3U/27oLbYsN6e6EPcP5OWccyZbHlrpavSvsL3wMOosQ=; fh=qCYR4V6LEqlVZEJhM8X8I09bW6ELRZQJOr9RDkfkbYE=; b=PEN9sghyowjrbH2v6a8B0pJPmynNdyE5n+PHLCrauTLrJo/mQQlnr8Ek+Hy+oDJ6eN +rTe6qMZe5scA1yPxNue3kvWTGsQ52dIM2C38sP+ppFaq1Ch/+NMYs/U0+W0qO03sk8S lWCKQeahZrtvT4XiyoE8dSi+BLhcq1sUHNgc/wDEzAcy2w81cIb9lIKMIcCX7+HsuWyB SpEcR705yLYyD3r/HG7GMdEHSuo50Xy//txJ5kwZnfA2lfNJgrg5W94756ldhYTt+8LR LN4GHxuvlK0QnhuYA6/ag04+NzjBH8YNpRDbfxGrkJw4hWspC6JRkO+hIvwJPXV+Dmu4 aIow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WRzzmOYH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f27-20020a63555b000000b005cdff1f4821si6065189pgm.362.2024.01.29.11.44.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 11:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WRzzmOYH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43426-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 811A928A9B5 for ; Mon, 29 Jan 2024 19:43:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E04B36F074; Mon, 29 Jan 2024 19:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WRzzmOYH" 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 14E4A4C631; Mon, 29 Jan 2024 19:43:43 +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=1706557424; cv=none; b=N79yKaST9eCQ+GzNdmH4SRJPHSKVaFHoH2Hc6FglLm1SdmQ2Grn1RB/XS1IzGKX3kvzYgClpVmeXZpXjNrmtgbPsnhQMZ0spU9vD5y8SdO/v2qTB//qxvUbPks+ajGz+riKBDrABFNodJX/nzr2PG4X3kv5phsiHHxTtIKBtLC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706557424; c=relaxed/simple; bh=+kaFS2NgmQ+6YLaDrDI1LndSwxmLUual7mbaca44+Sw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QCsk7hJb+d4k7aP2nhMS1JenIuSCnNQg9IS6KLxvJZsTOcVbPfIMkSchR5rQtXuKom3PjMplalU+Splt1QHyt/Q4XCsgAcEQAs+d/nVmh8E8lKmPYHQlxGj21eK2RZa0cA+0yX1qfl9XvYFL3OZ51yF5ri/FEBvMpu5hk0EpwaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WRzzmOYH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74898C433C7; Mon, 29 Jan 2024 19:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706557423; bh=+kaFS2NgmQ+6YLaDrDI1LndSwxmLUual7mbaca44+Sw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=WRzzmOYHLjnlzFiQmNUd0G0jaliD1Fly8FfIQkAnmRThGJwwujXbTtGNEHxbZf5qr 2cWz9bTj7icljDJA9TrPQstDL9GYTMWOmecIBBbsRDU1GFCI6incxI0nN5IlmoX73l kpeFr3GqvHAP4mW8XlAUX0FVKpIEpvRHwUvoB69EvHdzx320gn2z8NF5JYBwIMB1Qq 9oP8N8tM542rd5S5ofVGKYs4XyPtOL3O3JjsCqLgdU6TvD5wJ8hVDjZrnYdplvbw6p VkBGKqF3FNbxmRBsW+2hy1+cMHtaFQBqfIV46t1r8jMAhHubDJH05b8/CYZSr1xx7q kmk/WbqwiYG0g== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0E166CE0ADB; Mon, 29 Jan 2024 11:43:43 -0800 (PST) Date: Mon, 29 Jan 2024 11:43:43 -0800 From: "Paul E. McKenney" To: Uladzislau Rezki 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: Reply-To: paulmck@kernel.org References: <20240104162510.72773-1-urezki@gmail.com> <620b475d-eef8-4396-9d3a-d3dcf1d70f9a@paulmck-laptop> 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: On Mon, Jan 29, 2024 at 05:23:01PM +0100, Uladzislau Rezki wrote: > On Fri, Jan 26, 2024 at 11:07:18PM -0800, Paul E. McKenney wrote: > > 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. > > > Thanks. I see it. Probably we also need to move "sync" related > functionality out of tree.c file to the sync.c or something similar > to that name. IMO. I would prioritize moving the kfree_rcu() code out of tree.c quite a ways over moving out the synchronous-wait code. ;-) Thanx, Paul