The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Rui Qi <qirui.001@bytedance.com>
Cc: linux-riscv@lists.infradead.org, Paul Walmsley <pjw@kernel.org>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Alexandre Ghiti <alex@ghiti.fr>, Nam Cao <namcao@linutronix.de>,
	 Kees Cook <kees@kernel.org>,
	Jingwei Wang <wangjingwei@iscas.ac.cn>,
	 open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: hwprobe: Register unaligned probes before usermode
Date: Thu, 6 Aug 2026 12:50:11 -0600 (MDT)	[thread overview]
Message-ID: <8884ef1b-9fd2-7300-d7f1-38d061cabf0c@kernel.org> (raw)
In-Reply-To: <20260721150511.1607105-1-qirui.001@bytedance.com>

Hi, 

On Tue, 21 Jul 2026, Rui Qi wrote:

> The hwprobe vDSO data is populated by the first riscv_hwprobe syscall.
> Some values, such as MISALIGNED_VECTOR_PERF, may depend on the async
> vector unaligned access speed probe registered by
> check_unaligned_access_all_cpus().
> 
> That initcall currently runs at late_initcall level. However,
> rootfs_initcall enables usermode helpers before late initcalls run, so an
> early helper can execute userspace and call riscv_hwprobe first.
> 
> In that case complete_hwprobe_vdso_data() consumes the initial
> pending_boot_probes reference, populates the vDSO cache, and marks it
> ready before the later async probe is registered. The eventual probe
> result then cannot update the already-ready cache.
> 
> Move check_unaligned_access_all_cpus() to fs_initcall_sync. This still
> runs after clocksource_done_booting(), so the ktime_get_mono_fast_ns()
> benchmark uses a stable clocksource, but it runs before rootfs_initcall
> enables usermode helpers.
> 
> Any async hwprobe probe is therefore registered before userspace can
> trigger the one-time vDSO cache population.
> 
> Fixes: 6455c6c11827 ("riscv: Clean up & optimize unaligned scalar access probe")
> Signed-off-by: Rui Qi <qirui.001@bytedance.com>

Now that we've queued a patch to get rid of the async hwprobe 
infrastructure, is this patch still needed?


- Paul

  parent reply	other threads:[~2026-08-06 18:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 15:05 [PATCH] riscv: hwprobe: Register unaligned probes before usermode Rui Qi
2026-07-22  7:52 ` Nam Cao
2026-07-28  3:57 ` Rui Qi
2026-08-06 18:50 ` Paul Walmsley [this message]
2026-08-07  6:07   ` Nam Cao
2026-08-07 23:29     ` Paul Walmsley

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=8884ef1b-9fd2-7300-d7f1-38d061cabf0c@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=namcao@linutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=qirui.001@bytedance.com \
    --cc=wangjingwei@iscas.ac.cn \
    /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