From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 9279978F3E for ; Fri, 9 Jan 2026 03:52:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767930733; cv=none; b=coeA8BvpnHusdv7WZnl43sfQAAHLBaSaWylVQHHFgxIqPs70yvbvh3uXdT0YBOiv+OR5LgzwOjH0qbaEQUjhV8a4fZOD+rFI9fXWI/R5r6fNZAQ9ZpgY+WSA+P0nOyH4ZYN4WXo/e9EaRG09XALeqL3V6rL/mxx/JmN6bS9GGdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767930733; c=relaxed/simple; bh=AVdEwSE8gOa5qwWATy7QUuW4oJvgE53RfI3DgwFz6E8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oyB6hGmeMPQjBhzVnkMzPwgCjKOxBbjZyq3lQvNrxYlwWHiRLO4rlvnMqEqnEnJN5ru77vlx1955cp+6UVZ20MDt9H1P+9Tu35VXlQmyyYA2yYbi3ls9rhZkKp3dLSWcPjVg5ToyEaviZfqxp9ZdcpecXerFQpqlOURcMbUh+b8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org; spf=pass smtp.mailfrom=joelfernandes.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b=x/C04q+/; arc=none smtp.client-ip=74.125.82.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=joelfernandes.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=joelfernandes.org header.i=@joelfernandes.org header.b="x/C04q+/" Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-2ae2eb49b4bso1968476eec.0 for ; Thu, 08 Jan 2026 19:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1767930732; x=1768535532; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=B+f1SsIZDMbxwTaTJ4GgOnkEVRMn7oML218Sxv/HWTw=; b=x/C04q+/PhoiZqgbtsFKQXvRKJRLAKNPsxjHMrgEJgGZUlm69NjXwUTkuE4vGPSKKa 96iBdM+OIiN2L4wQKBiYdJgmaVGUZ+e7vctTQPJwORZHwWBKo+x2Mci3E2ML9JB3deg9 4xJI+hhJleAKEXEvdkv+yvmooiOxeEo13ydZM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767930732; x=1768535532; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B+f1SsIZDMbxwTaTJ4GgOnkEVRMn7oML218Sxv/HWTw=; b=r/d+EAAvuwAxxnax/FunP0AdlOuC7QEU9L40nXq3fD4IPghZbyDVsGxWRFqnioss9P mODXHZJFXBI9Kt5zJOYKy9bRoImz8uX56QUxzUe3ohpdhRY1K/OgXTdQ0hxCSbtl40Na /3kbYZQo4+2/DoEBew8b0PDtACvf7U6uvTE7g2JAVGpVCxbRHUSYStTPYJbJxaSgtoW/ mvOc8hYVORhRa/bfKDc5o/6aT6WjPEKg2o07AApurXn4RHzaMZwMWpLODq+bpCh2iza0 lP/fME2mqLShwDlwSV+MecUTsAdaQmnRXHT5dkt8r0QdpTAdBs6ojEnCMpsXqcJUyY2f EiOg== X-Forwarded-Encrypted: i=1; AJvYcCWY1nslK5Ybcf/pqcifSSJ4v4G1wNjhYQ9pIM2gtOEqKU6ZoFzwaIb8m9HPHrxlcMuwQy0z/+SUTQIBL0o=@vger.kernel.org X-Gm-Message-State: AOJu0YyxtuZaj/yOjTfAUGgD9dGNarm3LXqI9TfyKG5H0QB3xzxWFfFi +Ea2vIuxZcoGyNYk6IVb4j/GaAaIvKccAKluPxIEwTUZfhddB/OZgXtXsEpOSxucr0g= X-Gm-Gg: AY/fxX4HE7+/ST6xMfMqAXxaIhHxXMSzK/v9BL2pSDMYSwUfLtDiUsUWZSs+ufcfpPh mbZ1G9R/MBWzd+iOuw2b+nQTw09eTAINz00l0B3AdmC470lEYyrasVGWcEf671EJZ1bXq/ZvVRk M6YrTATCN11aPgDjmGab608SqRPhZgT02v30YJjjISqxALeGiUuQklFQQ35WrL6fs53qh8FIfDX 7AXwOXwpEM0zweBFi2QR1U7TMVTlMymlZY0XeEE+mWbr9aCTjXe9HtjV7gJPRKrP6oCI404Na+/ SFxWclr4nsjIdbK9DzcXe+UmOrRDIiZATth8Dd3q7dslYP/fljEe3PMVZodJkA54TPRr1ObLeCC ZwG3aEqt7a7xYtoEUJKMsTrsmYFFXxP9KlKpp/b3R196rxzlXoNZXtNe8LoGdssG7urpW8E8bgk FryMZcJivzVV+m32kwXQo= X-Google-Smtp-Source: AGHT+IFUnmiXEo6GuJuz12uG0x/He17042vNl2YTT0DzjVTvwy+ECgj1J0TXa0FY4T5MjgHpppCmCw== X-Received: by 2002:a05:7300:6ca7:b0:2ae:5d27:ff49 with SMTP id 5a478bee46e88-2b17d1e4b87mr8253247eec.7.1767930731537; Thu, 08 Jan 2026 19:52:11 -0800 (PST) Received: from localhost ([71.219.3.177]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b175bee31dsm8426249eec.32.2026.01.08.19.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 19:52:10 -0800 (PST) Date: Thu, 8 Jan 2026 22:52:09 -0500 From: Joel Fernandes To: Steven Rostedt Cc: Joel Fernandes , linux-kernel@vger.kernel.org, "Paul E . McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Uladzislau Rezki , rcu@vger.kernel.org Subject: Re: [PATCH RFC 04/14] rcu: Promote blocked tasks from per-CPU to rnp lists Message-ID: <20260109035209.GB1105379@joelbox2> References: <20260103002343.6599-1-joelagnelf@nvidia.com> <20260103002343.6599-5-joelagnelf@nvidia.com> <20260105105931.141eb6f0@gandalf.local.home> 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: <20260105105931.141eb6f0@gandalf.local.home> On Mon, Jan 05, 2026 at 10:59:31AM -0500, Steven Rostedt wrote: > On Fri, 2 Jan 2026 19:23:33 -0500 > Joel Fernandes wrote: > > > +#ifdef CONFIG_RCU_PER_CPU_BLOCKED_LISTS > > +/* > > + * Promote blocked tasks from a single CPU's per-CPU list to the rnp list. > > + * > > + * If there are no tracked blockers (gp_tasks NULL) and this CPU > > + * is still blocking the corresponding GP (bit set in qsmask), set > > + * the pointer to ensure the GP machinery knows about the blocking task. > > + * This handles late promotion during QS reporting, where tasks may have > > + * blocked after rcu_gp_init() or sync_exp_reset_tree() ran their scans. > > + */ > > +static void rcu_promote_blocked_tasks_rdp(struct rcu_data *rdp, > > + struct rcu_node *rnp) > > +{ > > + struct task_struct *t, *tmp; > > + > > + raw_lockdep_assert_held_rcu_node(rnp); > > + > > + raw_spin_lock(&rdp->blkd_lock); > > + list_for_each_entry_safe(t, tmp, &rdp->blkd_list, rcu_rdp_entry) { > > How big can this list be? This would be considered an unbounded latency for > PREEMPT_RT. If this is needed, then we need to disable this when PREEMPT_RT > is enabled. Steve, thanks. This is still quite a bit in the experimental/RFC phase, but if we ever were to do this, we could splice the list of tasks into O(1) instead of O(N) I am doing here. Great point. Thanks for the suggestions about the guards as well on the other patch, I shall use that where possible in any of my new code. thanks, - Joel