From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
lkp@01.org
Subject: Re: [lkp-robot] [fs] 91f9943e1c: aim7.jobs-per-min -26.6% regression
Date: Tue, 17 Oct 2017 11:06:21 +0800 [thread overview]
Message-ID: <20171017030621.GR26196@yexl-desktop> (raw)
In-Reply-To: <20171016073418.GA28778@lst.de>
On 10/16, Christoph Hellwig wrote:
>The only change for the non-nowait case is that we now do a trylock before
>locking i_rwsem. In the past that was the more optimal pattern. Can you
>test the patch below if that's not the case anymore? We have a few more
>instances like that which might also want to be changed then.
>
The test result showed this fix patch helps recover the performance.
Below is the comparison (41d4b81 is the fix commit applied on top of 91f9943e1c).
$ compare -at 91f9943e1c7b6638f27312d03f 41d4b81c40b8873aa29b4b0224da3caf0242dd1c
tests: 1
testcase/path_params/tbox_group/run: aim7/4BRD_12G-RAID1-xfs-disk_rd-9000-performance/lkp-ivb-ep01
91f9943e1c7b6638 41d4b81c40b8873aa29b4b0224
---------------- --------------------------
%stddev change %stddev
\ | \
353690 32% 467669 aim7.jobs-per-min
153 -24% 116 aim7.time.elapsed_time
153 -24% 116 aim7.time.elapsed_time.max
5670 -26% 4184 ± 3% aim7.time.system_time
69648 ± 15% -30% 48932 ± 11% aim7.time.voluntary_context_switches
774279 ± 4% -33% 522402 ± 6% aim7.time.involuntary_context_switches
63750 -20% 51085 interrupts.CAL:Function_call_interrupts
43353 4% 45157 vmstat.system.in
Thanks,
Xiaolong
>diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
>index 309e26c9dddb..ad61c78605d1 100644
>--- a/fs/xfs/xfs_file.c
>+++ b/fs/xfs/xfs_file.c
>@@ -258,10 +258,11 @@ xfs_file_buffered_aio_read(
> ssize_t ret;
>
> trace_xfs_file_buffered_read(ip, iov_iter_count(to), iocb->ki_pos);
>-
>- if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
>- if (iocb->ki_flags & IOCB_NOWAIT)
>+
>+ if (iocb->ki_flags & IOCB_NOWAIT) {
>+ if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
> return -EAGAIN;
>+ } else {
> xfs_ilock(ip, XFS_IOLOCK_SHARED);
> }
> ret = generic_file_read_iter(iocb, to);
prev parent reply other threads:[~2017-10-17 3:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 2:40 [lkp-robot] [fs] 91f9943e1c: aim7.jobs-per-min -26.6% regression kernel test robot
2017-10-16 7:34 ` Christoph Hellwig
2017-10-17 3:06 ` Ye Xiaolong [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=20171017030621.GR26196@yexl-desktop \
--to=xiaolong.ye@intel.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=torvalds@linux-foundation.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