All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Richard Weinberger <richard@nod.at>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-um@lists.infradead.org,
	"linux-mtd @ lists . infradead . org"
	<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg
Date: Wed, 17 Oct 2018 08:14:18 +0200	[thread overview]
Message-ID: <20181017061418.GA21790@lst.de> (raw)
In-Reply-To: <CAFLxGvwx4TPTHRY91LMBdd7h4pgCjw2zY7Q67r3CRHTqfzSB1w@mail.gmail.com>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>, Richard Weinberger <richard@nod.at>,
	linux-um@lists.infradead.org, linux-block@vger.kernel.org,
	"linux-mtd @ lists . infradead . org"
	<linux-mtd@lists.infradead.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg
Date: Wed, 17 Oct 2018 08:14:18 +0200	[thread overview]
Message-ID: <20181017061418.GA21790@lst.de> (raw)
In-Reply-To: <CAFLxGvwx4TPTHRY91LMBdd7h4pgCjw2zY7Q67r3CRHTqfzSB1w@mail.gmail.com>

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.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/


  reply	other threads:[~2018-10-17  6:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15  6:56 [PATCH, RFC] ubd: remove use of blk_rq_map_sg Christoph Hellwig
2018-10-15  6:56 ` Christoph Hellwig
2018-10-15  8:40 ` Richard Weinberger
2018-10-15  8:40   ` Richard Weinberger
2018-10-15  8:45   ` Christoph Hellwig
2018-10-15  8:45     ` Christoph Hellwig
2018-10-15 19:17     ` Richard Weinberger
2018-10-15 19:17       ` Richard Weinberger
2018-10-15 20:42       ` Richard Weinberger
2018-10-15 20:42         ` Richard Weinberger
2018-10-15 20:55         ` Christoph Hellwig
2018-10-15 20:55           ` Christoph Hellwig
2018-10-15 21:46           ` Richard Weinberger
2018-10-15 21:46             ` Richard Weinberger
2018-10-15 22:04             ` Jens Axboe
2018-10-15 22:04               ` Jens Axboe
2018-10-15 22:44               ` Richard Weinberger
2018-10-15 22:44                 ` Richard Weinberger
2018-10-16  2:19                 ` Jens Axboe
2018-10-16  2:19                   ` Jens Axboe
2018-10-16  8:38                   ` Richard Weinberger
2018-10-16  8:38                     ` Richard Weinberger
2018-10-16 14:26                     ` Jens Axboe
2018-10-16 14:26                       ` Jens Axboe
2018-10-17  6:21                       ` Christoph Hellwig
2018-10-17  6:21                         ` Christoph Hellwig
2018-10-18 21:04                         ` Richard Weinberger
2018-10-18 21:04                           ` Richard Weinberger
2018-10-15  8:46   ` Anton Ivanov
2018-10-16 22:43 ` Richard Weinberger
2018-10-16 22:43   ` Richard Weinberger
2018-10-17  6:14   ` Christoph Hellwig [this message]
2018-10-17  6:14     ` 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=20181017061418.GA21790@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard.weinberger@gmail.com \
    --cc=richard@nod.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.