linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] proc: introduce proc_statfs()
Date: Wed, 11 Jan 2023 17:20:07 +0800	[thread overview]
Message-ID: <0dca406a-e331-a8f7-da8d-95ba89705598@kernel.org> (raw)
In-Reply-To: <Y72nPcDDC/+10lYK@p183>

On 2023/1/11 1:58, Alexey Dobriyan wrote:
> On Tue, Jan 10, 2023 at 11:20:03PM +0800, Chao Yu wrote:
>> Introduce proc_statfs() to replace simple_statfs(), so that
>> f_bsize queried from statfs() can be consistent w/ the value we
>> set in s_blocksize.
>>
>> stat -f /proc/
>>
>> Before:
>>      ID: 0        Namelen: 255     Type: proc
>> Block size: 4096       Fundamental block size: 4096
>> Blocks: Total: 0          Free: 0          Available: 0
>> Inodes: Total: 0          Free: 0
>>
>> After:
>>      ID: 0        Namelen: 255     Type: proc
>> Block size: 1024       Fundamental block size: 1024
>> Blocks: Total: 0          Free: 0          Available: 0
>> Inodes: Total: 0          Free: 0
> 
> 4096 is better value is in fact.
> 
> seq_files allocate 1 page and fill it, therefore reading less than
> PAGE_SIZE from /proc is mostly waste of syscalls.

Ah, thanks for correcting me, so, how about updating .s_blocksize and
.s_blocksize_bits to PAGE_SIZE and PAGE_SHIFT?

> 
> I doubt anything uses f_bsize.
> 
> BTW this patch is not self contained.

Oh, yes, my bad.

Thanks,


      reply	other threads:[~2023-01-11  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 15:20 [PATCH] proc: introduce proc_statfs() Chao Yu
2023-01-10 17:58 ` Alexey Dobriyan
2023-01-11  9:20   ` Chao Yu [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=0dca406a-e331-a8f7-da8d-95ba89705598@kernel.org \
    --to=chao@kernel.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).