[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200623092312.GC4781@hirez.programming.kicks-ass.net>
Date: Tue, 23 Jun 2020 11:23:12 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Nitesh Narayan Lal <nitesh@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
frederic@...nel.org, mtosatti@...hat.com, juri.lelli@...hat.com,
abelits@...vell.com, bhelgaas@...gle.com,
linux-pci@...r.kernel.org, rostedt@...dmis.org, mingo@...nel.org,
tglx@...utronix.de, davem@...emloft.net, akpm@...ux-foundation.org,
sfr@...b.auug.org.au, stephen@...workplumber.org,
rppt@...ux.vnet.ibm.com
Subject: Re: [Patch v2 3/3] net: Restrict receive packets queuing to
housekeeping CPUs
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.
> + 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
>
Powered by blists - more mailing lists