[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4889E90D.2000807@goop.org>
Date: Fri, 25 Jul 2008 07:54:05 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Alex Nixon <alex.nixon@...rix.com>
CC: Nick Piggin <nickpiggin@...oo.com.au>,
"Alex Nixon (Intern)" <Alex.Nixon@...citrix.com>,
Andi Kleen <andi@...stfloor.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ian Campbell <Ian.Campbell@...citrix.com>,
Theodore Ts'o <tytso@....edu>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Large increase in context switch rate
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@...xn-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@...rix.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists