From: Chris Metcalf <cmetcalf@ezchip.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] nohz: prevent tilegx network driver interrupts
Date: Sat, 11 Jul 2015 15:04:52 +0000 [thread overview]
Message-ID: <B147785F-9482-44B4-A36D-2BDF8CD4278E@ezchip.com> (raw)
In-Reply-To: <20150711144436.GF10257@lerouge>
> On Jul 11, 2015, at 10:44 AM, Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
>> On Fri, Jul 10, 2015 at 03:37:25PM -0400, Chris Metcalf wrote:
>> Normally the tilegx networking shim sends irqs to all the cores
>> to distribute the load of processing incoming-packet interrupts,
>> so that you can get to multiple Gb's of traffic inbound.
>>
>> However, in nohz_full mode we don't want to interrupt the
>> nohz_full cores by default, so we limit the set of cores we use
>> to only the online housekeeping cores.
>>
>> To make client code easier to read, we introduce a new nohz_full
>> accessor, housekeeping_cpumask(), which returns a pointer to the
>> housekeeping_mask if nohz_full is enabled, and otherwise returns
>> the cpu_possible_mask.
>>
>> Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
>
> Looks good. Since it modifies nohz core stuff, do you mind if I take it?
>
> Thanks.
Sure, that's fine. Thanks.
>
>> ---
>> drivers/net/ethernet/tile/tilegx.c | 4 +++-
>> include/linux/tick.h | 9 +++++++++
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
>> index a3f7610002aa..0a15acc075b3 100644
>> --- a/drivers/net/ethernet/tile/tilegx.c
>> +++ b/drivers/net/ethernet/tile/tilegx.c
>> @@ -40,6 +40,7 @@
>> #include <linux/tcp.h>
>> #include <linux/net_tstamp.h>
>> #include <linux/ptp_clock_kernel.h>
>> +#include <linux/tick.h>
>>
>> #include <asm/checksum.h>
>> #include <asm/homecache.h>
>> @@ -2273,7 +2274,8 @@ static int __init tile_net_init_module(void)
>> tile_net_dev_init(name, mac);
>>
>> if (!network_cpus_init())
>> - network_cpus_map = *cpu_online_mask;
>> + cpumask_and(&network_cpus_map, housekeeping_cpumask(),
>> + cpu_online_mask);
>>
>> return 0;
>> }
>> diff --git a/include/linux/tick.h b/include/linux/tick.h
>> index 3741ba1a652c..d3b00f0b2221 100644
>> --- a/include/linux/tick.h
>> +++ b/include/linux/tick.h
>> @@ -160,6 +160,15 @@ static inline void tick_nohz_full_kick_all(void) { }
>> static inline void __tick_nohz_task_switch(struct task_struct *tsk) { }
>> #endif
>>
>> +static inline const struct cpumask *housekeeping_cpumask(void)
>> +{
>> +#ifdef CONFIG_NO_HZ_FULL
>> + if (tick_nohz_full_enabled())
>> + return housekeeping_mask;
>> +#endif
>> + return cpu_possible_mask;
>> +}
>> +
>> static inline bool is_housekeeping_cpu(int cpu)
>> {
>> #ifdef CONFIG_NO_HZ_FULL
>> --
>> 2.1.2
>>
next prev parent reply other threads:[~2015-07-11 15:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 17:33 [PATCH] " Chris Metcalf
2015-07-10 18:24 ` Frederic Weisbecker
2015-07-10 19:05 ` Chris Metcalf
2015-07-10 19:37 ` [PATCH v2] " Chris Metcalf
2015-07-10 22:45 ` Josh Cartwright
2015-07-10 23:06 ` Chris Metcalf
2015-07-10 23:12 ` Josh Cartwright
2015-07-11 14:44 ` Frederic Weisbecker
2015-07-11 15:04 ` Chris Metcalf [this message]
2015-07-11 14:30 ` [PATCH] " Frederic Weisbecker
2015-07-20 21:22 ` Chris Metcalf
2015-07-20 21:49 ` Frederic Weisbecker
2015-07-20 22:15 ` Chris Metcalf
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=B147785F-9482-44B4-A36D-2BDF8CD4278E@ezchip.com \
--to=cmetcalf@ezchip.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®