Re: [PATCH 2/5] cpumask: Introduce for_each_cpu_andnot()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/08/22 15:24, Yury Norov wrote:
> On Tue, Aug 16, 2022 at 07:07:24PM +0100, Valentin Schneider wrote:
>> for_each_cpu_and() is very convenient as it saves having to allocate a
>> temporary cpumask to store the result of cpumask_and(). The same issue
>> applies to cpumask_andnot() which doesn't actually need temporary storage
>> for iteration purposes.
>>
>> Following what has been done for for_each_cpu_and(), introduce
>> for_each_cpu_andnot().
>>
>> Signed-off-by: Valentin Schneider <vschneid@xxxxxxxxxx>
>> ---
>>  include/linux/cpumask.h | 32 ++++++++++++++++++++++++++++++++
>>  lib/cpumask.c           | 19 +++++++++++++++++++
>>  2 files changed, 51 insertions(+)
>>
>> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
>> index fe29ac7cc469..a8b2ca160e57 100644
>> --- a/include/linux/cpumask.h
>> +++ b/include/linux/cpumask.h
>> @@ -157,6 +157,13 @@ static inline unsigned int cpumask_next_and(int n,
>>      return n+1;
>>  }
>>
>> +static inline unsigned int cpumask_next_andnot(int n,
>> +					    const struct cpumask *srcp,
>> +					    const struct cpumask *andp)
>> +{
>> +	return n+1;
>> +}
>> +
>
> It looks like the patch is not based on top of 6.0, where UP cpumask
> operations were fixed.  Can you please rebase?
>

Right, this is based on tip/sched/core, I'll rebase it. Sorry about that!




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux