From: Will Deacon <will.deacon@arm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: IRQ migration on CPU offline path
Date: Fri, 16 Dec 2011 10:51:01 +0000 [thread overview]
Message-ID: <20111216105101.GB30477@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <m1bor95bop.fsf@fess.ebiederm.org>
On Fri, Dec 16, 2011 at 05:26:46AM +0000, Eric W. Biederman wrote:
> > Argh, ok. Does this mean that other architectures should just preserve the
> > interface that x86 gives (for example not triggering IRQ affinity
> > notifiers)?
>
> Interesting. In this case the affinity notifier is an ugly hack for
> exactly one driver. The affinity notifier is new (This January) and
> buggy. Among other things there appears to be a clear reference count
> leak on the affinity notify structure.
>
> Honestly I don't see much to justify the existence of the affinity
> notifiers, and especially their requirement that they be called in
> process context.
One case I could see (ok, I'm clutching slightly at straws here) is for
modules that want to control the affinity of an IRQ that they are
controlling. irq_set_affinity is not an exported symbol, so they could use
irq_set_affinity_hint to try and stop userspace daemons from messing with
them and use notifiers to keep track of what they ended up with.
> At a practical level since the architects of the affinity notifier
> didn't choose to add notification on migration I don't see why
> you should care.
Suits me :)
> This isn't an x86 versus the rest of the world. This is a
> Solarflare driver vs the rest of the kernel issue. When the Solarflar
> developers care they can fix up arm and all of the rest of the
> architectures that support cpu hot unplug.
Sure, I just think that whatever we do, it should be consistent across
archs, even if it's a driver that is to blame.
> As for threaded interrupt handlers there is probably something
> reasonable that can be done there. My guess is threaded interrupt
> handlers should be handled the same way any other thread is handled
> during cpu hot-unplug. And if something needs to be done I expect the
> generic code can do it.
My first thoughts were that we needed to call irq_set_thread_affinity to set
the IRQTF_AFFINITY bit in the threaD_flags, but actually looking at
irq_thread_check_affinity, I think you're right. The scheduler will deal
with this for us when it migrates kernel threads off the dying CPU.
So the conclusion is: ignore the IRQ affinity notifiers, update the affinity
mask in the irq_data and let the scheduler do the rest.
Thanks for the help!
Will
prev parent reply other threads:[~2011-12-16 10:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 18:34 Will Deacon
2011-12-15 1:25 ` Eric W. Biederman
2011-12-15 16:28 ` Will Deacon
2011-12-16 5:26 ` Eric W. Biederman
2011-12-16 10:51 ` Will Deacon [this message]
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=20111216105101.GB30477@mudshark.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=ebiederm@xmission.com \
--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
all inboxes | Powered by JetHome®