linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@canonical.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jens Axboe <axboe@fb.com>,
	Nicholas Bellinger <nab@linux-iscsi.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	target-devel@vger.kernel.org
Subject: Re: switch loop and target to use ITER_BVEC iov_iter
Date: Thu, 22 Jan 2015 12:11:18 +0800	[thread overview]
Message-ID: <CACVXFVPcS-cyB-_t65c6e3-n4AOY=+WuLOUg1uq_OUdhy7sBqw@mail.gmail.com> (raw)
In-Reply-To: <1421593624-4462-1-git-send-email-hch@lst.de>

On Sun, Jan 18, 2015 at 11:07 PM, Christoph Hellwig <hch@lst.de> wrote:
> This series adds two new helpers to easily read from and write to bio_bvecs,
> and switches the loop driver and target file backend to use it.
>
> Using bio_vecs directly avoids the need to kmap individual elements in
> the callers, which is epecially important in the target driver, and also
> gets rid of the horrible splice code abuse hack in the loop driver.

IMO, from driver or kernel view, submit()/complete() model
is very very common, and is more efficient because unnecessary
context switch and process' creation can be avoided when concurrent
read/write is needed for sake of performance, so I think kernel
aio based API is better. My test result about kernel aio based loop
shows CPU can be saved much with kernel AIO in [2].

Currently the kernel AIO based approach for loop(v2 patches, [1] [2])
only handles direct I/O with ITER_BVEC, but it is quite easy to
cover non-direct I/O by BVEC with supporting current submission.

For encrypt_type loop, it may be covered by kernel aio interface too.

I will try to cover the above two loop cases by kernel based AIO in
v3, then the current ->write() and splice code may be removed once
it is done.

[1] http://marc.info/?l=linux-kernel&m=142116394225654&w=2
[2] http://marc.info/?l=linux-kernel&m=142116397525668&w=2

Thanks,
Ming Lei

  parent reply	other threads:[~2015-01-22  4:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 15:07 switch loop and target to use ITER_BVEC iov_iter Christoph Hellwig
2015-01-18 15:07 ` [PATCH 1/3] fs: add vfs_bvec_{read,write} helpers Christoph Hellwig
2015-01-23  6:00   ` Al Viro
2015-01-18 15:07 ` [PATCH 2/3] loop: convert to vfs_bvec_write Christoph Hellwig
2015-01-18 15:07 ` [PATCH 3/3] target: use vfs_bvec_read/write Christoph Hellwig
2015-01-18 15:37   ` Sagi Grimberg
2015-01-20 23:32   ` Nicholas A. Bellinger
2015-01-23 14:08   ` Ming Lei
2015-01-25 13:43     ` Christoph Hellwig
2015-01-26  2:02       ` Ming Lei
2015-01-26 16:59         ` Christoph Hellwig
2015-01-27  5:14           ` Ming Lei
2015-01-22  4:11 ` Ming Lei [this message]
2015-01-25 13:45   ` switch loop and target to use ITER_BVEC iov_iter 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='CACVXFVPcS-cyB-_t65c6e3-n4AOY=+WuLOUg1uq_OUdhy7sBqw@mail.gmail.com' \
    --to=ming.lei@canonical.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).