Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-22 Thread Hillf Danton
Hi Jonathan On Tue, Jul 22, 2014 at 12:56 AM, Jonathan Davies wrote: > > > On 18/07/14 15:08, Peter Zijlstra wrote: >> >> On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: >>> >>> The current implementation of idle_cpu only considers tasks that might be >>> in the >>> CPU's

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-22 Thread Hillf Danton
Hi Jonathan On Tue, Jul 22, 2014 at 12:56 AM, Jonathan Davies jonathan.dav...@citrix.com wrote: On 18/07/14 15:08, Peter Zijlstra wrote: On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: The current implementation of idle_cpu only considers tasks that might be in the CPU's

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-21 Thread Peter Zijlstra
On Mon, Jul 21, 2014 at 05:56:36PM +0100, Jonathan Davies wrote: > >If your softirq takes _that_ long its broken anyhow. > > Modern NICs can sustain 40 Gb/s of traffic. For network device drivers that > use NAPI, polling is done in softirq context. At this data-rate, the > per-packet processing

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-21 Thread Jonathan Davies
On 18/07/14 15:08, Peter Zijlstra wrote: On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: The current implementation of idle_cpu only considers tasks that might be in the CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will return 1. But if the CPU is

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-21 Thread Jonathan Davies
On 18/07/14 15:08, Peter Zijlstra wrote: On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: The current implementation of idle_cpu only considers tasks that might be in the CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will return 1. But if the CPU is

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-21 Thread Peter Zijlstra
On Mon, Jul 21, 2014 at 05:56:36PM +0100, Jonathan Davies wrote: If your softirq takes _that_ long its broken anyhow. Modern NICs can sustain 40 Gb/s of traffic. For network device drivers that use NAPI, polling is done in softirq context. At this data-rate, the per-packet processing

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-18 Thread Peter Zijlstra
On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: > The current implementation of idle_cpu only considers tasks that might be in > the > CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will > return 1. But if the CPU is doing work in the softirq context, it

[PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-18 Thread Jonathan Davies
The current implementation of idle_cpu only considers tasks that might be in the CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will return 1. But if the CPU is doing work in the softirq context, it is wrong for idle_cpu to return 1. This patch makes it return 0. I

[PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-18 Thread Jonathan Davies
The current implementation of idle_cpu only considers tasks that might be in the CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will return 1. But if the CPU is doing work in the softirq context, it is wrong for idle_cpu to return 1. This patch makes it return 0. I

Re: [PATCH RFC] sched/core: Make idle_cpu return 0 if doing softirq work

2014-07-18 Thread Peter Zijlstra
On Fri, Jul 18, 2014 at 01:59:06PM +0100, Jonathan Davies wrote: The current implementation of idle_cpu only considers tasks that might be in the CPU's runqueue. If there's nothing in the specified CPU's runqueue, it will return 1. But if the CPU is doing work in the softirq context, it is