From: Christoph Hellwig <hch@infradead.org>
To: Douglas Gilbert <dgilbert@interlog.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
jejb@linux.vnet.ibm.com, hare@suse.de, bvanassche@acm.org,
bostroesser@gmail.com, jgg@ziepe.ca
Subject: Re: [PATCH v2 2/5] scatterlist: add sgl_copy_sgl() function
Date: Tue, 15 Nov 2022 21:59:07 -0800 [thread overview]
Message-ID: <Y3R8K1UZJN3TtDza@infradead.org> (raw)
In-Reply-To: <20221112194939.4823-3-dgilbert@interlog.com>
On Sat, Nov 12, 2022 at 02:49:36PM -0500, Douglas Gilbert wrote:
> Both the SCSI and NVMe subsystems receive user data from the block
> layer in scatterlist_s
No, they don't. For one thing there is no 'scatterlist_s', and
second no one receives it. Block drivers need to generate it
using the blk_rq_map_sg helper.
> (aka scatter gather lists (sgl) which are
> often arrays). If drivers in those subsystems represent storage
> (e.g. a ramdisk) or cache "hot" user data then they may also
> choose to use scatterlist_s. Currently there are no sgl to sgl
> operations in the kernel. Start with a sgl to sgl copy. Stops
> when the first of the number of requested bytes to copy, or the
> source sgl, or the destination sgl is exhausted. So the
> destination sgl will _not_ grow.
No, the scatterlist is a bad data structure, but for now we have
to use it for dma-mapping non-contigous pieces of memory. For
everything else it absolutely should not be used, and we should
not add helpers to facilitate that.
NAK for this and the other helpers.
next prev parent reply other threads:[~2022-11-16 5:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 19:49 [PATCH v2 0/5] scatterlist: add operations for scsi_debug Douglas Gilbert
2022-11-12 19:49 ` [PATCH v2 1/5] sgl_alloc_order: remove 4 GiB limit Douglas Gilbert
2022-11-15 20:33 ` Jason Gunthorpe
2022-11-16 0:20 ` Douglas Gilbert
2022-11-16 0:39 ` Jason Gunthorpe
2022-11-12 19:49 ` [PATCH v2 2/5] scatterlist: add sgl_copy_sgl() function Douglas Gilbert
2022-11-16 5:59 ` Christoph Hellwig [this message]
2022-11-12 19:49 ` [PATCH v2 3/5] scatterlist: add sgl_equal_sgl() function Douglas Gilbert
2022-11-12 19:49 ` [PATCH v2 4/5] scatterlist: add sgl_memset() Douglas Gilbert
2022-11-12 19:49 ` [PATCH v2 5/5] scsi_debug: change store from vmalloc to sgl Douglas Gilbert
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=Y3R8K1UZJN3TtDza@infradead.org \
--to=hch@infradead.org \
--cc=bostroesser@gmail.com \
--cc=bvanassche@acm.org \
--cc=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jgg@ziepe.ca \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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