public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hironobu Ishii <ishii.hironobu@jp.fujitsu.com>
To: Grant Grundler <iod00d@hp.com>, Greg KH <greg@kroah.com>
Cc: Jesse Barnes <jbarnes@sgi.com>,
	linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
	linux-ia64@vger.kernel.org, jeremy@sgi.com
Subject: Re: [PATCH] readX_relaxed interface
Date: Mon, 19 Jan 2004 18:31:42 +0900	[thread overview]
Message-ID: <023b01c3de6f$10276820$2987110a@lsd.css.fujitsu.com> (raw)
In-Reply-To: 20040116050059.GA13222@cup.hp.com


----- Original Message ----- 
From: "Grant Grundler" <iod00d@hp.com>


> On Thu, Jan 15, 2004 at 04:32:25PM -0800, Greg KH wrote:
> > It looks ok, but it would really be good if we could indicate if the
> > read actually was successful.  Right now some platforms can detect
> > faults and do not have a way to get that error back to the driver in a
> > sane manner.  If we were to change the read* functions to look something
> > like:
> > int readb(void *addr, u8 *data);
> > it would be a world easier.
> 
> I've worked on systems with that kind of an interface and it
> really makes a mess of the code. And many of the drivers just
> ignored the read return value.

I've also worked on such system.
I understand it's difficult all drivers use that kind of an interface.
But if some common drivers like scsi, FC and LAN drivers use such interface,
it's usefull for most users.

> 
> > Now I'm not saying I want to change the existing interfaces to support
> > this, that's too much code to change for even me (and is a 2.7 thing.)
> 
> I think you'll find it's extremely invasive if it's going to be useful.
> The drivers have to be rewritten to check each PIO return value
> and then do something intelligent at that point. HPUX had drivers
> that did this for "Host Power Fail" support 10 years ago but
> it's *very* difficult to get all the error handling right in
> each of the code pathes.
> 
> My preference is the driver register a "clean up all pending IO and
> free related data structures" so it's back to a state as if it hadn't
> been started. Then when a PIO read (or write) fails, the mechanism for
> detecting the read failure doesn't depend on synchronous errors being
> reported/checked by software on each read. ie the mechanism for
> detecting the failure *can* be in the PIO read code path but
> doesn't have to be if HW has facilities to detect failures.
> (I'm thinking of parisc HPMC and ia64 MCA handling).

But, when the read thread continues without noticing the error
(before the error is asynchronously notified),
the thread runs based on wrong data and may panic.
So I think PIO read error must be notified synchronously.

On the other hand, PIO write error can be notified asynchronously,
because software does not use it.

Hironobu Ishii

  reply	other threads:[~2004-01-19  9:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15 20:49 [PATCH] readX_relaxed interface Jesse Barnes
2004-01-15 22:16 ` Grant Grundler
2004-01-15 22:56   ` Jesse Barnes
2004-01-16  3:19   ` Jeremy Higdon
2004-01-16  0:32 ` Greg KH
2004-01-16  2:21   ` Jesse Barnes
2004-01-16  5:00   ` Linus Torvalds
2004-01-16 17:21     ` Jesse Barnes
2004-01-16  5:00   ` Grant Grundler
2004-01-19  9:31     ` Hironobu Ishii [this message]
2004-01-19 18:18       ` Grant Grundler
2004-01-16  5:50   ` Grant Grundler

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='023b01c3de6f$10276820$2987110a@lsd.css.fujitsu.com' \
    --to=ishii.hironobu@jp.fujitsu.com \
    --cc=greg@kroah.com \
    --cc=iod00d@hp.com \
    --cc=jbarnes@sgi.com \
    --cc=jeremy@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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