diff options
31 files changed, 1270 insertions, 774 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 116e798b61e6..38ed8787261b 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
| @@ -1730,20 +1730,33 @@ | |||
| 1730 | isapnp= [ISAPNP] | 1730 | isapnp= [ISAPNP] |
| 1731 | Format: <RDP>,<reset>,<pci_scan>,<verbosity> | 1731 | Format: <RDP>,<reset>,<pci_scan>,<verbosity> |
| 1732 | 1732 | ||
| 1733 | isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler. | 1733 | isolcpus= [KNL,SMP] Isolate a given set of CPUs from disturbance. |
| 1734 | The argument is a cpu list, as described above. | 1734 | [Deprecated - use cpusets instead] |
| 1735 | Format: [flag-list,]<cpu-list> | ||
| 1736 | |||
| 1737 | Specify one or more CPUs to isolate from disturbances | ||
| 1738 | specified in the flag list (default: domain): | ||
| 1739 | |||
| 1740 | nohz | ||
| 1741 | Disable the tick when a single task runs. | ||
| 1742 | domain | ||
| 1743 | Isolate from the general SMP balancing and scheduling | ||
| 1744 | algorithms. Note that performing domain isolation this way | ||
| 1745 | is irreversible: it's not possible to bring back a CPU to | ||
| 1746 | the domains once isolated through isolcpus. It's strongly | ||
| 1747 | advised to use cpusets instead to disable scheduler load | ||
| 1748 | balancing through the "cpuset.sched_load_balance" file. | ||
| 1749 | It offers a much more flexible interface where CPUs can | ||
| 1750 | move in and out of an isolated set anytime. | ||
| 1751 | |||
| 1752 | You can move a process onto or off an "isolated" CPU via | ||
| 1753 | the CPU affinity syscalls or cpuset. | ||
| 1754 | <cpu number> begins at 0 and the maximum value is | ||
| 1755 | "number of CPUs in system - 1". | ||
| 1756 | |||
| 1757 | The format of <cpu-list> is described above. | ||
| 1735 | 1758 | ||
| 1736 | This option can be used to specify one or more CPUs | ||
| 1737 | to isolate from the general SMP balancing and scheduling | ||
| 1738 | algorithms. You can move a process onto or off an | ||
| 1739 | "isolated" CPU via the CPU affinity syscalls or cpuset. | ||
| 1740 | <cpu number> begins at 0 and the maximum value is | ||
| 1741 | "number of CPUs in system - 1". | ||
| 1742 | 1759 | ||
| 1743 | This option is the preferred way to isolate CPUs. The | ||
| 1744 | alternative -- manually setting the CPU mask of all | ||
| 1745 | tasks in the system -- can cause problems and | ||
| 1746 | suboptimal load balancer performance. | ||
| 1747 | 1760 | ||
| 1748 | iucv= [HW,NET] | 1761 | iucv= [HW,NET] |
| 1749 | 1762 | ||
| @@ -4209,6 +4222,9 @@ | |||
| 4209 | Used to run time disable IRQ_TIME_ACCOUNTING on any | 4222 | Used to run time disable IRQ_TIME_ACCOUNTING on any |
| 4210 | platforms where RDTSC is slow and this accounting | 4223 | platforms where RDTSC is slow and this accounting |
| 4211 | can add overhead. | 4224 | can add overhead. |
| 4225 | [x86] unstable: mark the TSC clocksource as unstable, this | ||
| 4226 | marks the TSC unconditionally unstable at bootup and | ||
| 4227 | avoids any further wobbles once the TSC watchdog notices. | ||
| 4212 | 4228 | ||
| 4213 | turbografx.map[2|3]= [HW,JOY] | 4229 | turbografx.map[2|3]= [HW,JOY] |
| 4214 | TurboGraFX parallel port interface | 4230 | TurboGraFX parallel port interface |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 321cd7b4d817..a73ab95558f5 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/cpufeature.h> | 18 | #include <linux/cpufeature.h> |
| 19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
| 20 | #include <linux/pm_qos.h> | 20 | #include <linux/pm_qos.h> |
| 21 | #include <linux/sched/isolation.h> | ||
| 21 | 22 | ||
| 22 | #include "base.h" | 23 | #include "base.h" |
| 23 | 24 | ||
| @@ -271,8 +272,16 @@ static ssize_t print_cpus_isolated(struct device *dev, | |||
| 271 | struct device_attribute *attr, char *buf) | 272 | struct device_attribute *attr, char *buf) |
| 272 | { | 273 | { |
| 273 | int n = 0, len = PAGE_SIZE-2; | 274 | int n = 0, len = PAGE_SIZE-2; |
| 275 | cpumask_var_t isolated; | ||
| 274 | 276 | ||
| 275 | n = scnprintf(buf, len, "%*pbl\n", cpumask_pr_args(cpu_isolated_map)); | 277 | if (!alloc_cpumask_var(&isolated, GFP_KERNEL)) |
| 278 | return -ENOMEM; | ||
| 279 | |||
| 280 | cpumask_andnot(isolated, cpu_possible_mask, | ||
| 281 | housekeeping_cpumask(HK_FLAG_DOMAIN)); | ||
| 282 | n = scnprintf(buf, len, "%*pbl\n", cpumask_pr_args(isolated)); | ||
| 283 | |||
| 284 | free_cpumask_var(isolated); | ||
| 276 | 285 | ||
| 277 | return n; | 286 | return n; |
| 278 | } | 287 | } |
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index c00102b8145a..b3e5816a4678 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | #include <linux/tcp.h> | 40 | #include <linux/tcp.h> |
| 41 | #include <linux/net_tstamp.h> | 41 | #include <linux/net_tstamp.h> |
| 42 | #include <linux/ptp_clock_kernel.h> | 42 | #include <linux/ptp_clock_kernel.h> |
| 43 | #include <linux/tick.h> | 43 | #include <linux/sched/isolation.h> |
| 44 | 44 | ||
| 45 | #include <asm/checksum.h> | 45 | #include <asm/checksum.h> |
| 46 | #include <asm/homecache.h> | 46 | #include <asm/homecache.h> |
| @@ -2270,8 +2270,8 @@ static int __init tile_net_init_module(void) | |||
| 2270 | tile_net_dev_init(name, mac); | 2270 | tile_net_dev_init(name, mac); |
| 2271 | 2271 | ||
| 2272 | if (!network_cpus_init()) | 2272 | if (!network_cpus_init()) |
| 2273 | cpumask_and(&network_cpus_map, housekeeping_cpumask(), | 2273 | cpumask_and(&network_cpus_map, |
| 2274 | cpu_online_mask); | 2274 | housekeeping_cpumask(HK_FLAG_MISC), cpu_online_mask); |
| 2275 | 2275 | ||
| 2276 | return 0; | 2276 | return 0; |
| 2277 | } | 2277 | } |
diff --git a/fs/proc/array.c b/fs/proc/array.c index d82549e80402..6f6fc1672ad1 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -138,7 +138,7 @@ static const char * const task_state_array[] = { | |||
| 138 | static inline const char *get_task_state(struct task_struct *tsk) | 138 | static inline const char *get_task_state(struct task_struct *tsk) |
| 139 | { | 139 | { |
| 140 | BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != ARRAY_SIZE(task_state_array)); | 140 | BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != ARRAY_SIZE(task_state_array)); |
| 141 | return task_state_array[__get_task_state(tsk)]; | 141 | return task_state_array[task_state_index(tsk)]; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | static inline int get_task_umask(struct task_struct *tsk) | 144 | static inline int get_task_umask(struct task_struct *tsk) |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 8d3125c493b2..75b565194437 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -131,6 +131,11 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp) | |||
| 131 | return 0; | 131 | return 0; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | static inline unsigned int cpumask_last(const struct cpumask *srcp) | ||
| 135 | { | ||
| 136 | return 0; | ||
| 137 | } | ||
| 138 | |||
| 134 | /* Valid inputs for n are -1 and 0. */ | 139 | /* Valid inputs for n are -1 and 0. */ |
| 135 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) | 140 | static inline unsigned int cpumask_next(int n, const struct cpumask *srcp) |
| 136 | { | 141 | { |
| @@ -179,6 +184,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp) | |||
| 179 | return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits); | 184 | return find_first_bit(cpumask_bits(srcp), nr_cpumask_bits); |
| 180 | } | 185 | } |
| 181 | 186 | ||
| 187 | /** | ||
| 188 | |||
