From: Milton Miller <miltonm@bga.com>
To: Sebastien Dugue <sebastien.dugue@bull.net>
Cc: Jan-Bernd Themann <ossthema@de.ibm.com>,
Christoph Raisch <RAISCH@de.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH HACK] powerpc: quick hack to get a functional eHEA with hardirq preemption
Date: Wed, 24 Sep 2008 04:58:22 -0500 (CDT) [thread overview]
Message-ID: <200809240958.m8O9wM7k010996@sullivan.realtime.net> (raw)
In-Reply-To: <200809231743.23828.ossthema@de.ibm.com>
Jan-Bernd wrote:
> Ben, can you / your team look into the implementation
> of the set_irq_type functionality needed for XICS?
I'm not volunteering to look at or implement any changes for how xics
works with generic irq, but I'm trying to understand what the rt kernel
is trying to accomplish with this statement:
On Mon Sep 15 at 18:04:06 EST in 2008, Sebastien Dugue wrote:
> When entering the low level handler, level sensitive interrupts are
> masked, then eio'd in interrupt context and then unmasked at the
> end of hardirq processing. That's fine as any interrupt comming
> in-between will still be processed since the kernel replays those
> pending interrupts.
Is this to generate some kind of software managed nesting and priority
of the hardware level interrupts?
The reason I ask is the xics controller can do unlimited nesting
of hardware interrupts. In fact, the hardware has 255 levels of
priority, of which 16 or so are reserved by the hypervisor, leaving
over 200 for the os to manage. Higher numbers are lower in priority,
and the hardware will only dispatch an interrupt to a given cpu if
it is currenty at a lower priority. If it is at a higher priority
and the interrupt is not bound to a specific cpu it will look for
another cpu to dispatch it. The hardware will not re-present an
irq until the it is EOId (managed by a small state machine per
interrupt at the source, which also handles no cpu available try
again later), but software can return its cpu priority to the
previous level to recieve other interrupt sources at the same level.
The hardware also supports lazy update of the cpu priority register
when an interrupt is presented; as long as the cpu is hard-irq
enabled it can take the irq then write is real priority and let the
hw decide if the irq is still pending or it must defer or try another
cpu in the rejection scenerio. The only restriction is that the
EOI can not cause an interrupt reject by raising the priority while
sending the EOI command.
The per-interrupt mask and unmask calls have to go through RTAS, a
single-threaded global context, which in addition to increasing
path length will really limit scalability. The interrupt controller
poll and reject facilities are accessed through hypervisor calls
which are comparable to a fast syscall, and parallel to all cpus.
We used to lower the priority to allow other interrupts in, but we
realized that in addition to the questionable latency in doing so,
it only caused unlimited stack nesting and overflow without per-irq
stacks. We currently set IPIs above other irqs so we typically
only process them during a hard irq (but we return to base level
after IPI and could take another base irq, a bug).
So, Sebastien, with this information, is does the RT kernel have
a strategy that better matches this hardware?
milton
next prev parent reply other threads:[~2008-09-24 9:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 8:04 Sebastien Dugue
2008-09-15 12:35 ` Thomas Klein
2008-09-15 13:13 ` Sebastien Dugue
2008-09-16 11:59 ` Anton Vorontsov
2008-09-16 12:22 ` Sebastien Dugue
2008-09-18 7:53 ` Christoph Raisch
2008-09-18 9:27 ` Sebastien Dugue
2008-09-18 10:42 ` [PATCH HACK] powerpc: quick hack to get a functional eHEA with hardirq preemption, eHCA is close Christoph Raisch
2008-09-18 12:31 ` Sebastien Dugue
2008-09-23 15:43 ` Jan-Bernd Themann
2008-09-24 9:58 ` Milton Miller [this message]
2008-09-24 10:17 ` [PATCH HACK] powerpc: quick hack to get a functional eHEA with hardirq preemption Benjamin Herrenschmidt
2008-09-24 11:02 ` Milton Miller
2008-09-24 21:14 ` Benjamin Herrenschmidt
2008-09-25 7:31 ` Sebastien Dugue
2008-09-24 12:35 ` Sebastien Dugue
2008-09-24 21:15 ` Benjamin Herrenschmidt
2008-09-25 7:18 ` Sebastien Dugue
2008-09-25 7:22 ` Benjamin Herrenschmidt
2008-09-25 7:42 ` Sebastien Dugue
2008-09-25 8:36 ` Benjamin Herrenschmidt
2008-09-25 8:39 ` Sebastien Dugue
2008-09-24 12:30 ` Sebastien Dugue
2008-09-24 16:42 ` Milton Miller
2008-09-24 21:16 ` Benjamin Herrenschmidt
2008-09-25 3:56 ` Milton Miller
2008-09-25 8:45 ` Sebastien Dugue
2008-09-25 23:40 Milton Miller
2008-09-26 9:16 ` Sebastien Dugue
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=200809240958.m8O9wM7k010996@sullivan.realtime.net \
--to=miltonm@bga.com \
--cc=RAISCH@de.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=ossthema@de.ibm.com \
--cc=paulus@samba.org \
--cc=sebastien.dugue@bull.net \
/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®