From: Keith Busch <kbusch@kernel.org>
To: Lauri Kasanen <cand@gmx.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-mips@vger.kernel.org, tsbogend@alpha.franken.de,
axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH v9] block: Add n64 cart driver
Date: Fri, 22 Jan 2021 09:11:20 -0800 [thread overview]
Message-ID: <20210122171120.GA1728441@dhcp-10-100-145-180.wdc.com> (raw)
In-Reply-To: <20210122185619.980fa4f713b8f57528c3af9e@gmx.com>
On Fri, Jan 22, 2021 at 06:56:19PM +0200, Lauri Kasanen wrote:
> On Fri, 22 Jan 2021 16:39:13 +0000
> Christoph Hellwig <hch@infradead.org> wrote:
>
> > On Fri, Jan 22, 2021 at 06:23:49PM +0200, Lauri Kasanen wrote:
> > > > Your driver can communicate the required alignment using the
> > > > blk_queue_update_dma_alignment API.
> > >
> > > Is it guaranteed to be physically contiguous?
> >
> > The alignment requirement applies to each bio_vec.
> >
> > What alignment does the hardware require?
>
> It requires 8-byte alignment, but the buffer must also be physically
> contiguous.
Each bio_vec segment is physically contiguous.
> I grepped around, but apparently no driver under drivers/block does
> direct DMA to the bio buffer. They all use their own buffer and memcpy,
> like this patch. ps3vram, ps3disk, amiflop, etc etc.
block/brd.c
> If all existing drivers use their own buffer, why is a different
> approach required for new drivers?
It's certainly more efficient to send the data directly to the
destination without an unnecessary middle-man. And 64k seems like quite
a lot of memory to sequestor considering how little you have to start
with.
next prev parent reply other threads:[~2021-01-22 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 9:00 [PATCH v9] block: Add n64 cart driver Lauri Kasanen
2021-01-22 11:17 ` Christoph Hellwig
2021-01-22 13:58 ` Lauri Kasanen
2021-01-22 16:18 ` Christoph Hellwig
2021-01-22 16:23 ` Lauri Kasanen
2021-01-22 16:39 ` Christoph Hellwig
2021-01-22 16:56 ` Lauri Kasanen
2021-01-22 17:08 ` Christoph Hellwig
2021-01-22 17:11 ` Keith Busch [this message]
2021-01-22 18:01 ` Lauri Kasanen
2021-01-22 18:20 ` Christoph Hellwig
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=20210122171120.GA1728441@dhcp-10-100-145-180.wdc.com \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=cand@gmx.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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).