From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 CBAE13BBFDE for ; Mon, 15 Jun 2026 07:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781507784; cv=none; b=NMx5iCCgf4K5oTFQPAnzNRjHrg/Bq1aX6womXsry//2OwCjOKCVKguSHLLhMbRsh9qqp/YuGOeRM2TpKFRnM/MFTMWyxJzeJXGoU9yYbAbj4N8UaxAcU0FvYjHdKm4ghIvdTbcCg3W9dwhJVVbBlZ1HHIeeV003zLPIh/B4RQus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781507784; c=relaxed/simple; bh=pMkVa6/D2V5ktOGrf4lKmOuLSpOlfMitckdfGHfEAXs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NDofxGiDYFfad4HhvjOHEIhqB6nJSMsyssNjoOf0BQDMns8whw40anxFDU/NsbW5svK+o3WbpTIJoVNubUN1yYaPubrqOeWgtwhuQKqxsHXNdSqFkpLtih0zuC/m4NjsGxE308vxjKrL/QlZF52tlp0hraTq9+n7xZNIlmoY0wc= 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=kWjVpC3W; arc=none smtp.client-ip=209.85.221.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kWjVpC3W" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-45ef616daf6so3340246f8f.3 for ; Mon, 15 Jun 2026 00:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781507781; x=1782112581; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pMkVa6/D2V5ktOGrf4lKmOuLSpOlfMitckdfGHfEAXs=; b=kWjVpC3W3XixNCMfI+ottBHYx6Ct4UnxBrtFmkXzHihZDGxSiOVjUi37TgIov8U8f8 3pFalL8D8sVh89laF/HDnASgaHJYp2pjES40HFA3b6lHOIOZbYQYvtYDyvKYtOcP9bqv 34dQui5m3cvmQbm00l4M9jdN+frC2xuh+dfi8a/ucI4tLkTmOu4hGewJdgJYy2nFguC+ /uoeWHLWbleNxsGAoVnig0g8XqWOcieJJ+aX4ZkwuZ1gQ01KiAG+JrWs1ggpTrGPt7CM YgIRgKdzw0+mRZg8GQD8pQpm6lk6rOElApV72jSM63/cvBQq+2LFrcwo0ERU2ioV7iS+ Mtzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781507781; x=1782112581; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pMkVa6/D2V5ktOGrf4lKmOuLSpOlfMitckdfGHfEAXs=; b=qyG/mnxbVEh8ogRigYIZCcZre8GTZPbiX41aprv390eYKfx9gduR58OIzZe9C88Mv2 oNlpWhcD2e7Hqujfcxd/LvszNu93m8c/LuSzkkAqsC89VX3w62ADkp7ObOWIvxxm8kwE r0VtNXQVcGc3MbrYNt63k552GzyVW1BKJWKWO0l3eTZhw+Oxz2P7XxwF/lgPJkBU76LL K/9+L7vXE27HGllek2dUDTWVi037shSjyX3NdWNVoWPTOIj3jYItDXydyhBmSrjdbfjq 7skasXKSPP423Ee2Fstpbq6YyRKAS9JFjiky4QDwRP6EnHxuICTHriESIV7cUsaqaTK8 2eiA== X-Forwarded-Encrypted: i=1; AFNElJ9agcWqZjCEC716vcdcDPV0WTYLxpRIS/3+/Qn5AvqPnCFNCBMRNzlN/VWGrEw4lA7BDIrYZFZ6i/ZmyTA=@vger.kernel.org X-Gm-Message-State: AOJu0Yz9Ofg9tev0G2zeYnQxUka+HU5r+nKQzFs7ajMZ24CHjhwA2ga9 oOJ0JuxZMTaP8KJB6x03hJuPqw6OhxqULwuOfpxKLD3DufxE7x0sfc7h X-Gm-Gg: Acq92OF7fWyS1kZyidA/MEEl8RodTKIBNtLjc+UinFo8X+9CdzDGAsXnbQnpkj8dVVY r3kzrgQ3Kfl6OgJ/ARG/GbKKORTRZVbcHlywC0FpKL3vYseMiwrCTkDDReW/4b4xyQEbPTIInuM TxqSI4Ix5O3zXWPaf1W3Y9Jeuud+58DsA57Tr4C5fzFjMTduhAVCw9rwsQ393wluIbdrmMetBW5 3mUXCAN/3GJlZTHfPjqbApKRI5Haap0q/KiUrDoMORKrObmejzMHpHrwiVLw7EkvyfVQe/MuBPP sXsn+F09R3dCQo/qFTsD6RyQ3df14+bxlV7FInC96qJjWJbApRpe0xXYgOkF0Jx1eRWICRugrca 3KzSFn9xsisM08+PZJnwABxMj7Oa/xc2iVN/h1ZR/padW8yHZXN+XyykKd45c0iWV2vyWbmkuk1 eHjFAlxGjo/uwl8cD/+uIylPiuZfLEsfg2uXXuHuUgK2JcEP0nF4Pu9jgwYoycIgwCIuiD+zYDn BRxHL/haXp8U+SFgeBo20qBjR5DVXb8t1Kc X-Received: by 2002:a05:600d:8653:20b0:490:c6c2:52 with SMTP id 5b1f17b1804b1-490ec4a2984mr118495565e9.3.1781507780666; Mon, 15 Jun 2026 00:16:20 -0700 (PDT) Received: from ?IPV6:2001:9e8:f12e:9401:c875:96a4:7b6f:72fd? ([2001:9e8:f12e:9401:c875:96a4:7b6f:72fd]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922031b21dsm219645595e9.6.2026.06.15.00.16.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2026 00:16:20 -0700 (PDT) Message-ID: Date: Mon, 15 Jun 2026 09:16:19 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] MIPS: smp: report dying CPU to RCU in stop_this_cpu() Content-Language: en-US To: Huacai Chen Cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Thomas Gleixner , Jiayuan Chen , linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260608093729.12111-1-jelonek.jonas@gmail.com> <731bd6c4-0f70-45a2-8480-8fed315b82b4@gmail.com> From: Jonas Jelonek In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Huacai, On 15.06.26 09:09, Huacai Chen wrote: > On Mon, Jun 15, 2026 at 3:00 PM Jonas Jelonek wrote: >> Hi Huacai, >> >> sorry for the reply delay. >> >> On 10.06.26 08:05, Huacai Chen wrote: >>> [...] >>> In theory LoongArch has the same problem, but I cannot reproduce, >>> should I enable PREEMPT_RT? Or there are some special configurations? >> Sadly I cannot help with that. For MIPS, this seems to be the default >> behavior. > This patch fixes 91840be8f710, and 91840be8f710 adds synchronize_rcu() > in irq_work_sync(). Your problem is caused by this synchronize_rcu(), > right? Yes it is. > However, synchronize_rcu() only gets called in the > IS_ENABLED(CONFIG_PREEMPT_RT) case, so I think your configuration > needs PREEMPT_RT, right? > > You said this is the default behavior, but PREEMPT_RT is not enabled by default. The condition where this is added has two parts, see [1]. While PREEMPT_RT isn't active for MIPS, arch_irq_work_has_interrupt gives false for MIPS (since there is no implementation and it falls back to the generic one). This then also calls synchronize_rcu. > Huacai > Best, Jonas [1] https://elixir.bootlin.com/linux/v7.1-rc7/source/kernel/irq_work.c#L291-L302