From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 9CC7F30C63A for ; Fri, 17 Jul 2026 13:52:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784296359; cv=none; b=JKOIGHepbPc0OAPO4xgX8DqZGrehbbeuwgS5mSc3Kd9NS76xsPESDvXRZdjqOj8EVZhFsXTd3L58Yrh09K8HzQKHVUrPldOa56lXg37C5TzpjexXFh7MOPB1uf0A+W4QmTpbgKQVR7+TwYexWHZwv5LY5rEZzP+9PgKRLn4COC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784296359; c=relaxed/simple; bh=XNPvJtNqZCUo9k89r0GXMW7pLCYIwo3YnVvck7LE77A=; h=MIME-Version:Date:Content-Type:From:Message-ID:Subject:To:Cc: In-Reply-To:References; b=HErXNaEq12AUw+vfIsauawfelHw21jwouHpw5pDFy7+VFJnj3LnSeJQBHnW3REyR7MhegqFgJfWF7r2LAM6yadwDeuIB5DPat6yu1xpyUAhq+Euy7wFjhlMePLWX2MWGRpbGMVf/41Kki8QOuexKOjMMYdozdt5h0ngtC7bh4SQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LiqHf5Sc; arc=none smtp.client-ip=95.215.58.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LiqHf5Sc" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784296355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JUcL3VIrpKoib36VRbQBefrD+0IPsDo85tWpEUnW64Y=; b=LiqHf5ScrSKqCbvMBIf7/J1Gfgz1eo+FaRElQawEg0iXeNAyxYS9dob/kNwbOFxi1QVMcn pAkxd9mgl2rDRU9LJQAayRjRqxMZaLuJUuEP2g3fgRejbB1b3YsiPc7UDpX7Pf+1v16q1s GE6zLoJ61uMzJKyQKJRQ8So2+GG6fjY= Date: Fri, 17 Jul 2026 13:52:28 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Zqiang" Message-ID: <0c1659f8765a3bc44a47157200f48cea8ca07252@linux.dev> TLS-Required: No Subject: Re: [PATCH] workqueue: Use raise_softirq() to trigger softirq in irq_work handler To: "Bradley Morgan" Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, tj@kernel.org In-Reply-To: <732F2B41-9D8D-443E-B199-231DC692D515@grrlz.net> References: <732F2B41-9D8D-443E-B199-231DC692D515@grrlz.net> X-Migadu-Flow: FLOW_OUT >=20 >=20>=20 >=20> The bh_pool_kick_normal() and bh_pool_kick_highpri() are registered= via > > init_irq_work() without IRQ_WORK_HARD_IRQ flag. On PREEMPT_RT, such > > work items are processed by the per-CPU irq_workd kthread in preempt= ible > > task context with IRQs enabled. However calling raise_softirq_irqoff= () > > requires IRQS must be disabled, This commit therefore replace > > raise_softirq_irqoff() with raise_softirq() in irq_work handler. > >=20 >=20Hi zhang! >=20 >=20Could you add >=20 >=20Fixes: 4cb1ef64609f ("workqueue: Implement BH workqueues to eventuall= y replace tasklets") >=20 >=20? >=20 >=20Also, if you would like this to go to stable, could you write a small > part of the description about the user-space effects and why this is > bad? The or_softirq_pending(nr) be translated into the following three assembly instructions(arm64 platform)=EF=BC=9A ldr w0, [x18, #softirq_pending_offset] by interrupt: calling __raise_softirq_irqoff(NET_RX_SOFTIRQ) orr w0, w0, 1<< nr str w0, [x18, #softirq_pending_offset] <-- still use old value, the NET_R= X_SOFTIRQ maybe lose. Thanks Zqiang >=20 >=20After all changes. >=20 >=20Reviewed-by: Bradley Morgan >=20 >=20>=20 >=20> Signed-off-by: Zqiang > > --- > > kernel/workqueue.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 >=20> diff --git a/kernel/workqueue.c b/kernel/workqueue.c > > index 78068ae8f28a..0bb978df0200 100644 > > --- a/kernel/workqueue.c > > +++ b/kernel/workqueue.c > > @@ -7923,12 +7923,12 @@ static inline void wq_watchdog_init(void) { = } > >=20=20 >=20> static void bh_pool_kick_normal(struct irq_work *irq_work) > > { > > - raise_softirq_irqoff(TASKLET_SOFTIRQ); > > + raise_softirq(TASKLET_SOFTIRQ); > > } > >=20=20 >=20> static void bh_pool_kick_highpri(struct irq_work *irq_work) > > { > > - raise_softirq_irqoff(HI_SOFTIRQ); > > + raise_softirq(HI_SOFTIRQ); > > } > >=20=20 >=20> static void __init restrict_unbound_cpumask(const char *name, cons= t struct cpumask *mask) > > --=20 >=20> 2.17.1 > >=20 >=20Thanks! >