From: Finn Thain <fthain@telegraphics.com.au>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tejun Heo <tj@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-ide@vger.kernel.org,
Linux/m68k <linux-m68k@lists.linux-m68k.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support
Date: Thu, 26 Jan 2017 19:47:48 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1701261944160.23370@nippy.intranet> (raw)
In-Reply-To: <1585626b-5642-3e42-2d40-52fae49c9e59@gmail.com>
On Mon, 23 Jan 2017, Michael Schmitz wrote:
>
> Am 21.01.2017 um 20:37 schrieb Finn Thain:
>
> >
> > Actually, the fundamental problem you are describing is partly solved.
> > By polling for DMA completion with local irqs disabled, we mostly
> > avoid the need for the stdma.c "lock" because FDC/SCSI/IDE interrupt
> > handlers can never interfere with a FDC/SCSI DMA process that might be
> > underway.
>
> I hadn't considered that. Can PDMA for Falcon SCSI coexist with
> interrupt-using DMA for TT SCSI in the same driver (i.e. as runtime
> options)?
Sure, why not?
> How much overhead and latency would polling for DMA completion add?
>
A polled DMA transfer should be faster than PDMA (i.e. mac_scsi, g_NCR5380
etc). mac_scsi gets about 0.5 MBps from PDMA with sg_tablesize == 1, and I
hope that DMA could get twice that (notwithstanding dumb hardware design).
This would imply CPU overhead that is half of that which mac_scsi incurs.
That's the best case, but I see no reason to expect worse performance than
PDMA gets.
> atari_irq_pending(IRQ_MFP_FSCSI) should show the interrupt pending
> condition if you want to poll for it.
The difficulty will be arranging for disabled FDC & IDE interrupt sources
during SCSI DMA, and disabled SCSI & IDE interrupt sources during FDC DMA.
(Not all 5380 interrupts can be disabled; no idea about the IDE device or
WD1772 FDC.)
But if that is impossible, we just have to detect the short DMA that might
result from an undesired interrupt.
> That's actually given me another idea to pursue - if we can ensure the
> IDE interrupt handler is always run first,
There are no interrupts from the ATA driver you're testing, right? If you
would re-introduce them, the whole polled DMA idea is moot.
> and check whether the interrupt is still pending when the SCSI or floppy
> interrupt handler runs and DMA has been in progress, we should be able
> to avoid calling the respective handlers unnecessarily.
>
> (The output of atari_irq_pending() does not directly reflect the status
> of the MFP IRQ inputs - that would require testing bits in
> st_mfp.par_dt_reg instead. )
>
> > I don't think the IDE/ATA driver needs to be included. atari_scsi and
> > ataflop would though (if both drivers need DMA transfers).
>
> If we manage to separate interrupt sharing from DMA access locking, IDE
> would not need to take part in the locking. I'm assuming that IDE can
> cope with spurious interrupts and won't get confused by a SCSI
> interrupt.
>
The ATA driver will never have to cope with a spurious interrupt under my
simplifying assumptions discussed earlier, so the spurious interrupt
question seems to belong to some alternative approach...
> I think it could work both ways - polling for DMA completion or avoiding
> to call the SCSI interrupt handler the interrupt was caused by IDE only.
> But it's indeed time to put that to the test.
>
... "Both ways"? I don't follow. I don't see how IDE can share the FDC and
SCSI interrupt line without sharing the stdma.c locking scheme. What is
the alternative approach (i.e not polled DMA) that you alude to?
--
next prev parent reply other threads:[~2017-01-26 8:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161230140139epcas5p160eda5a6a77be084e21f12002c85cc2a@epcas5p1.samsung.com>
2016-12-30 14:01 ` [PATCH 0/3] ata: add m68k/Atari Falcon PATA support Bartlomiej Zolnierkiewicz
2016-12-30 14:01 ` [PATCH 1/3] ata: allow subsystem to be used on m68k arch Bartlomiej Zolnierkiewicz
2016-12-30 14:12 ` Christoph Hellwig
2016-12-30 17:14 ` Bartlomiej Zolnierkiewicz
2017-01-08 10:08 ` Christoph Hellwig
2017-01-09 16:01 ` Bartlomiej Zolnierkiewicz
2017-01-09 16:15 ` Geert Uytterhoeven
2016-12-30 14:01 ` [PATCH 2/3] ata: pass queued command to ->sff_data_xfer method Bartlomiej Zolnierkiewicz
2016-12-30 14:01 ` [PATCH 3/3] ata: add Atari Falcon PATA controller driver Bartlomiej Zolnierkiewicz
2017-01-03 10:49 ` [PATCH 0/3] ata: add m68k/Atari Falcon PATA support Geert Uytterhoeven
2017-01-09 16:11 ` Bartlomiej Zolnierkiewicz
2017-01-10 16:09 ` Tejun Heo
2017-01-05 21:01 ` Michael Schmitz
2017-01-10 12:53 ` Bartlomiej Zolnierkiewicz
2017-01-10 20:02 ` Michael Schmitz
2017-01-13 2:33 ` Finn Thain
2017-01-14 8:55 ` Michael Schmitz
2017-01-14 23:47 ` Finn Thain
2017-01-15 1:48 ` Michael Schmitz
2017-01-15 4:42 ` Finn Thain
2017-01-20 7:49 ` Michael Schmitz
2017-01-21 7:37 ` Finn Thain
2017-01-23 8:04 ` Michael Schmitz
2017-01-26 8:47 ` Finn Thain [this message]
2017-01-26 9:03 ` Geert Uytterhoeven
2017-01-27 1:41 ` Finn Thain
2017-01-27 4:28 ` Michael Schmitz
2017-02-01 8:40 ` Finn Thain
2017-02-01 8:45 ` Geert Uytterhoeven
2017-02-02 7:48 ` Michael Schmitz
2017-01-10 16:11 ` Tejun Heo
2017-02-15 8:45 ` Geert Uytterhoeven
2017-02-20 18:15 ` Bartlomiej Zolnierkiewicz
2017-02-21 22:18 ` Tejun Heo
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.1701261944160.23370@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=b.zolnierkie@samsung.com \
--cc=geert@linux-m68k.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitzmic@gmail.com \
--cc=schwab@linux-m68k.org \
--cc=tj@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