From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752880Ab1IBPD3 (ORCPT ); Fri, 2 Sep 2011 11:03:29 -0400 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:30863 "EHLO g5t0007.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531Ab1IBPD0 (ORCPT ); Fri, 2 Sep 2011 11:03:26 -0400 Date: Fri, 2 Sep 2011 10:03:21 -0500 From: scameron@beardog.cce.hp.com To: Eric Dumazet Cc: Jon Mason , Jesse Barnes , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stephenmcameron@gmail.com, thenzl@redhat.com, akpm@linux-foundation.org, mikem@beardog.cce.hp.com, linux-pci@vger.kernel.org, Roland Dreier , James Bottomley Subject: Re: [BUG] scsi: hpsa: how to destroy your files Message-ID: <20110902150321.GU9189@beardog.cce.hp.com> References: <1314898815.2823.33.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <1314903038.3067.27.camel@dabdike> <20110901125938.7cb1da85@jbarnes-desktop> <20110901200349.GO9189@beardog.cce.hp.com> <20110901130930.5caec2d4@jbarnes-desktop> <20110901204419.GY8422@beardog.cce.hp.com> <1314956388.2573.7.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <1314958133.2573.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1314958133.2573.13.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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