lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871piy12me.ffs@tglx>
Date: Fri, 06 Feb 2026 13:24:25 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Qiliang Yuan <realwujing@...il.com>, Ingo Molnar <mingo@...hat.com>,
 Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
 Vincent Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
 <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, Ben
 Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>, Valentin
 Schneider <vschneid@...hat.com>, "Paul E. McKenney" <paulmck@...nel.org>,
 Frederic Weisbecker <frederic@...nel.org>, Neeraj Upadhyay
 <neeraj.upadhyay@...nel.org>, Joel Fernandes <joelagnelf@...dia.com>, Josh
 Triplett <josh@...htriplett.org>, Boqun Feng <boqun.feng@...il.com>,
 Uladzislau Rezki <urezki@...il.com>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, Lai Jiangshan <jiangshanlai@...il.com>,
 Zqiang <qiang.zhang@...ux.dev>, Tejun Heo <tj@...nel.org>, Andrew Morton
 <akpm@...ux-foundation.org>, Vlastimil Babka <vbabka@...e.cz>, Suren
 Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>, Brendan
 Jackman <jackmanb@...gle.com>, Johannes Weiner <hannes@...xchg.org>, Zi
 Yan <ziy@...dia.com>, Anna-Maria Behnsen <anna-maria@...utronix.de>, Ingo
 Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org, linux-mm@...ck.org,
 Qiliang Yuan <realwujing@...il.com>, Qiliang Yuan
 <yuanql9@...natelecom.cn>
Subject: Re: [PATCH RFC 03/12] genirq: Implement dynamic migration for
 Managed IRQs

On Fri, Feb 06 2026 at 02:04, Qiliang Yuan wrote:

s/Managed IRQs/managed interrupts/ in $subject

> Support dynamic reconfiguration of CPU isolation by making the managed
> interrupts responsive to housekeeping mask changes at runtime.
>
> 1. Register a housekeeping notifier in the genirq subsystem to listen
>    for HK_TYPE_MANAGED_IRQ updates.
> 2. Iterate through all active interrupts when a mask update occurs.
> 3. Re-apply affinity for managed interrupts to ensure they honor the
>    newly configured housekeeping mask.
> 4. Use irq_set_affinity_locked() to trigger migration away from newly
>    isolated CPUs or towards newly designated housekeeping CPUs.

Please don't explain implementation details in the change log. They can
be seen from the patch. Explain the why and the concept of the change

https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog

> Signed-off-by: Qiliang Yuan <realwujing@...il.com>
> Signed-off-by: Qiliang Yuan <yuanql9@...natelecom.cn>

So you developed that together with your alter ego? Pick one please.

> +#ifdef CONFIG_SMP
> +static int irq_housekeeping_reconfigure(struct notifier_block *nb,
> +					unsigned long action, void *data)
> +{
> +	struct housekeeping_update *upd = data;
> +	struct irq_desc *desc;

Move desc into the loop

> +	unsigned int irq;
> +
> +	if (action != HK_UPDATE_MASK || upd->type != HK_TYPE_MANAGED_IRQ)
> +		return NOTIFY_OK;
> +
> +	irq_lock_sparse();
> +	for_each_active_irq(irq) {
> +		struct irq_data *id;

id is really not a intuitive name. Most code here uses 'irqd'.

> +		desc = irq_to_desc(irq);
> +		if (!desc)
> +			continue;
> +
> +		scoped_guard(raw_spinlock_irqsave, &desc->lock) {

raw_spinlock_irq. There is nothing to save here as this is preemptible
thread context, no?

You can simplify all of the above by using:

	scoped_irqdesc_get_and_lock(irq, 0) {
        	struct irq_data *irqd = irq_desc_get_irq_data(scoped_irqdesc);

                ....

> +			id = irq_desc_get_irq_data(desc);
> +			if (!irqd_affinity_is_managed(id) || !desc->action ||
> +			    !irq_data_get_irq_chip(id))

No line break required. You have 100 characters.

> +				continue;

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ