All of lore.kernel.org
 help / color / mirror / Atom feed
From: linas <linas@austin.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] ppc64: EEH Avoid racing reports of errors
Date: Fri, 7 Oct 2005 10:23:05 -0500	[thread overview]
Message-ID: <20051007152305.GY29826@austin.ibm.com> (raw)
In-Reply-To: <17219.47007.44643.148022@cargo.ozlabs.ibm.com>

On Wed, Oct 05, 2005 at 09:23:11PM +1000, Paul Mackerras was heard to remark:
> Linas writes:
> 
> > 06-eeh-report-race.patch
> 
> Shouldn't you pass in pe_dn->child here, or
> alternatively rearrange __eeh_mark_slot to do the node you give it
> plus its children (recursively)?

Yes; that's right; this gets fixed in a later patch in the series. 
I guess this one snuck by while I was trying to sync up all the
different patches I was carrying :-/

> Two other comments about __eeh_mark_slot: (1) despite the comment, the
> function doesn't do anything to any pci_dev or pci_driver 

The comment is also a "back port" of function that shows up in a later
patch, and so indeed is inappropriate for this patch. Again, my excuse 
is that I got sloppy while juggling all of these patchlets. Sorry.

> (not that it
> should be touching any pci_driver), 

One problem I was seeing was that after getting an EEH error, 
some device drivers would start spinning in thier interrupt handlers.
I tried to break out of this spin-loop by adding a call to a
function that asked "am I the victim of an EEH event"?  
Unfortunately, the first implementation of this call was not 
interrupt safe (pci_device_to_OF_node calls traverse_pci_devices).
While scratching my head on to how to best fix this, I decided that 
the best thing to do would be to mark up the pci driver with a flag;
that way, the driver can look up te EEH state without any further ado.

One might be able to get rid of this state in pci_driver, 
although it seemed generically useful to have.  For example,
later on, I futzed with a version that disabled the irq line 
for that adapter "as soon as possible", and that seems to also 
work, at least on an SMP machine. On a non-SMP machine, there 
is still the danger that the device driver is spinning with 
interrupts disabled, waiting on a status regiser to change, 
that will never change. (And because of the deadlock, the 
code to disable a given irq line never runs).  Its all
depends on how the device driver got written.

> and (2) a recursive function can't
> really be inline 

Well, no, but at least the first level call can be inlined; I assumed 
that gcc would do at least that, but didn't check.

--linas


  reply	other threads:[~2005-10-07 15:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30  0:48 [PATCH 0/7] ppc64: Assorted minor EEH cleanups linas
2005-09-30  0:51 ` [PATCH 1/7] ppc64: EEH typos, include files, macros, whitespace linas
2005-10-05 11:11   ` Paul Mackerras
2005-10-07 19:46     ` linas
2005-09-30  0:53 ` [PATCH 2/7] ppc64: EEH PCI address cache cleanups linas
2005-09-30  0:54 ` [PATCH 3/7] ppc64: EEH Add event/internal state statistics linas
2005-10-05 11:14   ` Paul Mackerras
2005-10-07 14:59     ` linas
2005-09-30  0:56 ` [PATCH 4/7] ppc64: EEH PCI slot error details abstraction linas
2005-09-30  0:58 ` [PATCH 5/7] ppc64: EEH handle empty PCI slot failure linas
2005-09-30  1:00 ` [PATCH 6/7] ppc64: EEH Avoid racing reports of errors linas
2005-10-05 11:23   ` Paul Mackerras
2005-10-07 15:23     ` linas [this message]
2005-09-30  1:02 ` [PATCH 7/7] ppc64: EEH Halt if bad drivers spin in error condition linas
2005-09-30  4:49   ` Doug Maxey
2005-09-30 14:58     ` linas
2005-09-30 22:29 ` [PATCH 0/7] ppc64: Assorted minor EEH cleanups linas

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=20051007152305.GY29826@austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /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.