public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg
       [not found] <20181015065637.1860-1-hch@lst.de>
@ 2018-10-16 22:43 ` Richard Weinberger
  2018-10-17  6:14   ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2018-10-16 22:43 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Richard Weinberger, Jens Axboe, linux-block, linux-um,
	linux-mtd @ lists . infradead . org

On Mon, Oct 15, 2018 at 8:56 AM Christoph Hellwig <hch@lst.de> wrote:
>
> There is no good reason to create a scatterlist in the ubd driver,
> it can just iterate the request directly.

BTW: Does it make sense to drop blk_rq_map_sq from()
drivers/mtd/ubi/block.c too?
If so we have to allocate a temporary structure for the worker thread
for each segment, just like
UBD does already. I'm not sure if that is cheaper than blk_rq_map_sq().

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg
  2018-10-16 22:43 ` [PATCH, RFC] ubd: remove use of blk_rq_map_sg Richard Weinberger
@ 2018-10-17  6:14   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-10-17  6:14 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Christoph Hellwig, Richard Weinberger, Jens Axboe, linux-block,
	linux-um, linux-mtd @ lists . infradead . org

On Wed, Oct 17, 2018 at 12:43:14AM +0200, Richard Weinberger wrote:
> On Mon, Oct 15, 2018 at 8:56 AM Christoph Hellwig <hch@lst.de> wrote:
> >
> > There is no good reason to create a scatterlist in the ubd driver,
> > it can just iterate the request directly.
> 
> BTW: Does it make sense to drop blk_rq_map_sq from()
> drivers/mtd/ubi/block.c too?
> If so we have to allocate a temporary structure for the worker thread
> for each segment, just like
> UBD does already. I'm not sure if that is cheaper than blk_rq_map_sq().

UBI should not need a new per-thread structure, mostly because there
are no threads involved.  The scatterlist support in UBI only seems
to exists for ubiblock, but it goes down a few layers.  In the end
all that could switch to a iov_iter-like setup and clean things up
a lot, but it would be a fair amount of work.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-17  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20181015065637.1860-1-hch@lst.de>
2018-10-16 22:43 ` [PATCH, RFC] ubd: remove use of blk_rq_map_sg Richard Weinberger
2018-10-17  6:14   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox