The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Yajun Deng" <yajun.deng@linux.dev>
To: "Thomas Gleixner" <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] genirq: Keep affinity_hint unchanged if it has a value
Date: Wed, 12 Mar 2025 03:20:48 +0000	[thread overview]
Message-ID: <171eb20e618f8c05ef8169e892a1ed08cf580ee9@linux.dev> (raw)
In-Reply-To: <871pv31wpf.ffs@tglx>

March 11, 2025 at 10:14 PM, "Thomas Gleixner" <tglx@linutronix.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
>

  reply	other threads:[~2025-03-12  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-11  1:33 [PATCH] genirq: Keep affinity_hint unchanged if it has a value Yajun Deng
2025-03-11 14:14 ` Thomas Gleixner
2025-03-12  3:20   ` Yajun Deng [this message]
2025-03-12  9:10     ` Thomas Gleixner
2025-03-12 10:28       ` Yajun Deng
2025-03-11 18:51 ` kernel test robot
2025-03-11 19:55 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=171eb20e618f8c05ef8169e892a1ed08cf580ee9@linux.dev \
    --to=yajun.deng@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox