Re: [BUG] scsi: hpsa: how to destroy your files

From: scameron
Date: Fri Sep 02 2011 - 11:03:31 EST


On Fri, Sep 02, 2011 at 12:08:53PM +0200, Eric Dumazet wrote:
> Le vendredi 02 septembre 2011 à 11:39 +0200, Eric Dumazet a écrit :
> > Le jeudi 01 septembre 2011 à 16:50 -0500, Jon Mason a écrit :
> >
> > > I believe modifying the MRRS values is what is causing the issues.
> > > Can you try the attached patch and verify that it also resolves the
> > > issue?
> >
> > I tested this patch and can confirm this solves the corruption problem.
> >
> > But my disk is _much_ slower than before
> >
> > # hdparm -t /dev/sda1
> >
> > Before :
> >
> > Timing buffered disk reads: 254 MB in 3.02 seconds = 84.16 MB/sec
> >
> > After :
> >
> > Timing buffered disk reads: 120 MB in 3.04 seconds = 39.42 MB/sec
>
> Hmm, this speed regression is probably old : the 84MB/s was with the
> standard debian 6.0.2 kernel (2.6.32-5-amd64)
>

This regression might be due to these two patches:

d0be5ec8693944c2e2fc0de70fda9dbc1b93bd7d
[SCSI] hpsa: do readl after writel in main i/o path to ensure commands don't get lost.

Apparently we've been doin it rong for a decade, but only lately do we
run into problems.
and
fec62c368b9c8b05d5124ca6c3b8336b537f26f3
[SCSI] hpsa: do not attempt to read from a write-only register

Most smartarrays tolerate it, but a few new ones don't.
Without this change some newer Smart Arrays will lock up
and i/o will grind to a halt.

with the second patch being a correction to the first.

It seems like the readl after the writel should not be needed,
and wasn't needed for a very long time, but there is some very
hard to trigger and not yet well understood problem in which very
occasionally a command would get lost and the driver thinks a
command is out, but controller firmware thinks all commands are
completed -- a circumstance which tends to make things grind to
a halt.

Those two patches avoid that problem.

-- steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/