linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: fthain@telegraphics.com.au (Finn Thain)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 66/77] ncr5380: Fix soft lockups
Date: Wed, 23 Dec 2015 00:47:36 +1100 (AEDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1512222347310.23505@nippy.intranet> (raw)
In-Reply-To: <20151222113903.06422dbe@lxorguk.ukuu.org.uk>


On Tue, 22 Dec 2015, One Thousand Gnomes wrote:

> On Tue, 22 Dec 2015 12:18:44 +1100 Finn Thain 
> <fthain@telegraphics.com.au> wrote:
> 
> > Because of the rudimentary design of the chip, it is necessary to poll 
> > the SCSI bus signals during PIO and this tends to hog the CPU. The 
> > driver will accept new commands while others execute, and this causes 
> > a soft lockup because the workqueue item will not terminate until the 
> > issue queue is emptied.
> > 
> > When exercising dmx3191d using sequential IO from dd, the driver is 
> > sent 512 KiB WRITE commands and 128 KiB READs. For a PIO transfer, the 
> > rate is is only about 300 KiB/s, so these are long-running commands. 
> > And although PDMA may run at several MiB/s, interrupts are disabled 
> > for the duration of the transfer.
> > 
> > Fix the unresponsiveness and soft lockup issues by calling 
> > cond_resched() after each command is completed and by limiting 
> > max_sectors for drivers that don't implement real DMA.
> 
> Is there a reason for not doing some limiting in the DMA case too. A 
> 512K write command even with DMA on a low end 68K box introduces a 
> second of latency before another I/O can be scheduled ?

The DMA case is the atari_scsi case. I'd like to think that atari_scsi 
would have only the latency issues that might be expected from any SCSI-2 
host adapter driver.

Unlike PDMA, interrupts are not disabled for these DMA transfers. Note 
that this patch isn't really relevant to DMA, because the main loop 
iterates only when done == 0, that is, !hostdata->dmalen.

-- 

> 
> Alan

  reply	other threads:[~2015-12-22 13:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151222011737.980475848@telegraphics.com.au>
2015-12-22  1:17 ` [PATCH v3 05/77] ncr5380: Remove NCR5380_local_declare and NCR5380_setup macros Finn Thain
2015-12-22  1:17 ` [PATCH v3 07/77] ncr5380: Split NCR5380_init() into two functions Finn Thain
2015-12-22  1:17 ` [PATCH v3 19/77] ncr5380: Cleanup bogus {request, release}_region() calls Finn Thain
2015-12-22  7:05   ` [PATCH v3 19/77] ncr5380: Cleanup bogus {request,release}_region() calls Hannes Reinecke
2015-12-22  1:17 ` [PATCH v3 20/77] ncr5380: Introduce unbound workqueue Finn Thain
2015-12-22  7:10   ` Hannes Reinecke
2015-12-22 12:44     ` Finn Thain
2015-12-22 14:48       ` Hannes Reinecke
2015-12-22  1:18 ` [PATCH v3 24/77] ncr5380: Implement NCR5380_dma_xfer_len and remove LIMIT_TRANSFERSIZE macro Finn Thain
2015-12-22  7:17   ` Hannes Reinecke
2015-12-22  1:18 ` [PATCH v3 45/77] ncr5380: Cleanup #include directives Finn Thain
2015-12-22  7:42   ` Hannes Reinecke
2015-12-22  1:18 ` [PATCH v3 51/77] ncr5380: Remove command list debug code Finn Thain
2015-12-22  7:47   ` Hannes Reinecke
2015-12-22  1:18 ` [PATCH v3 57/77] ncr5380: Use standard list data structure Finn Thain
2015-12-22  7:55   ` Hannes Reinecke
2015-12-22  1:18 ` [PATCH v3 66/77] ncr5380: Fix soft lockups Finn Thain
2015-12-22  8:03   ` Hannes Reinecke
2015-12-22 11:39   ` One Thousand Gnomes
2015-12-22 13:47     ` Finn Thain [this message]
2015-12-23  0:42       ` Michael Schmitz

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=alpine.LNX.2.00.1512222347310.23505@nippy.intranet \
    --to=fthain@telegraphics.com.au \
    --cc=linux-arm-kernel@lists.infradead.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).