From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Moore, Eric Moore'" <Eric.Moore@lsil.com>, linux-scsi@vger.kernel.org
Cc: 'James Bottomley' <James.Bottomley@SteelEye.com>
Subject: RE: mpt fusion driver performance issue in 2.6.14-rc2
Date: Tue, 11 Oct 2005 18:10:46 -0700 [thread overview]
Message-ID: <200510120111.j9C1B9g14181@unix-os.sc.intel.com> (raw)
In-Reply-To: <001a01c5c650$25719050$1b1015ac@ericmoore>
On Friday, September 30, 2005 6:27 PM, Chen, Kenneth W wrote:
> Chen, Kenneth W wrote on Thursday, September 29, 2005 11:59 AM
>> Something happened in between kernel 2.6.12 and 2.6.14-rc2, where
>> disk performance went 20X slower on the latest release kernel. I
>> suspect it has something to do with the fusion driver. This showed
>> up in the boot log: "mptscsih: ioc0: DV: Release failed." is it
>> significant?
>
> I think the bug is for real, and it is in the mpt fusion driver. I'm
> not an expert of LSI53C1030 host controller, and I won't pretend to be
> one. Though I have data to show what is going on:
>
> There are two threads during driver initialization. One does domain
> validation (mptscsih_domainValidation) and one does host controller
> initialization (mptspi_probe). During 2nd host controller bringup,
> i.e., bringing up ioc1, it temporary disables first channel (ioc0).
> However, DV is in progress on ioc0 in another thread (and possibly
> running on another CPU). The effect of disabling ioc0 during in-
> progress-domain-validation is that it causes all subsequent DV
> commands to fail and resulting lowest possible performance setting
> for almost all disks pending DV.
>
> Here is a fix that I propose: for the period that ioc0 need to be
> disabled for bringing up ioc1, ioc->active is marked with a special
> flag and have DV thread busy wait on that flag. This avoid mptspi_probe
> thread clash into the DV thread causing brain-damage to DV.
>
> With the patch, all disks are up to the performance expectation and it
> also fixed the "mptscsih: ioc0: DV: Release failed" error message.
>
Moore, Eric Moore wrote on Friday, September 30, 2005 11:20 PM
> Thanks for you findings into this.
>
> I'm moving across town, and will not be in the office, nor have
> internet access for the next couple days. I will look into this when
> I return.
Any time frame when this is going to be looked into and have the bug
fixed? If no objection, please apply.
Simple "hdparm -t" shows:
vanilla 2.6.14-rc3:
Timing buffered disk reads: 8 MB in 3.16 seconds = 2.53 MB/sec
2.6.14-rc3 + patch:
Timing buffered disk reads: 174 MB in 3.02 seconds = 57.55 MB/sec
---
Fix race between domain validation and host controller initialization
for mpt fusion driver.
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
--- ./drivers/message/fusion/mptbase.c.orig 2005-09-30 17:16:16.051906000 -0700
+++ ./drivers/message/fusion/mptbase.c 2005-09-30 17:18:50.811670000 -0700
@@ -740,8 +740,12 @@ mpt_get_msg_frame(int handle, MPT_ADAPTE
#endif
/* If interrupts are not attached, do not return a request frame */
- if (!ioc->active)
- return NULL;
+ if (ioc->active <= 0) {
+ while (ioc->active == -1)
+ schedule_timeout_uninterruptible(1);
+ if (!ioc->active)
+ return NULL;
+ }
spin_lock_irqsave(&ioc->FreeQlock, flags);
if (!list_empty(&ioc->FreeQ)) {
@@ -1495,7 +1499,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u3
/* Disable alt-IOC's reply interrupts (and FreeQ) for a bit ... */
CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, 0xFFFFFFFF);
- ioc->alt_ioc->active = 0;
+ ioc->alt_ioc->active = -1;
}
hard = 1;
next prev parent reply other threads:[~2005-10-12 1:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B05667366EE6204181EABE9C1B1C0EB50484F7D4@scsmsx401.amr.corp.intel.com>
2005-10-01 0:27 ` mpt fusion driver performance issue in 2.6.14-rc2 Chen, Kenneth W
2005-10-01 6:19 ` Moore, Eric Moore
2005-10-12 1:10 ` Chen, Kenneth W [this message]
2005-10-14 0:07 Moore, Eric Dean
-- strict thread matches above, loose matches on Subject: below --
2005-10-12 20:57 Moore, Eric Dean
2005-10-12 21:05 ` Chen, Kenneth W
2005-09-29 18:59 Chen, Kenneth W
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=200510120111.j9C1B9g14181@unix-os.sc.intel.com \
--to=kenneth.w.chen@intel.com \
--cc=Eric.Moore@lsil.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox