Re: [PATCH] efivarfs: avoid slow QueryVariableInfo() in statfs()

"Ard Biesheuvel" <[email protected]>
Newsgroups org.kernel.vger.linux-doc,org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 17 Sep 2026, at 18:50, Prashant Singh wrote:
> On Thu, 17 Sep 2026, at 10:36, Ard Biesheuvel wrote:
>> Could we instead introduce a mount option that disables used/available
>> reporting entirely? Feel free to set the default to 'disabled' when
>> CONFIG_PREEMPT_RT is set.
>
> Will do. I'll add a bool mount option (e.g. statfs_capacity) that, when
> disabled, skips QueryVariableInfo() in statfs() and reports 0
> used/available, defaulting to disabled under CONFIG_PREEMPT_RT.
>

Let's call it nostatfs.

> If you'd rather df still show numbers without the per-statfs firmware
> call, I could instead prime the value once at mount and serve that
> (stale but non-zero) as a "cached" mode -- i.e. a tri-state option:
>
>   statfs_capacity=live|cached|off
>     live   - current behaviour: rate-limited QueryVariableInfo() on statfs()
>     cached - prime once at mount, serve the static value (no per-statfs call)
>     off    - report 0 used/available (no firmware call at all)
>
>   default: live on non-RT, off on CONFIG_PREEMPT_RT
>
> Happy either way.
>

No, let's keep it simple. Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.