From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Alex Nixon <alex.nixon@citrix.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
"Alex Nixon (Intern)" <Alex.Nixon@eu.citrix.com>,
Andi Kleen <andi@firstfloor.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ian Campbell <Ian.Campbell@eu.citrix.com>,
"Theodore Ts'o" <tytso@mit.edu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Large increase in context switch rate
Date: Fri, 25 Jul 2008 07:54:05 -0700 [thread overview]
Message-ID: <4889E90D.2000807@goop.org> (raw)
In-Reply-To: <4889B9AE.3050108@citrix.com>
Alex Nixon wrote:
> The relevant changeset had caused the blocksize to default to 1024 (as opposed
> to 4096) - as a result there was a large increase in the time spent waiting on
> pipes.
>
Good work!
> Instead of re-adding the line taken out of fs/pipe.c by Theodore I opted instead
> to change the default block size for pseudo-filesystems to PAGE_SIZE, to try
> avoid making pipe.c inconsistent with Theodore's new approach.
>
> The performance penalty from these extra context switches is fairly small, but
> is magnified when virtualization is involved, hence the desire to keep it lower
> if possible.
>
>
> From 4b568a72fc42b52279507eb4d1339e0637ae719a Mon Sep 17 00:00:00 2001
> From: Alex Nixon <t_alexn@alexn-desktop.(none)>
> Date: Fri, 25 Jul 2008 11:26:44 +0100
> Subject: [PATCH] VFS: increase pseudo-filesystem block size to PAGE_SIZE.
>
> Changeset ba52de123d454b57369f291348266d86f4b35070 caused the block size used
> by pseudo-filesystems to decrease from PAGE_SIZE to 1024 leading to a doubling
> of the number of context switches during a kernbench run.
>
Probably worth explicitly noting the effect on pipe buffer size.
> Signed-off-by: Alex Nixon <Alex.Nixon@citrix.com>
> ---
> fs/libfs.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/libfs.c b/fs/libfs.c
> index baeb71e..1add676 100644
> --- a/fs/libfs.c
> +++ b/fs/libfs.c
> @@ -216,8 +216,8 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
>
> s->s_flags = MS_NOUSER;
> s->s_maxbytes = ~0ULL;
> - s->s_blocksize = 1024;
> - s->s_blocksize_bits = 10;
> + s->s_blocksize = PAGE_SIZE;
> + s->s_blocksize_bits = PAGE_SHIFT;
> s->s_magic = magic;
> s->s_op = ops ? ops : &simple_super_operations;
> s->s_time_gran = 1;
>
J
prev parent reply other threads:[~2008-07-25 14:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 18:54 Large increase in context switch rate Jeremy Fitzhardinge
2008-07-17 9:17 ` Peter Zijlstra
2008-07-17 15:02 ` Jeremy Fitzhardinge
2008-07-17 15:14 ` Alex Nixon (Intern)
2008-07-17 15:21 ` Peter Zijlstra
2008-07-17 15:45 ` Jeremy Fitzhardinge
2008-07-17 16:04 ` Alex Nixon (Intern)
2008-07-17 16:11 ` Jeremy Fitzhardinge
2008-07-17 21:43 ` Andi Kleen
2008-07-18 17:00 ` Alex Nixon (Intern)
2008-07-23 9:34 ` Alex Nixon (Intern)
2008-07-23 13:54 ` Andi Kleen
2008-07-24 1:26 ` Nick Piggin
2008-07-25 11:31 ` Alex Nixon
2008-07-25 11:39 ` Peter Zijlstra
2008-07-25 14:54 ` Jeremy Fitzhardinge [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=4889E90D.2000807@goop.org \
--to=jeremy@goop.org \
--cc=Alex.Nixon@eu.citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=akpm@linux-foundation.org \
--cc=alex.nixon@citrix.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=peterz@infradead.org \
--cc=tytso@mit.edu \
--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 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.