From: ebiederm@xmission.com (Eric W. Biederman)
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [patch] Add allowed_affinity to the irq_desc to make it possible to have restricted irqs
Date: Wed, 13 Dec 2006 12:41:10 -0700 [thread overview]
Message-ID: <m1lklbport.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <1166018020.27217.805.camel@laptopd505.fenrus.org> (Arjan van de Ven's message of "Wed, 13 Dec 2006 14:53:40 +0100")
Arjan van de Ven <arjan@linux.intel.com> writes:
> [due to a broken libata in current -git I've not been able to test this patch
> enough]
>
>
> This patch adds an "allowed_affinity" mask to each interrupt, in addition to the
> existing actual affinity mask. In addition this new mask is exported to
> userspace
> in a similar way as the actual affinity is exported. (this is so that irqbalance
> can find out about the restriction and take it into account)
>
> The purpose for having this mask is to allow for the situation where interrupts
> just can't or shouldn't go to all cpus; one example is the "per cpu" IRQ thing
> that powerpc and others have. Another soon-to-come example is MSIX devices that
> can generate a different MSI interrupt for each cpu; in that case the MSI needs
> to
> be strictly constrained to it's designated cpu.
I don't like this. If we really have constraints that limit which cpus
we can handle a irqs on we should be taking advantage of them to make
the data structure smaller, not making it bigger.
This feels like a forced fit. To fit the situations you describe
into allowed_affinity you have to throw away information. Such
as the fact it is a NUMA node or a MSI-X interrupt.
In addition the cases I can think of allowed_affinity is the wrong
name. suggested_affinity sounds like what you are trying to implement
and when it is merely a suggestion and not a hard limit it doesn't
make sense to export like this.
The restriction with MSIX is that we want the irq that describes
the flow of data and the user space process that consumes that flow of
data scheduled on the same cpu. Yes this is mostly one per cpu but it
is not strictly one per cpu so allowed cpus doesn't make sense in that
case.
The more I think about describing what we are schedule, we are
scheduling a more or less periodic realtime process don't we already
have schedulers in the kernel to schedule this kind of thing? Don't
we want to take into consideration the cache penalty of migration
before we decided to move the irq to another cpu?
Anyway if we are going to start exporting this kind of information
please let's export the whole context and export it in a way that
applications besides irqbalance can take advantage of. Otherwise
we are just committing to support a wide kernel/user space interface
for the purposes of a single application and that seems ridiculous.
Eric
next prev parent reply other threads:[~2006-12-13 19:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 13:53 [patch] Add allowed_affinity to the irq_desc to make it possible to have restricted irqs Arjan van de Ven
2006-12-13 19:41 ` Eric W. Biederman [this message]
2006-12-13 19:43 ` Ingo Molnar
2006-12-13 20:06 ` Eric W. Biederman
2006-12-13 20:19 ` Ingo Molnar
2006-12-13 20:23 ` Arjan van de Ven
2006-12-14 4:14 ` Eric W. Biederman
2006-12-14 6:24 ` Yinghai Lu
2006-12-14 7:55 ` Arjan van de Ven
2006-12-14 8:22 ` Eric W. Biederman
2006-12-14 8:23 ` Arjan van de Ven
2006-12-14 8:34 ` Eric W. Biederman
2006-12-14 8:40 ` Arjan van de Ven
2006-12-13 20:02 ` Arjan van de Ven
2006-12-13 20:16 ` Eric W. Biederman
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=m1lklbport.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.