From nobody Tue Dec 2 02:52:31 2025 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 723AC32ED34 for ; Mon, 17 Nov 2025 12:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763384019; cv=none; b=VaRuBDScok43TNaf3kGe8dyX7gjUyrxmSsh+2cz+pL+GTlAhj/2sjWK4MPyWHfRAUBTO6ASB2GDkTUHZbnnbHSUbXvbzHVDv2O2Qi6iaqWYSxb8dUhBCITASfe2JmRNo8p0MzPTLxi6KS4XGkV9k6vGeWxbJEdopiU0TA/+teT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763384019; c=relaxed/simple; bh=D3JRjoGIp2W/xKQKZllojR67fXSSAJjjAbJmeRNxRN4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O5YPiHJDIp8j+nGAs7ROTCa/1y5j/IfQZW55WTjegW8wcS+V5g21iO0hnBqwzRWkO1zkvHxMkMUNXadCzWCOVJmAhFfI9h11ZZG+NkSTrodM36TtfM9px/lAX6QQsbti3eS1nVscKWmfAzMB5SPR8bJkwNgxhyhAT8+q9gHzb3U= 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=rybdaxK8; arc=none smtp.client-ip=91.218.175.186 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="rybdaxK8" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763384004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Tbj/dYxEeRLF/Vk3A+CJ44vVCppp0vNdAwYnP6OMnGo=; b=rybdaxK8GayDD4Az9+bn3py+OqsaK4+2seME+RUg1PExkTSGJvU7+vQhUs66FuknNvaxwt iXoBwqksRC8Xj/8+3hoD9QjZAqAHQZgq2+nflCj8EI8Vwz07ghmsqS3L030UOSrycQ5CUD rOARldKhcv/a585tDX82vWskDCZoBdM= From: Zqiang To: tj@kernel.org, void@manifault.com, arighi@nvidia.com, changwoo@igalia.com Cc: sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org, qiang.zhang@linux.dev, qiang.zhang1211@gmail.com Subject: [PATCH] sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work Date: Mon, 17 Nov 2025 20:53:10 +0800 Message-ID: <20251117125311.107687-1-qiang.zhang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" For PREEMPT_RT kernels, the kick_cpus_irq_workfn() be invoked in the per-cpu irq_work/* task context and there is no rcu-read critical section to protect. this commit therefore use IRQ_WORK_INIT_HARD() to initialize the per-cpu rq->scx.kick_cpus_irq_work in the init_sched_ext_class(). Signed-off-by: Zqiang --- kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 8b88a9e69f8a..c8de9ec70d75 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5628,7 +5628,7 @@ void __init init_sched_ext_class(void) BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_preempt, GFP_KERNEL, n)= ); BUG_ON(!zalloc_cpumask_var_node(&rq->scx.cpus_to_wait, GFP_KERNEL, n)); rq->scx.deferred_irq_work =3D IRQ_WORK_INIT_HARD(deferred_irq_workfn); - init_irq_work(&rq->scx.kick_cpus_irq_work, kick_cpus_irq_workfn); + rq->scx.kick_cpus_irq_work =3D IRQ_WORK_INIT_HARD(kick_cpus_irq_workfn); =20 if (cpu_online(cpu)) cpu_rq(cpu)->scx.flags |=3D SCX_RQ_ONLINE; --=20 2.48.1