linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jim Ramsay <jim.ramsay@gmail.com>
To: Linux-ide <linux-ide@vger.kernel.org>
Cc: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Subject: Re: libata and sata_promise errors when using multiple disks on the same controller simultaneously
Date: Fri, 15 Jul 2005 13:33:13 -0600	[thread overview]
Message-ID: <4789af9e0507151233235ee42@mail.gmail.com> (raw)
In-Reply-To: <4789af9e050705111263cc6f7b@mail.gmail.com>

I have further characterized the error.  It looks like, at least
during the softraid rebuild process, most DMA commands are sent to the
PCI card and then complete via an IRQ callback before the next command
is sent.  However, the problem I see here sometimes occurrs when:

- Command for drive 1 is sent to the PCI card via DMA
(sata_promise.c:pdc_packet_start)
- Command for drive 2 is sent to the PCI card via DMA before the
previous command completes
- Command for drive 1 completes (sata_promise.c:pdc_host_intr)

Often the command for drive 2 will now timeout.

Now, I have seen the case when this above scenario will actually
complete successfully, either with a second IRQ just for the drive2
command, or sometimes with a single IRQ which completes both commands.

I have a workaround using a semaphore which causes all commands to
strictly serialize, (lock it in pdc_packet_start, unlock in
pdc_host_intr) thereby not allowing any concurrent commands, but this
appears to have a large performance impact.  At least it allows me to
actually cause my softraid device to finish syncing to 100%.

I'm looking for other solutions, or a clue as to the actual cause of
the error.  My current theory is that if the second command is sent to
the PCI via DMA too soon, it may be overlooked, so some rate-limiting
may be useful, if I can figure out how to implement it.

Any comments or suggestions here would be greatly appreciated, thanks!

-- 
Jim Ramsay
"Me fail English?  That's unpossible!"

  reply	other threads:[~2005-07-15 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-05 18:12 libata and sata_promise errors when using multiple disks on the same controller simultaneously Jim Ramsay
2005-07-15 19:33 ` Jim Ramsay [this message]
     [not found]   ` <fab4e42a05072410043f0ccfd5@mail.gmail.com>
2005-07-26  2:01     ` Jarrod Johnson
2005-07-23 22:45 ` Thorild Selen

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=4789af9e0507151233235ee42@mail.gmail.com \
    --to=jim.ramsay@gmail.com \
    --cc=jarrod.b.johnson@gmail.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).