Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp283355lqr; Wed, 5 Jun 2024 06:09:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWukKdVxGdr/3qyGcd3/x3dI0fgXKY3x2zqo3nlHL8MJLbFgS0C+IyXHAYveB/K3cJNh46yems/JmNpiNJdRaEXY5upXtc7IYvddflPCw== X-Google-Smtp-Source: AGHT+IGjSD2YSS3HY5Y6XlMSOwSvOaojN/rw//JNg3QgS/OKz2OkqB1n1zxkw6xOSI6+G1HAFNo4 X-Received: by 2002:a05:6a20:9743:b0:1b0:1ce1:e7ac with SMTP id adf61e73a8af0-1b2b7179358mr2117509637.53.1717592994678; Wed, 05 Jun 2024 06:09:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717592994; cv=pass; d=google.com; s=arc-20160816; b=0DDyXsZ9BRzvgMb11+fWOKVIUqXfJmZV9R+1IUOtcqF3cwRQ/V18uQFw9oE56k5Wc/ IFMfEy8SHnnZntD4/fpM9MjWlBwIuvPiGkLMQnJemyYAHvnXmJxHdngvC4wZLOcnzpoY FhMXTfxxZmUVSbYpgjlGwXYfk0NXneYD4AdpaYbzmxhs4TiWUDBSWrkC+Ux1MPfjRte2 VbcSkp0P8zmXp1W+3HWA62WUJY9jJzUeyTXgebeAc33xfkyuBlCz1PxQGBuTR+N/yyAn EhmHUGiX9PKKJT4UQTTbHu317VJpFL96mXQYWQI+QwEE3Z1c4iDmzD2woN3pcdVeQspG I5sQ== 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=3ktsvHaH/E09EzmhagvdMoH1l5Lvew9h5x7L3L2/WvQ=; fh=fBdMxlm3t1GhszZLEjdopExXrm1LhM2lAC6FqLfYI+g=; b=mxl655RGqhwR59mCnJWmrS6fnhAdmc4CthaG6gXsSYV4RgoKPUYJM3FG97uCL09CdC jpxEvMDn2Ccovvz2k4fxSbnh27PRkRwFovg2Myg/XdmBtC2ps6Bp0PEgV6A3clR7Df8i SYX/8zdtxlwCfQvMW/idQOlLBUiM/Lhl3RQfwpEb9EKeWEStba08ZCTvMIAlaphlP0Qz NlICk2rztXlTgZDGZSXXZsyVXm0yyNpanCWO8teaCEfbndny0liEvgewR2Pr8rY2lbxh asPBTjShzRqiqMUMSKj0HQ3mfHrHhrvk7rSu0fR8ezbkuFPhCkUXM8dIF0XdCkd3Gqzu kMdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TGQUSfzG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202553-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202553-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c181c9dsi9977537a12.665.2024.06.05.06.09.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202553-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TGQUSfzG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202553-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202553-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 0A752293E3D for ; Wed, 5 Jun 2024 12:56:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3821195B0E; Wed, 5 Jun 2024 12:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGQUSfzG" 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 E7248188CBE; Wed, 5 Jun 2024 12:09:37 +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=1717589378; cv=none; b=Chno5NUvZe6/53P8ZiOc2o4N5QbE+4+R2E/scWsuQdptwsEhXbxF0tShDOMZiwcQpyCpSIx5/Rv3n8zX8XrrdYVdMwew3XZl8lagGiZhttWutVFiZdQkgsER7Hcpl1lPR6GOXuYxxss4F6DUVQIQmUueiTK2cqSMGhAhY5OhgZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717589378; c=relaxed/simple; bh=wVH3V0ZiYy8bt0BX0U/EChRzQBLdHlpA3Toip9MADsU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nwUL59ThRAITPC8QvPN2opIhCA9Lv1dFH95FkpGkOiZG1hoPFw98DVIfrWpJA7jw3DB+bOFH3L/ZgwLeZhxOVCwTh0ZPCtA+/AQ3icNK3NZ9GpqwnRsjAGUNfjBT7fJxZEUEoR2ea7OnMvN64g4AiFPXumrh3+pi5niLsWlPaKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TGQUSfzG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0145DC3277B; Wed, 5 Jun 2024 12:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717589377; bh=wVH3V0ZiYy8bt0BX0U/EChRzQBLdHlpA3Toip9MADsU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TGQUSfzGSRPFgtqyyTejrHMnwLEc1VvFndNQqSzNSOuYXekLMeXzMm66OlwWhDuov pBt5MCbUOTrWSXGugJzufLDADDaEOJxy5qIiA4wKRtZIcNBLsjaRRakHSjbLiZ3svs 6Wnz7lx/GrcH5KZ0PIiF6JH6Qu+PpQuw89zNgPULZJAxet+e0HWUFcbRGc2D/fnB2u h66SmDewopwrQV3byfAqLbObqj1A9kv8jC6iQ9LvJPR3G+bRB6vM0TB2YHU0P+3Gjq 0C7DI8jwqsws1jgB7VsmI3+Bisw7aympJ6IJMn6QIcsfRYoo0Y1WAazUpgGfU7mQgS wZk/Z+DYM1Phg== Date: Wed, 5 Jun 2024 14:09:34 +0200 From: Frederic Weisbecker To: "Paul E. McKenney" Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, rostedt@goodmis.org, Neeraj Upadhyay Subject: Re: [PATCH rcu 2/9] rcu: Reduce synchronize_rcu() delays when all wait heads are in use Message-ID: References: <657595c8-e86c-4594-a5b1-3c64a8275607@paulmck-laptop> <20240604222355.2370768-2-paulmck@kernel.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240604222355.2370768-2-paulmck@kernel.org> Le Tue, Jun 04, 2024 at 03:23:48PM -0700, Paul E. McKenney a ?crit : > From: Neeraj Upadhyay > > When all wait heads are in use, which can happen when > rcu_sr_normal_gp_cleanup_work()'s callback processing > is slow, any new synchronize_rcu() user's rcu_synchronize > node's processing is deferred to future GP periods. This > can result in long list of synchronize_rcu() invocations > waiting for full grace period processing, which can delay > freeing of memory. Mitigate this problem by using first > node in the list as wait tail when all wait heads are in use. > While methods to speed up callback processing would be needed > to recover from this situation, allowing new nodes to complete > their grace period can help prevent delays due to a fixed > number of wait head nodes. > > Signed-off-by: Neeraj Upadhyay > Signed-off-by: Paul E. McKenney IIRC we agreed that this patch could be a step too far that made an already not so simple state machine even less simple, breaking the wait_head based flow. Should we postpone this change until it is observed that a workqueue not being scheduled for 5 grace periods is a real issue? Thanks.