mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
nohz: Prevent tilegx network driver interrupts
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> Cc: Christoph Lameter <cl@linux.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:
parent
2019e8a302
commit
03f6199a35
2 changed files with 12 additions and 1 deletions
|
@ -40,6 +40,7 @@
|
||||||
#include <linux/tcp.h>
|
#include <linux/tcp.h>
|
||||||
#include <linux/net_tstamp.h>
|
#include <linux/net_tstamp.h>
|
||||||
#include <linux/ptp_clock_kernel.h>
|
#include <linux/ptp_clock_kernel.h>
|
||||||
|
#include <linux/tick.h>
|
||||||
|
|
||||||
#include <asm/checksum.h>
|
#include <asm/checksum.h>
|
||||||
#include <asm/homecache.h>
|
#include <asm/homecache.h>
|
||||||
|
@ -2273,7 +2274,8 @@ static int __init tile_net_init_module(void)
|
||||||
tile_net_dev_init(name, mac);
|
tile_net_dev_init(name, mac);
|
||||||
|
|
||||||
if (!network_cpus_init())
|
if (!network_cpus_init())
|
||||||
network_cpus_map = *cpu_online_mask;
|
cpumask_and(&network_cpus_map, housekeeping_cpumask(),
|
||||||
|
cpu_online_mask);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,15 @@ static inline void tick_nohz_full_kick_all(void) { }
|
||||||
static inline void __tick_nohz_task_switch(struct task_struct *tsk) { }
|
static inline void __tick_nohz_task_switch(struct task_struct *tsk) { }
|
||||||
#endif
|
#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)
|
static inline bool is_housekeeping_cpu(int cpu)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NO_HZ_FULL
|
#ifdef CONFIG_NO_HZ_FULL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue