Re: [PATCH HACK] powerpc: quick hack to get a functional eHEA with hardirq preemption

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sebastien Dugue
Date: Wednesday, September 24, 2008 - 5:30 am

Hi Milton,

On Wed, 24 Sep 2008 04:58:22 -0500 (CDT) Milton Miller <miltonm@bga.com> wrote:


  No, not really. This is only to be sure to not miss interrupts coming
from the same source that were received during threaded hardirq processing.
Some instrumentation showed that it never seems to happen in the eHEA
interrupt case, so I think we can forget this aspect.

  Also, the problem only manifests with the eHEA RX interrupt. For example,
the IBM Power Raid (ipr) SCSI exhibits absolutely no problem under an RT
kernel. From this I conclude that:

  IPR - PCI - XICS is OK
  eHEA - IBMEBUS - XICS is broken with hardirq preemption.

  I also checked that forcing the eHEA interrupt to take the non threaded
path does work.


  Here is a side by side comparison of the fasteoi flow with and without hardirq
threading (sorry it's a bit wide)


					fasteoi flow:
					------------

	Non threaded hardirq			|			threaded hardirq
						|
   interrupt context				|	   interrupt context		hardirq thread
   -----------------				|	   -----------------		--------------
						|
						|
clear IRQ_REPLAY and IRQ_WAITING		|	clear IRQ_REPLAY and IRQ_WAITING
						|
increment percpu interrupt count		|	increment percpu interrupt count
						|
if no action or IRQ_INPROGRESS or IRQ_DISABLED	|	if no action or IRQ_INPROGRESS or IRQ_DISABLED
						|
  set IRQ_PENDING				|	  set IRQ_PENDING
						|
  mask						|	  mask
						|
  eoi						|	  eoi
						|
  done						|	  done
						|
set IRQ_INPROGRESS				|	set IRQ_INPROGRESS
						|
						|
						|	wakeup IRQ thread
						|
						|	mask
						|
						|	eoi
						|
						|	done		     --
						|			       \
						|				\
						|				 \
						|				  --> loop
						|
clear IRQ_PENDING				|				        clear IRQ_PENDING
						|
call handle_IRQ_event				|				        call handle_IRQ_event
						|
						|					check for prempt
						|
						|				      until IRQ_PENDING cleared
						|
						|
clear IRQ_INPROGRESS				|				      clear IRQ_INPROGRESS
						|
if not IRQ_DISABLED				|				      if not IRQ_DISABLED
						|
  unmask					|				        unmask
						|
eoi						|
						|
done						|




  the non-threaded flow does (in interrupt context):

    mask
    handle interrupt
    unmask
    eoi

  the threaded flow does:

    mask
    eoi
		handle interrupt
		unmask

  If I remove the mask() call, then the eHEA is no longer hanging.


  Don't think so. I think that the problem may be elsewhere as
everything is fine with PCI devices (well at least SCSI).

  As I said earlier in another mail, it seems that the eHEA
is behaving as if it was generating edge interrupts which do not
support masking. Don't know.

  Thanks a lot for the explanation, looks like the xics + hypervisor
combo is way more complex than I thought.

  Sebastien.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Christoph Raisch, (Thu Sep 18, 12:53 am)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Jan-Bernd Themann, (Tue Sep 23, 8:43 am)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Wed Sep 24, 3:17 am)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Sebastien Dugue, (Wed Sep 24, 5:30 am)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Wed Sep 24, 2:14 pm)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Wed Sep 24, 2:15 pm)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Wed Sep 24, 2:16 pm)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Thu Sep 25, 12:22 am)
Re: [PATCH HACK] powerpc: quick hack to get a functional e ..., Benjamin Herrenschmidt, (Thu Sep 25, 1:36 am)