Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1297184

Re: [PATCH v3 66/77] ncr5380: Fix soft lockups

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Michael Schmitz <schmitzmic@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 66/77] ncr5380: Fix soft lockups
Date Wed, 23 Dec 2015 01:50:01 +0100
Message-ID <qIFMR-2FA-1@gated-at.bofh.it> (permalink)
References <qIl1L-6kS-3@gated-at.bofh.it> <qIlbt-6oO-41@gated-at.bofh.it> <qItC1-3qD-1@gated-at.bofh.it> <qIvua-4Bu-19@gated-at.bofh.it>
X-Original-To Finn Thain <fthain@telegraphics.com.au>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fRw9MobzIz4JTycR08RbJ0vQIs4wh4vdW2bWy6oj8F8=; b=AGdtzXpdayAphRtRu8sJ5LlakJp1smPxp0H/YnjUctgoZDGyfWN3Ldca3JkpQ+ZTgD /gaJ+OopA6x/QLEt2Lqqor3UG0ndPvQQmONxXZiNpxKe8aqU+zt55eNY0D+suh5ZdrZk KuNnnVtJr4c2P1aRLZDd3Qm5KRU64XKGu3FP4/ao7uTYjb/zlFom0IZMdzO3DjCj8Evh UyCLN0xywzXFODEIYn51IiVdlwPJ9J0IWJ2EPBwdyNocP+pUS1jucmwpgVlC1xw1zQpN 2pmu0EaNDct36s7Ccc5hnnYLTvrXY++CLDZcCCM4xPEmNNsLV2VhJek7AVfcIDrknzHe tiXw==
MIME-Version 1.0
X-Received by 10.50.30.69 with SMTP id q5mr28511706igh.78.1450831374303; Tue, 22 Dec 2015 16:42:54 -0800 (PST)
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 62
Organization linux.* mail to news gateway
X-Original-Cc One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>, "James E.J. Bottomley" <JBottomley@odin.com>, "Linux/m68k" <linux-m68k@vger.kernel.org>, scsi <linux-scsi@vger.kernel.org>, Linux Kernel Development <linux-kernel@vger.kernel.org>, "Martin K. Petersen" <martin.petersen@oracle.com>, Russell King <linux@arm.linux.org.uk>, linux-arm-kernel@lists.infradead.org
X-Original-Date Wed, 23 Dec 2015 13:42:54 +1300
X-Original-Message-ID <CAOmrzkKit7to8Rp28soAcMG2CtxwWdKhBD2m1zaYLSnD4XnXAg@mail.gmail.com>
X-Original-References <20151222011737.980475848@telegraphics.com.au> <20151222011755.965510468@telegraphics.com.au> <20151222113903.06422dbe@lxorguk.ukuu.org.uk> <alpine.LNX.2.00.1512222347310.23505@nippy.intranet>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1297184

Show key headers only | View raw


I'd like to think that, too - probably true for the Atari TT SCSI case
(can do scatter-gather, can do more than one command per LUN). Worse
for the Falcon SCSI which is the only one I can test (no
scatter-gather, one command per LUN, interrupt shared with IDE and IDE
driver locked out while SCSI command handled).

But that only affects balancing of I/O between IDE and SCSI drivers.
Is that what you are worried about, Alan?

Happy to test whether limiting max_sectors makes a difference in the DMA case.

Cheers,

  Michael



On Wed, Dec 23, 2015 at 2:47 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
>
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v3 66/77] ncr5380: Fix soft lockups Finn Thain <fthain@telegraphics.com.au> - 2015-12-22 03:50 +0100
  Re: [PATCH v3 66/77] ncr5380: Fix soft lockups One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2015-12-22 12:50 +0100
    Re: [PATCH v3 66/77] ncr5380: Fix soft lockups Finn Thain <fthain@telegraphics.com.au> - 2015-12-22 14:50 +0100
      Re: [PATCH v3 66/77] ncr5380: Fix soft lockups Michael Schmitz <schmitzmic@gmail.com> - 2015-12-23 01:50 +0100

csiph-web