From: piaojun <piaojun@huawei.com>
To: virtio-fs@redhat.com
Subject: Re: [Virtio-fs] [PATCH v4 0/2] virtiofsd: Improve io bandwidth by replacing pwrite with pwritev
Date: Wed, 14 Aug 2019 14:53:44 +0800 [thread overview]
Message-ID: <5D53AFF8.9030206@huawei.com> (raw)
In-Reply-To: <5D4CC344.7030706@huawei.com>
Ping, any comments on this patch?
On 2019/8/9 8:50, piaojun wrote:
>>From my test, write bandwidth will be improved greatly by replacing
> pwrite with pwritev, and the test result as below:
>
> ---
> pwrite:
> # fio -direct=1 -time_based -iodepth=64 -rw=randwrite -ioengine=libaio -bs=1M -size=1G -numjob=16 -runtime=30 -group_reporting -name=file -filename=/mnt/virtiofs/file
> file: (g=0): rw=randwrite, bs=1M-1M/1M-1M/1M-1M, ioengine=libaio, iodepth=64
> ...
> fio-2.13
> Starting 16 processes
> Jobs: 16 (f=16): [w(16)] [100.0% done] [0KB/886.0MB/0KB /s] [0/886/0 iops] [eta 00m:00s]
> file: (groupid=0, jobs=16): err= 0: pid=5799: Tue Aug 6 18:48:26 2019
> write: io=26881MB, bw=916988KB/s, iops=895, runt= 30018msec
>
> pwritev:
> # fio -direct=1 -time_based -iodepth=64 -rw=randwrite -ioengine=libaio -bs=1M -size=1G -numjob=16 -runtime=30 -group_reporting -name=file -filename=/mnt/virtiofs/file
> file: (g=0): rw=randwrite, bs=1M-1M/1M-1M/1M-1M, ioengine=libaio, iodepth=64
> ...
> fio-2.13
> Starting 16 processes
> Jobs: 16 (f=16): [w(16)] [100.0% done] [0KB/1793MB/0KB /s] [0/1793/0 iops] [eta 00m:00s]
> file: (groupid=0, jobs=16): err= 0: pid=6328: Tue Aug 6 18:22:17 2019
> write: io=52775MB, bw=1758.7MB/s, iops=1758, runt= 30009msec
> ---
>
> This patch introduces writev and pwritev for lo_write_buf(). I tried my
> best not doing harm to the origin code construct, and there will be
> some *useless* branches in fuse_buf_copy_one() which are hard to judge
> if they will be useful in the future. So I just leave them alone
> safely. If the cleanup work is necessary, please let me know.
>
> v2
> - Split into two patches
> - Add the lost flags support, such as FUSE_BUF_PHYS_ADDR
>
> v3
> - use git send-email to make the patch set in one thread
> - move fuse_buf_writev() into fuse_buf_copy()
> - use writev for the src buffers when they're alread already mapped by the daemon process
> - use calloc to replace malloc
> - set res 0 if writev() returns 0
>
> v4
> - iterate from in_buf->buf[0] rather than buf[1]
> - optimize the code to make it more elegant
>
> Jun Piao (2):
> add definition of fuse_buf_writev().
> use fuse_buf_writev to replace fuse_buf_write for better performance
>
> Signed-off-by: Jun Piao <piaojun@huawei.com>
> Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> buffer.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
> fuse_common.h | 14 ++++++++++++++
> seccomp.c | 2 ++
> 3 files changed, 64 insertions(+)
> --
>
prev parent reply other threads:[~2019-08-14 6:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 0:50 [Virtio-fs] [PATCH v4 0/2] virtiofsd: Improve io bandwidth by replacing pwrite with pwritev piaojun
2019-08-09 0:51 ` [Virtio-fs] [PATCH v4 1/2] virtiofsd: add definition of fuse_buf_writev() piaojun
2019-08-14 17:07 ` Dr. David Alan Gilbert
2019-09-12 6:09 ` piaojun
2019-08-09 0:53 ` [Virtio-fs] [PATCH v4 2/2] virtiofsd: use fuse_buf_writev to replace fuse_buf_write for better performance piaojun
2019-08-14 12:52 ` Stefan Hajnoczi
2019-08-14 13:28 ` piaojun
2019-08-15 1:11 ` piaojun
2019-08-15 14:50 ` Stefan Hajnoczi
2019-08-16 0:48 ` piaojun
2019-08-19 10:08 ` Stefan Hajnoczi
2019-08-11 2:06 ` [Virtio-fs] [PATCH v4 0/2] virtiofsd: Improve io bandwidth by replacing pwrite with pwritev Eric Ren
2019-08-11 2:46 ` piaojun
2019-08-11 11:15 ` Eric Ren
2019-08-11 13:55 ` piaojun
2019-08-14 12:41 ` Stefan Hajnoczi
2019-08-14 6:53 ` piaojun [this message]
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=5D53AFF8.9030206@huawei.com \
--to=piaojun@huawei.com \
--cc=virtio-fs@redhat.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 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.