* Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
On Wed, Oct 04, 2023 at 11:23:41AM +0200, Ingo Molnar wrote:So calling with a full mask would actually work fine on 'old' kernels too,
Very little I think -- the main difference is that we no longer carryif (user_mask) {Question: is there any observable behavioral difference between current
- cpumask_copy(user_mask, in_mask);
+ /*
+ * All-set user cpumask resets affinity and drops the explicit
+ * user mask.
+ */
+ cpumask_and(user_mask, in_mask, cpu_possible_mask);
+ if (cpumask_equal(user_mask, cpu_possible_mask)) {
+ kfree(user_mask);
+ user_mask = NULL;
+ }
(old) all-set cpumask calls and the patched (new) one?
the ->user_cpus_ptr mask around, and that saves a little masking.
as it's a 'reset' event in essence. (With a bit of allocation & masking
overhead.)
This pretty unambiguously marks the full-mask solution as the superior ABI ...