[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87qzufw8fc.ffs@tglx>
Date: Mon, 03 Nov 2025 14:29:59 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Gabriele Monaco
 <gmonaco@...hat.com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Michael Jeanson <mjeanson@...icios.com>, Jens Axboe <axboe@...nel.dk>,
 "Paul E. McKenney" <paulmck@...nel.org>, "Gautham R. Shenoy"
 <gautham.shenoy@....com>, Florian Weimer <fweimer@...hat.com>, Tim Chen
 <tim.c.chen@...el.com>, Yury Norov <yury.norov@...il.com>, LKML
 <linux-kernel@...r.kernel.org>
Subject: Re: [patch V3 07/20] cpumask: Introduce cpumask_weighted_or()
On Mon, Nov 03 2025 at 14:45, Shrikanth Hegde wrote:
> On 10/29/25 6:39 PM, Thomas Gleixner wrote:
>> +static __always_inline
>> +unsigned int cpumask_weighted_or(struct cpumask *dstp, const struct cpumask *src1p,
>> +				 const struct cpumask *src2p)
>> +{
>> +	return bitmap_weighted_or(cpumask_bits(dstp), cpumask_bits(src1p),
>> +				  cpumask_bits(src2p), small_cpumask_bits);
>> +}
>
> nit:
>
> We have currently cpumask_weight_and & variants.
> Wouldn't it be better to name it cpumask_weight_or ?
No. cpumask_weight_and() does weight(mask1 & mask2) but this does
    mask3 = mask1 | mask2;
    weight(mask3);
That's two very different things.
Powered by blists - more mailing lists