linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Badari <pbadari@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: adilger@clusterfs.com, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext2 statfs improvement for block and inode free count
Date: Tue, 16 Oct 2007 15:18:03 -0700	[thread overview]
Message-ID: <4715389B.5070004@us.ibm.com> (raw)
In-Reply-To: <20071016150033.677efd09.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Fri, 13 Jul 2007 18:36:54 -0700
> Badari Pulavarty <pbadari@us.ibm.com> wrote:
>
>   
>> More statfs() improvements for ext2. ext2 already maintains
>> percpu counters for free blocks and inodes. Derive free
>> block count and inode count by summing up percpu counters,
>> instead of counting up all the groups in the filesystem
>> each time.
>>
>>
>> Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
>> Acked-by: Andreas Dilger <adilger@clusterfs.com>
>>
>>  fs/ext2/super.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> Index: linux-2.6.22/fs/ext2/super.c
>> ===================================================================
>> --- linux-2.6.22.orig/fs/ext2/super.c	2007-07-13 20:06:38.000000000 -0700
>> +++ linux-2.6.22/fs/ext2/super.c	2007-07-13 20:06:51.000000000 -0700
>> @@ -1136,12 +1136,12 @@ static int ext2_statfs (struct dentry * 
>>  	buf->f_type = EXT2_SUPER_MAGIC;
>>  	buf->f_bsize = sb->s_blocksize;
>>  	buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead;
>> -	buf->f_bfree = ext2_count_free_blocks(sb);
>> + 	buf->f_bfree = percpu_counter_sum(&sbi->s_freeblocks_counter);
>>  	buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count);
>>  	if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count))
>>  		buf->f_bavail = 0;
>>  	buf->f_files = le32_to_cpu(es->s_inodes_count);
>> -	buf->f_ffree = ext2_count_free_inodes(sb);
>> + 	buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter);
>>  	buf->f_namelen = EXT2_NAME_LEN;
>>  	fsid = le64_to_cpup((void *)es->s_uuid) ^
>>  	       le64_to_cpup((void *)es->s_uuid + sizeof(u64));
>>
>>     
>
> Guys, I have this patch in a stalled state pending some convincing
> demonstration/argument that it's actually a worthwhile change.
>
> How much hurt will it cause on large-numa, and how much benefit do we get
> for that hurt? 
>   
Unfortunately, I couldn't find any noticeable significant improvements 
with or without this patch.
May be none of my filesystems are large enough on a large enough NUMA 
box to verify.
Lets drop it for now and re-visit it if needed.

Thanks,
Badari

  reply	other threads:[~2007-10-16 22:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-14  1:36 [PATCH] ext2 statfs improvement for block and inode free count Badari Pulavarty
2007-07-19  3:18 ` Andrew Morton
2007-07-19 15:18   ` Badari Pulavarty
2007-07-20  9:01     ` Andreas Dilger
2007-10-16 22:00 ` Andrew Morton
2007-10-16 22:18   ` Badari [this message]
2007-10-17 23:15   ` Andreas Dilger

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=4715389B.5070004@us.ibm.com \
    --to=pbadari@us.ibm.com \
    --cc=adilger@clusterfs.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).