Re: [PATCH v3 1/3] rust: add a wrapper for the `num_possible_cpus` C function

From: Peter Zijlstra

Date: Mon Oct 12 2026 - 11:44:33 EST


On Sat, Oct 03, 2026 at 02:03:57PM +0200, Andreas Hindborg wrote:
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
>
> > On Tue, Sep 29, 2026 at 07:56:48PM +0200, Andreas Hindborg wrote:
> >> This function returns the maximum number of CPUs that can be online.
> >>
> >> The wrapper is needed by the Rust null block driver.
> >
> > What does it need it for?
>
> Setting an upper bound on the number of submit and poll queues.

OK I suppose. As long as nobody is going to try and use the return value
as a max for cpuid. That is, num_possible_cpus() <= nr_cpu_ids and all
that.