From: fengguang.wu@intel.com
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
lkp@linux.intel.com
Subject: [pipe] b8597fdc23: -8% regression of hackbench throughput
Date: Sun, 5 Jan 2014 12:46:48 +0800 [thread overview]
Message-ID: <20140105044648.GA28257@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]
Hi Dmitry,
We measured some 8% drop of hackbench throughput with your small commit
b8597fdc23 ("fs/pipe.c: skip file_update_time on frozen fs"). Comparing to its
parent commit, we also see increased context switches:
5b6e04beb19abc9 b8597fdc23f8f6e26a531e9a7
--------------- -------------------------
231874 ~ 1% -7.3% 214834 ~ 2% lkp-snb01/micro/hackbench/1600%-process-pipe
87774 ~ 3% -10.7% 78419 ~ 4% xps2/micro/hackbench/1600%-process-pipe
319649 -8.3% 293253 TOTAL hackbench.throughput
5b6e04beb19abc9 b8597fdc23f8f6e26a531e9a7
--------------- -------------------------
3673577 ~ 1% +17.4% 4312376 ~ 2% lkp-snb01/micro/hackbench/1600%-process-pipe
195669 ~ 3% +156.6% 502173 ~ 4% xps2/micro/hackbench/1600%-process-pipe
3869246 +24.4% 4814550 TOTAL vmstat.system.cs
5b6e04beb19abc9 b8597fdc23f8f6e26a531e9a7
--------------- -------------------------
6.311e+08 ~ 2% +33.7% 8.437e+08 ~ 1% lkp-snb01/micro/hackbench/1600%-process-pipe
21485632 ~ 3% +411.9% 1.1e+08 ~ 8% xps2/micro/hackbench/1600%-process-pipe
6.526e+08 +46.1% 9.537e+08 TOTAL time.involuntary_context_switches
5b6e04beb19abc9 b8597fdc23f8f6e26a531e9a7
--------------- -------------------------
1.563e+09 ~ 2% +12.8% 1.763e+09 ~ 3% lkp-snb01/micro/hackbench/1600%-process-pipe
96703947 ~ 3% +102.7% 1.96e+08 ~ 3% xps2/micro/hackbench/1600%-process-pipe
1.66e+09 +18.0% 1.959e+09 TOTAL time.voluntary_context_switches
The bisect looks stable:
time.involuntary_context_switches
9e+08 ++---------------------------------------------------------------+
| O |
8.5e+08 O+O O O O O O O O O |
| O O O O O O O O O O |
8e+08 ++ O |
| |
7.5e+08 ++ |
| |
7e+08 ++ |
|.* *.*.*.*.* *. .* *. |
6.5e+08 *+ + + + + *.*.*.* .*.* + + *. *. .* *. |
| * * + .*..* * *. + *.* + + *.*
6e+08 ++ * * * |
| |
5.5e+08 ++---------------------------------------------------------------+
Thanks,
Fengguang
[-- Attachment #2: 0001-fs-pipe.c-skip-file_update_time-on-frozen-fs.patch --]
[-- Type: text/x-diff, Size: 1215 bytes --]
>From b8597fdc23f8f6e26a531e9a7da3c5fe7b99752c Mon Sep 17 00:00:00 2001
From: Dmitry Monakhov <dmonakhov@openvz.org>
Date: Tue, 17 Dec 2013 10:45:35 +1100
Subject: [PATCH] fs/pipe.c: skip file_update_time on frozen fs
Pipe has no data associated with fs so it is not good idea to block
pipe_write() if FS is frozen, but we can not update file's time on such
filesystem. Let's use same idea as we use in touch_time().
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=65701
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/pipe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 0e0752e..78fd0d0 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -663,10 +663,11 @@ out:
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
}
- if (ret > 0) {
+ if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
int err = file_update_time(filp);
if (err)
ret = err;
+ sb_end_write(file_inode(filp)->i_sb);
}
return ret;
}
--
1.8.5.2
reply other threads:[~2014-01-05 4:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140105044648.GA28257@localhost \
--to=fengguang.wu@intel.com \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@linux.intel.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 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).