linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Chao Yu <chao@kernel.org>
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: Tue, 10 Jan 2023 20:58:21 +0300	[thread overview]
Message-ID: <Y72nPcDDC/+10lYK@p183> (raw)
In-Reply-To: <20230110152003.1118777-1-chao@kernel.org>

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.

I doubt anything uses f_bsize.

BTW this patch is not self contained.

  reply	other threads:[~2023-01-10 17:59 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 [this message]
2023-01-11  9:20   ` Chao Yu

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=Y72nPcDDC/+10lYK@p183 \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chao@kernel.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).