All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nitesh Narayan Lal <nitesh@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	frederic@kernel.org, mtosatti@redhat.com, juri.lelli@redhat.com,
	abelits@marvell.com, bhelgaas@google.com,
	linux-pci@vger.kernel.org, rostedt@goodmis.org, mingo@kernel.org,
	tglx@linutronix.de, davem@davemloft.net,
	akpm@linux-foundation.org, sfr@canb.auug.org.au,
	stephen@networkplumber.org, rppt@linux.vnet.ibm.com
Subject: Re: [Patch v2 3/3] net: Restrict receive packets queuing to housekeeping CPUs
Date: Tue, 23 Jun 2020 07:42:05 -0400	[thread overview]
Message-ID: <f67187a8-be5f-ea15-77b4-165dab2b51af@redhat.com> (raw)
In-Reply-To: <20200623092312.GC4781@hirez.programming.kicks-ass.net>


[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]


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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-06-23 11:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 23:45 [PATCH v2 0/3] Preventing job distribution to isolated CPUs Nitesh Narayan Lal
2020-06-22 23:45 ` [Patch v2 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs Nitesh Narayan Lal
2020-06-23  9:21   ` Peter Zijlstra
2020-06-23 13:18     ` Nitesh Narayan Lal
2020-06-22 23:45 ` [Patch v2 2/3] PCI: Restrict probe functions to housekeeping CPUs Nitesh Narayan Lal
2020-06-22 23:45 ` [Patch v2 3/3] net: Restrict receive packets queuing " Nitesh Narayan Lal
2020-06-23  9:23   ` Peter Zijlstra
2020-06-23 11:42     ` Nitesh Narayan Lal [this message]
2020-06-23  1:03 ` [PATCH v2 0/3] Preventing job distribution to isolated CPUs Nitesh Narayan Lal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f67187a8-be5f-ea15-77b4-165dab2b51af@redhat.com \
    --to=nitesh@redhat.com \
    --cc=abelits@marvell.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=stephen@networkplumber.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.