Loading include/trace/events/sched.h +2 −2 Original line number Diff line number Diff line Loading @@ -156,11 +156,11 @@ TRACE_EVENT(sched_switch, TP_fast_assign( memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); __entry->prev_pid = prev->pid; __entry->prev_prio = prev->prio; __entry->prev_prio = prev->prio == -1 ? 150 : prev->prio; __entry->prev_state = __trace_sched_switch_state(preempt, prev); memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); __entry->next_pid = next->pid; __entry->next_prio = next->prio; __entry->next_prio = next->prio == -1 ? 150 : next->prio; /* XXX SCHED_DEADLINE */ ), Loading kernel/cpu.c +15 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <linux/slab.h> #include <linux/percpu-rwsem.h> #include <uapi/linux/sched/types.h> #include <linux/cpuset.h> #include <trace/events/power.h> #define CREATE_TRACE_POINTS Loading Loading @@ -1052,6 +1053,18 @@ static int do_cpu_down(unsigned int cpu, enum cpuhp_state target) { int err; /* * When cpusets are enabled, the rebuilding of the scheduling * domains is deferred to a workqueue context. Make sure * that the work is completed before proceeding to the next * hotplug. Otherwise scheduler observes an inconsistent * view of online and offline CPUs in the root domain. If * the online CPUs are still stuck in the offline (default) * domain, those CPUs would not be visible when scheduling * happens on from other CPUs in the root domain. */ cpuset_wait_for_hotplug(); cpu_maps_update_begin(); err = cpu_down_maps_locked(cpu, target); cpu_maps_update_done(); Loading Loading @@ -1215,6 +1228,8 @@ static int do_cpu_up(unsigned int cpu, enum cpuhp_state target) return -EINVAL; } cpuset_wait_for_hotplug(); switch_err = switch_to_rt_policy(); if (switch_err < 0) return switch_err; Loading Loading
include/trace/events/sched.h +2 −2 Original line number Diff line number Diff line Loading @@ -156,11 +156,11 @@ TRACE_EVENT(sched_switch, TP_fast_assign( memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); __entry->prev_pid = prev->pid; __entry->prev_prio = prev->prio; __entry->prev_prio = prev->prio == -1 ? 150 : prev->prio; __entry->prev_state = __trace_sched_switch_state(preempt, prev); memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); __entry->next_pid = next->pid; __entry->next_prio = next->prio; __entry->next_prio = next->prio == -1 ? 150 : next->prio; /* XXX SCHED_DEADLINE */ ), Loading
kernel/cpu.c +15 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ #include <linux/slab.h> #include <linux/percpu-rwsem.h> #include <uapi/linux/sched/types.h> #include <linux/cpuset.h> #include <trace/events/power.h> #define CREATE_TRACE_POINTS Loading Loading @@ -1052,6 +1053,18 @@ static int do_cpu_down(unsigned int cpu, enum cpuhp_state target) { int err; /* * When cpusets are enabled, the rebuilding of the scheduling * domains is deferred to a workqueue context. Make sure * that the work is completed before proceeding to the next * hotplug. Otherwise scheduler observes an inconsistent * view of online and offline CPUs in the root domain. If * the online CPUs are still stuck in the offline (default) * domain, those CPUs would not be visible when scheduling * happens on from other CPUs in the root domain. */ cpuset_wait_for_hotplug(); cpu_maps_update_begin(); err = cpu_down_maps_locked(cpu, target); cpu_maps_update_done(); Loading Loading @@ -1215,6 +1228,8 @@ static int do_cpu_up(unsigned int cpu, enum cpuhp_state target) return -EINVAL; } cpuset_wait_for_hotplug(); switch_err = switch_to_rt_policy(); if (switch_err < 0) return switch_err; Loading