Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1906204lql; Wed, 13 Mar 2024 11:24:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEihEhv2drLY200AfWgR3l0P63QCxTEakVFg8lNcvjhtV2b4V7bWjgKWdgyNHpIu8lOxw1ohbb+0MIyxzvw9HzwW4VrUr9BATidXqstQ== X-Google-Smtp-Source: AGHT+IEIoBeJtYYv/yHT/5HzVfEXxZGAFRBjHFVm/IvvbegJCG+zMxIfGX4w/UQN5gUj7GjuVkgY X-Received: by 2002:a05:620a:2990:b0:788:7781:327 with SMTP id r16-20020a05620a299000b0078877810327mr886665qkp.58.1710354291546; Wed, 13 Mar 2024 11:24:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710354291; cv=pass; d=google.com; s=arc-20160816; b=y/FgfHkN061UAC0h/1Z1yHR01+NqeEIPOzwec5d08V49TVb6zTOBC1qvKhE0eC7xAe QqJONpsSdb4UlsHRZa97bGlVCVqzES0LencM/dwYKF/8FE25mEufdR9P8I5uTry4lSfI BowIa1dWdBnpcCLWqJR2OTIiS6g2M50ZV4RgchikeMLKY/+MopuJnFhVETzOOOz/WSLT AWww/FQ4F1PpajhJveJHbYu8lggcwFz+NcrmP5XJqfK9QSeQ25imCeu/hXoT7cZbru1d 4zA00lMX4u3pRCraY64JkqgWSV/dHE7BDDuTqsZ7CosamCG3GR033SGhiZ0BmVUHsSMa d4VQ== 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:from:date:dkim-signature; bh=gMzUXquRnXdWzRNe/uKDr5DoTEf7eIHjvjXq7IqgRVc=; fh=IzALLydII7kEyJ/7AvqC1Vb6qPSHQhhuuo+lNL0h/iY=; b=sLwmPxEFGGkzQKR0c/cKBMxgSM2dNix5N96FIb7yBqWKNITMQNl935KlPzpRzEqHKM 4X2Gu1tSY3DQ+wtJ88mRh3IdLDNkr7r3G+nSvd+k3U43qbcS0NgAaEBOJZMfH2wWWHrb LOtzaQ2xx5Fl8eSeqrKgDUTCespDT3uO5Swzb1jUGGHZZk3+4REKgUrnfx3xsDHZSiB3 I1KsrIueB0jgnyfT3SNS2pHBYRT7nahDBn2TEG7RKylskc6MWT4yDDPAq6pGyn3xR+Q0 pzu2jJ4fXRe2Qb6I1g5VRQ6wdYwjNu3sxLbZ/sSxbaM9FYqfJ/1TLGicOFR/2Cpef8Wn 8/iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YCFsbMRE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g8-20020a05620a40c800b007881dbf491asi10962788qko.167.2024.03.13.11.24.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 11:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102208-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=@kernel.org header.s=k20201202 header.b=YCFsbMRE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-102208-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102208-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 450341C21B4F for ; Wed, 13 Mar 2024 18:24:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB3211A00E3; Wed, 13 Mar 2024 17:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YCFsbMRE" 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 0F8711A00CB; Wed, 13 Mar 2024 17:05:03 +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=1710349503; cv=none; b=CIOCr4EuNkebqaq+L9mce1k9psKtkB32Rte0aOo0w9zcc7/dbTUX3dIdgkTzMvu5VA/cZG8OqaZvFaajGNiwETPUlWYVoue7tWfnNl4j9VDztRl/L+nKyx5C44xBb/Y2Y6HxaXN/LakMLRSXIe30O7vMZ7D2MnqPB0O91W+c09c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710349503; c=relaxed/simple; bh=3HkGt1kMjSGQ6a0wzmZyjXZ7wSJYIP5rRmWt5oIKzQk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uvPAZCvf9HLG3eBGZuWMQ7rzSHxDeJIsbYNi8yGrsEyfb587EjnXvpYr/iiFk+U6abkKrpyFahsA8iE7txPbsPABp4XnpwFdUc0l0DFV6A+G/s6SP1bjmT73DdVYiYZw4HT26rt8J8KeWiW4+I5zDJlTP4gl0V8ea8WYuieW1Yc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YCFsbMRE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92DDDC43394; Wed, 13 Mar 2024 17:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710349502; bh=3HkGt1kMjSGQ6a0wzmZyjXZ7wSJYIP5rRmWt5oIKzQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YCFsbMREntqbQyxFW7IZHwDCiJSAzCRCm383ZTlUeeYOrFSJ0xMNbY4z8PHNty62j o+KHCHblGAauSmwSD22Ttvrf+uZ8NFu9paFkgN+L5Td6NieHZqA6E8ECnXN7zI3fFT AmmMaOMk6s1OQdXDDsDAt+wxfDBFgr/yZThBQsWVeuVnSjvlAGXJHph04vCygHygtU rqtK9I9KZDrEogvl9x/8xYVmbNHj+s/Y1o7PUrFsKeDVI4xCy5yMYh8USlNd+E276U s5a3qG8BWlmyaK30YksYT2iT348U7w1Sv7+YTXShbjrWJGk379hAFcvPRiFNEyVrH1 o6JA806m9B6zw== Date: Wed, 13 Mar 2024 18:05:00 +0100 From: Frederic Weisbecker To: Neeraj Upadhyay Cc: paulmck@kernel.org, joel@joelfernandes.org, josh@joshtriplett.org, boqun.feng@gmail.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, qiang.zhang1211@gmail.com, rcu@vger.kernel.org, linux-kernel@vger.kernel.org, neeraj.upadhyay@kernel.org Subject: Re: [PATCH] rcu: Reduce synchronize_rcu() delays when all wait heads are in use Message-ID: References: <20240313083228.233247-1-Neeraj.Upadhyay@amd.com> <35e009c4-d52c-4b96-ba10-afa0be9dfd5e@amd.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <35e009c4-d52c-4b96-ba10-afa0be9dfd5e@amd.com> Le Wed, Mar 13, 2024 at 09:41:58PM +0530, Neeraj Upadhyay a ?crit : > > Also there is a risk that this non-wait-head gets later assigned as > > rcu_state.srs_done_tail. And then this pending sr may not be completed > > until the next grace period calling rcu_sr_normal_gp_cleanup()? (Because > > the work doesn't take care of rcu_state.srs_done_tail itself). And then > > the delay can be arbitrary. > > > > That is correct. Only the first node suffers from deferred GP. > If there are large number of callbacks which got added after > last available wait head was queued, all those callbacks (except one) > can still have a GP assigned to them. Oh and yes I missed the fact that you still reissue a GP while queueing a non wait-head as ->srs_wait_tail. That point looks good. Thanks.