Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-16 Thread Thomas Gleixner
On Wed, Dec 16 2020 at 09:19, Peter Zijlstra wrote: > On Tue, Dec 15, 2020 at 06:52:49PM +0100, Thomas Gleixner wrote: >> I might be missing something, but how is the CPU which runs the pinned >> kernel thread, i.e. the hotplug thread, supposed to go idle between the >> two calls? > > Take a mutex

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-16 Thread Peter Zijlstra
On Tue, Dec 15, 2020 at 06:52:49PM +0100, Thomas Gleixner wrote: > I might be missing something, but how is the CPU which runs the pinned > kernel thread, i.e. the hotplug thread, supposed to go idle between the > two calls? Take a mutex or something other daft. My disabling preemption around it

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Thomas Gleixner
On Tue, Dec 15 2020 at 16:05, Peter Zijlstra wrote: > On Tue, Dec 15, 2020 at 09:34:15AM -0500, Steven Rostedt wrote: >> On Tue, 15 Dec 2020 15:23:39 +0100 (CET) >> Anna-Maria Behnsen wrote: >> >> > > > + /* >> > > > + * Remove CPU from nohz.idle_cpus_mask to prevent participating >>

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Peter Zijlstra
On Tue, Dec 15, 2020 at 09:34:15AM -0500, Steven Rostedt wrote: > On Tue, 15 Dec 2020 15:23:39 +0100 (CET) > Anna-Maria Behnsen wrote: > > > > > + /* > > > > +* Remove CPU from nohz.idle_cpus_mask to prevent participating > > > > in > > > > +* load balancing when not

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Steven Rostedt
On Tue, 15 Dec 2020 15:23:39 +0100 (CET) Anna-Maria Behnsen wrote: > > > + /* > > > + * Remove CPU from nohz.idle_cpus_mask to prevent participating in > > > + * load balancing when not active > > > + */ > > > + nohz_balance_exit_idle(rq); > > > + > > > set_cpu_active(cpu, false); > > >

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Steven Rostedt
On Tue, 15 Dec 2020 11:44:00 +0100 Anna-Maria Behnsen wrote: > SCHED_SOFTIRQ is raised to trigger periodic load balancing. When CPU is not > active, CPU should not participate in load balancing. > > The scheduler uses nohz.idle_cpus_mask to keep track of the CPUs which can > do idle load

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Anna-Maria Behnsen
On Tue, 15 Dec 2020, Peter Zijlstra wrote: > On Tue, Dec 15, 2020 at 11:44:00AM +0100, Anna-Maria Behnsen wrote: > > SCHED_SOFTIRQ is raised to trigger periodic load balancing. When CPU is not > > active, CPU should not participate in load balancing. > > > > The scheduler uses

Re: [PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Peter Zijlstra
On Tue, Dec 15, 2020 at 11:44:00AM +0100, Anna-Maria Behnsen wrote: > SCHED_SOFTIRQ is raised to trigger periodic load balancing. When CPU is not > active, CPU should not participate in load balancing. > > The scheduler uses nohz.idle_cpus_mask to keep track of the CPUs which can > do idle load

[PATCH] sched: Prevent raising SCHED_SOFTIRQ when CPU is !active

2020-12-15 Thread Anna-Maria Behnsen
SCHED_SOFTIRQ is raised to trigger periodic load balancing. When CPU is not active, CPU should not participate in load balancing. The scheduler uses nohz.idle_cpus_mask to keep track of the CPUs which can do idle load balancing. When bringing a CPU up the CPU is added to the mask when it reaches