[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <171eb20e618f8c05ef8169e892a1ed08cf580ee9@linux.dev>
Date: Wed, 12 Mar 2025 03:20:48 +0000
From: "Yajun Deng" <yajun.deng@...ux.dev>
To: "Thomas Gleixner" <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] genirq: Keep affinity_hint unchanged if it has a value
March 11, 2025 at 10:14 PM, "Thomas Gleixner" <tglx@...utronix.de> wrote:
>
> On Tue, Mar 11 2025 at 09:33, Yajun Deng wrote:
>
> >
> > affinity_hint is a hint to user space for preferred irq affinity, but
> >
> > it could chang if the value it points to is changed. In other words,
> >
> > the hint is invalid.
> >
>
> That's a problem of the driver which provides the hint.
>
> >
> > For example, if affinity_hint points to smp_affinity, smp_affinity
> >
> > is changed by the user, and affinity_hint would chang. affinity_hint
> >
> > couldn't as a hint to the user, it should keep the value if it has.
> >
>
> What is 'smp_affinity'?
It's 'desc->irq_common_data.affinity'.
>
> I really fail to understand the problem you are trying to solve.
irq_update_affinity_hint(irq, desc->irq_common_data.affinity);
As in this code, this means affinity_hint points to smp_affinity.
If someone were to bind several irqs to the same core, affinity_hint would change.
it couldn't as a hint to the user.
This patch allocates memory for affinity_hint and keeps the first value, even if someone
modifies smp_affinity, affinity_hint wouldn't change, it can as a hint to the user.
>
> Thanks,
>
> tglx
>
Powered by blists - more mailing lists