From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
"Prashant Singh" <singhpra@juniper.net>
Cc: "Jeremy Kerr" <jk@ozlabs.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jonathan Corbet" <corbet@lwn.net>,
linux-doc@vger.kernel.org,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Clark Williams" <clrkwllms@kernel.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2] efivarfs: add nostatfs mount option to skip QueryVariableInfo()
Date: Thu, 24 Sep 2026 13:12:17 +0200 [thread overview]
Message-ID: <f7a04536-61e8-40df-8876-260dd2ef4fa8@app.fastmail.com> (raw)
In-Reply-To: <arUD_p0Vn4qyBH_e@redhat.com>
On Thu, 24 Sep 2026, at 13:05, Luis Claudio R. Goncalves wrote:
> On Fri, Sep 18, 2026 at 09:41:24PM -0700, Prashant Singh wrote:
>> QueryVariableInfo() is an EFI runtime service that, on some firmware,
>> takes tens of milliseconds and runs with preemption disabled, stalling
>> the CPU that services it. efivarfs_statfs() calls it (rate-limited since
>> commit b2326338dc68 ("efivarfs: Rate limit statfs() handler")) to report
>> the variable-store used/available capacity, so any statfs(2) -- e.g.
>> every "df" -- can inject that stall into unrelated latency-sensitive
>> workloads on the same CPU.
>>
>> Add a "nostatfs" mount option: when set, statfs(2) skips
>> QueryVariableInfo() entirely and reports zero used/available. It is set
>> by default on CONFIG_PREEMPT_RT so real-time kernels do not take the
>> stall out of the box.
>
> I tested the patch and was quite satisfied with the results, but upon a
> comment from colleagues I ran a few more tests and noticed (confirmed their
> hunch) that fwupd complains about not being able to get the free space in
> efivars:
>
> # fwupdmgr get-devices | grep efivars
> │ Update Error: getting efivars free space is not supported
> │ │ Update Error: getting efivars free space is not supported
> ...
>
> I was not able to establish whether that would prevent specific operations
> due to the HW I had available for such test.
>
We might have to teach fwupdmgr to check the efivarfs mount flags and remount
it if it requires this information. We should check whether that is possible
with the current version of the patch.
> One idea that I have been musing over is whether or not it would be interesting
> to create a static view of the efivars statfs data when first mounting it
> and updating this data whenever efivars is modified (create/write/delete).
> Does that sound reasonable?
>
efivarfs is not the only component setting EFI variables. You would also have to
hook every caller of efivar_set_variable() as well as efi.set_variable().
next prev parent reply other threads:[~2026-09-24 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 4:41 Prashant Singh
2026-09-19 4:50 ` sashiko-bot
2026-09-19 14:51 ` Ard Biesheuvel
2026-09-24 10:56 ` Ard Biesheuvel
2026-09-24 11:05 ` Luis Claudio R. Goncalves
2026-09-24 11:12 ` Ard Biesheuvel [this message]
2026-09-24 11:19 ` Steve McIntyre
2026-09-24 11:36 ` Luis Claudio R. Goncalves
2026-09-24 11:59 ` Ard Biesheuvel
2026-09-25 1:45 ` Prashant Singh
2026-09-25 6:14 ` Sebastian Andrzej Siewior
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=f7a04536-61e8-40df-8876-260dd2ef4fa8@app.fastmail.com \
--to=ardb@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=corbet@lwn.net \
--cc=jk@ozlabs.org \
--cc=lgoncalv@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=singhpra@juniper.net \
/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
all inboxes | Powered by JetHome®