Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp621922rdb; Mon, 29 Jan 2024 12:36:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxtm7zAZuFvpqtHL4567AomYMQU1+fRUvbirWCTZuIia1751pCSuDBTpcYHYRz3bDUshH0 X-Received: by 2002:a17:906:c7c2:b0:a35:518f:5511 with SMTP id dc2-20020a170906c7c200b00a35518f5511mr4740215ejb.61.1706560615271; Mon, 29 Jan 2024 12:36:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706560615; cv=pass; d=google.com; s=arc-20160816; b=KAIM8OpQmTCst5zuHJ6cli50/Uk3ghsZG8cPojdvLB1rTmTFzyvFiTfC8EaoLEZQp7 Qf03nAKy1u7EDu6mJam3u5AdXsuWjxYESOzIzXfPzA6frKBRvKHlO+XtFn81Wx33goy1 T6XkdSCCjf9Os4PXYas+zVbgObbXZsqMXr6cznmaK/adD2vOALn1Z+SRzBhT1NsFYZjm Ds/asUhB7v99/0TSv/7gztnxImBg4PzD8p3iuoQLdJSgf+Bvwd2RYUXVjPjvRbrDIxK+ dbH0EAW+7Bz+hvDOMlxLbtAKQTqRBZQcqLkXU81nv9hRl4FBZWoRLiGChkXPZRP2Iek4 E5yQ== 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:message-id:subject:cc :to:date:from:dkim-signature; bh=FmpumCLh7uX/HdOlHuODXjs5jYDB27UWUUlcEeNU+sM=; fh=9wdoEmpapnyfgJQsiJV77kKV4fUFbfqwJvGRMdaSgt4=; b=phX66yakSAxqyi7J93wuKhz7Qtx6425vV/TB90ekfgoY6MyczhZjd4+vM2KiT/zTgr M6s7XdFadGfccfdyDZv06npmgKFbWf01YHRlBLmtsqxYDqro76JrOA6LQuzQ2qDj0xeb 6ROv50rCDALCtTjkMZSMDEr6DC5YUPMVOiGh1/40ruX2BkxJZIqmalbP31Ze6AvDobq3 GQ+sAMLPLkoJ3JhRorANfABB2/6N/i296n7LfSiUQCWYyX+b9KFLBnz5CSVZLqtKb8NQ 7PHI+2Xqiz4+rCXgrWpshFEH5nfVm2HpFhDlgCa5Jm5FRxJ43a9p+D3UG9nCXB7qNcWf meTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ahyxeyn2; 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-43478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43478-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z26-20020a1709063ada00b00a35cae9d850si1054066ejd.688.2024.01.29.12.36.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 12:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43478-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=@gmail.com header.s=20230601 header.b=Ahyxeyn2; 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-43478-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43478-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 0ABB91F2435F for ; Mon, 29 Jan 2024 20:36:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E73A7157E80; Mon, 29 Jan 2024 20:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ahyxeyn2" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 7B0EC157E66; Mon, 29 Jan 2024 20:36:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706560607; cv=none; b=sQ4b1twM0A6SH1OqrxVLqhVZ7kLfqoo5LQAvzYFcM6EwfW1HZm+CWO9B/V9QnHQvySkFWp9nBJnFMXUGhmOD8vCmGZnTT4/OtCuwN6clW/ibl52K+rCVx/ELWH2VZCzZeEG2ph1mApqAcJ4Ks0V0TwpwTtEC+CdGM7lTfGaLAqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706560607; c=relaxed/simple; bh=GMLHhzeeoMbsVJnO8eUGF9Kg4igfMzZgqAvzXEAYxTo=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E9HJWKfRvPrjwEaWo5Nl9XHmuPUzvyNcvgafXMshq89B0gDlaA2ZDyeptQjcDrAaor9TJyEggDsJZXrk0ucMd00oW3g5n5TNcmcUIMGdeE64Rnv6s3GqTlHxEfH5wglOdTKR2DX7TY5eiskUy5R1zm8EEh6qo3C8FvnN9LGSJYU= 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=Ahyxeyn2; arc=none smtp.client-ip=209.85.167.54 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-f54.google.com with SMTP id 2adb3069b0e04-510221ab3ebso4277965e87.1; Mon, 29 Jan 2024 12:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706560603; x=1707165403; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=FmpumCLh7uX/HdOlHuODXjs5jYDB27UWUUlcEeNU+sM=; b=Ahyxeyn2uyH9mLt5t6Pe/hhTnyJDUbxDMfcefIE942SNKE6hkrycQt6dLkRZTtm/4X HxCwLoHnbvxu4inWFgFGRE6o9Su4VqnfqjUmjGXsbkua1gMX6NTeKVXu2PT7jaia1/TL B4pC9gEkVy/jmznMnErVxelPkyqydYxPxfr0AR6IvgpNBmEFdtIJi/XWlLnQqgO52GMg zjbEsbZN7zxjv1nMT/w/uwBcPQaWc9fL+mFrtUQNpOJAtFR9U8jjJC/V4Beo35zGfx9P mBGs9AVCyBR7OJPjo1QZEYv+QWt055NyW7dHMqYqu+mn4FYMQeY0+9E9zxYRx3b1PXmG A+ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706560603; x=1707165403; h=in-reply-to: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=FmpumCLh7uX/HdOlHuODXjs5jYDB27UWUUlcEeNU+sM=; b=YzhIGz147poaLKU4PmQsG6279rdMS4J1gw+YepcFLo8oHj9tgSmwxvlxZzi6cd4puh zcIcYBViLAA9VG2G0SLWTxS5be661xjRGyIuvB2c/uQ/KzqFKYbH7UupZRumwLD8gaJy T2qDMqfxFAQaW519LltnWPd/NKaePQ2Eq/OROqRtjwDtsIJYVnmvyTKDQ67C8wHJ9+Um 7ja3cSJU2UL9fngonF6wexYQChVQarMTqak7s5FA5ERAUXsUqRQpJOEieLoFZ5UFyyy1 MvbZCGPmY/8nhX3pkhrbjn9icCm4YlCVmtHdzUsUWergwfhdxf7ohyeEgEsEI2KEPm2d n0Cg== X-Gm-Message-State: AOJu0YxQjrrWiaZxyUWIpHrjjzW7fTecqHUPXyc0pKHb4AsCIC6kOE6x bI9RySlkE2msRVM9FWzQSh8xxFuX1cuSreh0uRnCB+APyGd2/Whb X-Received: by 2002:a19:5f12:0:b0:50e:d3dc:2245 with SMTP id t18-20020a195f12000000b0050ed3dc2245mr4383104lfb.58.1706560603115; Mon, 29 Jan 2024 12:36:43 -0800 (PST) Received: from pc636 (host-185-121-47-193.sydskane.nu. [185.121.47.193]) by smtp.gmail.com with ESMTPSA id s15-20020a19770f000000b005102473541asm1227797lfc.301.2024.01.29.12.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 12:36:42 -0800 (PST) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 29 Jan 2024 21:36:40 +0100 To: "Paul E. McKenney" Cc: Uladzislau Rezki , 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: 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 11:43:43AM -0800, Paul E. McKenney wrote: > 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. ;-) > Indeed. But i am not about priority :) -- Uladzislau Rezki