public inbox for linux-rt-devel@lists.linux.dev
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-rt-devel@lists.linux.dev
Cc: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
	"John Ogness" <john.ogness@linutronix.de>,
	"Lai Jiangshan" <jiangshanlai@gmail.com>,
	"Tejun Heo" <tj@kernel.org>
Subject: Re: [PATCH 0/2] efi: Expose the runtime-services workqueue via sysfs
Date: Mon, 09 Feb 2026 18:10:52 +0100	[thread overview]
Message-ID: <4c6a5533-6fcd-4237-bb35-0ca74029c7db@app.fastmail.com> (raw)
In-Reply-To: <20260205115559.1625236-1-bigeasy@linutronix.de>

Hello Sebastian,

On Thu, 5 Feb 2026, at 12:55, Sebastian Andrzej Siewior wrote:
> EFI runtime services are disabled on PREEMPT_RT by default which can be
> overwritten on the boot command line. For native EFI, an invocation
> requires to disable preemption while a call is made into EFI.

This is no longer true on arm64 since

commit a5baf582f4c026c25a206ac121bceade926aec74
Author: Ard Biesheuvel <ardb@kernel.org>
Date:   Wed Oct 15 22:56:42 2025 +0200

    arm64/efi: Call EFI runtime services without disabling preemption

except for some corner cases (reboot, pstore crash dump).

> The time
> spent in EFI is not deterministic and depends on SW and HW of the
> system.
> While accessing the efi-rtc device can be avoided by using a native
> driver, accessing the "variables" is important and there is no second
> path.
>
> The "runtime-wrappers" is wrapping access to the EFI callback via a
> workqueue. On a SMP system one CPU could be declared as housekeeping/
> not-realtime-capable and force all EFI invocation to be performed on
> this CPU. This could be achieved by setting workqueue.unbound_cpus or
> 	/sys/devices/virtual/workqueue/cpumask
>
> at runtime. This however will affect all workqueues and might not be
> desired. With an explicit setting such as
> 	/sys/devices/virtual/workqueue/efi_runtime/cpumask
>
> it looks like an official way to limit the CPUs involved here.
>
> With this in place I was wondering if EFI_DISABLE_RUNTIME could be
> lifted at runtime on SMP systems. But given the unbound_cpus option
> and the auto-config based on NOHZ-full it might not be wise to add yet
> another smart option here. Also it needs to be a subset of root cpumask
> or it won't be effective.
>
> There are two EFI invocations which are not covered by this
> - mixed EFI
>   Used on x86 with 64bit kernel but 32bit EFI. Would it work to use here
>   the same workqueue mechanism?
>

That stuff is beyond obsolete, so I don't think it is relevant for RT.

> - TEE / ARM secure monitor
>   If I understand this right then TEE invokes the secure monitor which
>   is preemptible. So an interrupt will interrupt and enter "normal"
>   world immediately and could wake a user task. The following context
>   switch will not happen because the return from interrupt path goes
>   back to the secure monitor/ TEE.
>   If so, or if TEE may disable interrupts from normal world, would it
>   make sense to use a wrapper here, too?
>
> Any comments or things I have missed?
>
> Sebastian
>
> Sebastian Andrzej Siewior (2):
>   workqueue: Allow to expose ordered workqueues via sysfs
>   efi: Allow to expose the workqueue via sysfs
>
>  drivers/firmware/efi/efi.c |  2 +-
>  kernel/workqueue.c         | 14 +++++++-------
>  2 files changed, 8 insertions(+), 8 deletions(-)
>

Acked-by: Ard Biesheuvel <ardb@kernel.org>


  parent reply	other threads:[~2026-02-09 17:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 11:55 [PATCH 0/2] efi: Expose the runtime-services workqueue via sysfs Sebastian Andrzej Siewior
2026-02-05 11:55 ` [PATCH 1/2] workqueue: Allow to expose ordered workqueues " Sebastian Andrzej Siewior
2026-02-05 13:39   ` Sebastian Andrzej Siewior
2026-02-05 21:59     ` Tejun Heo
2026-02-05 11:55 ` [PATCH 2/2] efi: Allow to expose the workqueue " Sebastian Andrzej Siewior
2026-02-09 15:17 ` [PATCH 0/2] efi: Expose the runtime-services " Luis Claudio R. Goncalves
2026-02-09 15:55   ` Sebastian Andrzej Siewior
2026-02-12  7:09     ` Ilias Apalodimas
2026-02-12 16:20       ` Sebastian Andrzej Siewior
2026-02-13  6:28         ` Ilias Apalodimas
2026-02-09 17:10 ` Ard Biesheuvel [this message]
2026-02-12 15:18   ` 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=4c6a5533-6fcd-4237-bb35-0ca74029c7db@app.fastmail.com \
    --to=ardb@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=jiangshanlai@gmail.com \
    --cc=john.ogness@linutronix.de \
    --cc=lgoncalv@redhat.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=tj@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