linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nitesh Lal <nilal@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	jbrandeb@kernel.org, "frederic@kernel.org" <frederic@kernel.org>,
	"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
	Alex Belits <abelits@marvell.com>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"rppt@linux.vnet.ibm.com" <rppt@linux.vnet.ibm.com>,
	"jinyuqi@huawei.com" <jinyuqi@huawei.com>,
	"zhangshaokun@hisilicon.com" <zhangshaokun@hisilicon.com>,
	netdev@vger.kernel.org, chris.friesen@windriver.com,
	Marc Zyngier <maz@kernel.org>,
	Neil Horman <nhorman@tuxdriver.com>,
	pjwaskiewicz@gmail.com
Subject: Re: [PATCH tip:irq/core v1] genirq: remove auto-set of the mask when setting the hint
Date: Thu, 20 May 2021 20:03:38 -0400	[thread overview]
Message-ID: <CAFki+LkB1sk3mOv4dd1D-SoPWHOs28ZwN-PqL_6xBk=Qkm40Lw@mail.gmail.com> (raw)
In-Reply-To: <CAFki+L=eQoMq+mWhw_jVT-biyuDXpxbXY5nO+F6HvCtpbG9V2w@mail.gmail.com>

On Thu, May 20, 2021 at 5:57 PM Nitesh Lal <nilal@redhat.com> wrote:
>
> On Mon, May 17, 2021 at 8:23 PM Nitesh Lal <nilal@redhat.com> wrote:
> >
> > On Mon, May 17, 2021 at 8:04 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> > >
> > > On Mon, May 17 2021 at 18:44, Nitesh Lal wrote:
> > > > On Mon, May 17, 2021 at 4:48 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> > > >> The hint was added so that userspace has a better understanding where it
> > > >> should place the interrupt. So if irqbalanced ignores it anyway, then
> > > >> what's the point of the hint? IOW, why is it still used drivers?
> > > >>
> > > > Took a quick look at the irqbalance repo and saw the following commit:
> > > >
> > > > dcc411e7bf    remove affinity_hint infrastructure
> > > >
> > > > The commit message mentions that "PJ is redesiging how affinity hinting
> > > > works in the kernel, the future model will just tell us to ignore an IRQ,
> > > > and the kernel will handle placement for us.  As such we can remove the
> > > > affinity_hint recognition entirely".
> > >
> > > No idea who PJ is. I really love useful commit messages. Maybe Neil can
> > > shed some light on that.
> > >
> > > > This does indicate that apparently, irqbalance moved away from the usage of
> > > > affinity_hint. However, the next question is what was this future
> > > > model?
> > >
> > > I might have missed something in the last 5 years, but that's the first
> > > time I hear about someone trying to cleanup that thing.
> > >
> > > > I don't know but I can surely look into it if that helps or maybe someone
> > > > here already knows about it?
> > >
> > > I CC'ed Neil :)
> >
> > Thanks, I have added PJ Waskiewicz as well who I think was referred in
> > that commit message as PJ.
> >
> > >
> > > >> Now there is another aspect to that. What happens if irqbalanced does
> > > >> not run at all and a driver relies on the side effect of the hint
> > > >> setting the initial affinity. Bah...
> > > >>
> > > >
> > > > Right, but if they only rely on this API so that the IRQs are spread across
> > > > all the CPUs then that issue is already resolved and these other drivers
> > > > should not regress because of changing this behavior. Isn't it?
> > >
> > > Is that true for all architectures?
> >
> > Unfortunately, I don't know and that's probably why we have to be careful.
>
> I think here to ensure that we are not breaking any of the drivers we have
> to first analyze all the existing drivers and understand how they are using
> this API.
> AFAIK there are three possible scenarios:
>
> - A driver use this API to spread the IRQs
>   + For this case we should be safe considering the spreading is naturally
>     done from the IRQ subsystem itself.

Forgot to mention another thing in the above case is to determine whether
it is true for all architectures or not as Thomas mentioned.

>
> - A driver use this API to actually set the hint
>   + These drivers should have no functional impact because of this revert
>
> - Driver use this API to force a certain affinity mask
>   + In this case we have to replace the API with the irq_force_affinity()
>
> I can start looking into the individual drivers, however, testing them will
> be a challenge.
>
> Any thoughts?
>
> --
> Thanks
> Nitesh



-- 
Thanks
Nitesh


  reply	other threads:[~2021-05-21  0:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01  2:18 [PATCH tip:irq/core v1] genirq: remove auto-set of the mask when setting the hint Jesse Brandeburg
2021-05-04 12:15 ` Robin Murphy
2021-05-04 14:29   ` Nitesh Lal
2021-05-04 16:23   ` Jesse Brandeburg
2021-05-17 16:57     ` Nitesh Lal
2021-05-17 17:26       ` Robin Murphy
2021-05-17 18:08         ` Thomas Gleixner
2021-05-17 18:50           ` Robin Murphy
2021-05-17 19:08             ` Thomas Gleixner
2021-05-17 19:43               ` Thomas Gleixner
2021-05-17 20:18               ` Thomas Gleixner
2021-05-17 18:21         ` Nitesh Lal
2021-05-17 19:47           ` Thomas Gleixner
2021-05-17 21:13             ` Nitesh Lal
2021-05-17 20:48     ` Thomas Gleixner
2021-05-17 22:44       ` Nitesh Lal
2021-05-18  0:03         ` Thomas Gleixner
2021-05-18  0:23           ` Nitesh Lal
2021-05-20 21:57             ` Nitesh Lal
2021-05-21  0:03               ` Nitesh Lal [this message]
2021-05-21 11:56                 ` Thomas Gleixner
2021-05-21 12:03                   ` [PATCH] genirq: Provide new interfaces for affinity hints Thomas Gleixner
2021-05-21 15:45                     ` Lijun Pan
2021-05-21 21:45                       ` Thomas Gleixner
2021-05-21 16:13                     ` Nitesh Lal
2021-05-21 21:48                       ` Thomas Gleixner
2021-06-04 20:35                         ` Nitesh Lal
2021-05-27 10:03                     ` Shung-Hsi Yu
2021-05-27 10:21                       ` Shung-Hsi Yu
2021-05-27 13:06                       ` Nitesh Lal
2021-05-28  7:20                         ` Shung-Hsi Yu
2021-06-07 17:00                     ` Nitesh Lal
2021-06-14 16:12                       ` Nitesh Lal
2021-05-21 13:46                   ` [PATCH tip:irq/core v1] genirq: remove auto-set of the mask when setting the hint Nitesh Lal
2021-05-21 15:15                     ` Thomas Gleixner
2021-12-10 19:54 ` [tip: irq/core] genirq: Provide new interfaces for affinity hints tip-bot2 for Thomas Gleixner

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='CAFki+LkB1sk3mOv4dd1D-SoPWHOs28ZwN-PqL_6xBk=Qkm40Lw@mail.gmail.com' \
    --to=nilal@redhat.com \
    --cc=abelits@marvell.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=chris.friesen@windriver.com \
    --cc=davem@davemloft.net \
    --cc=frederic@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jbrandeb@kernel.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jinyuqi@huawei.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=peterz@infradead.org \
    --cc=pjwaskiewicz@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=stephen@networkplumber.org \
    --cc=tglx@linutronix.de \
    --cc=zhangshaokun@hisilicon.com \
    /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;
as well as URLs for NNTP newsgroup(s).