lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch v2 3/3] net: Restrict receive packets queuing to housekeeping CPUs
From
Date

On 6/23/20 5:23 AM, Peter Zijlstra wrote:
> On Mon, Jun 22, 2020 at 07:45:10PM -0400, Nitesh Narayan Lal wrote:
>> @@ -756,6 +757,13 @@ static ssize_t store_rps_map(struct netdev_rx_queue *queue,
>> return err;
>> }
>>
>> + hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
>> + cpumask_and(mask, mask, housekeeping_cpumask(hk_flags));
>> + if (cpumask_weight(mask) == 0) {
> We have cpumask_empty() for that, which is a much more efficient way of
> testing the same.

Yes, right.
I will make this change.

>
>> + free_cpumask_var(mask);
>> + return -EINVAL;
>> + }
>> +
>> map = kzalloc(max_t(unsigned int,
>> RPS_MAP_SIZE(cpumask_weight(mask)), L1_CACHE_BYTES),
>> GFP_KERNEL);
>> --
>> 2.18.4
>>
--
Thanks
Nitesh

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-06-23 13:42    [W:0.119 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site