Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-07 Thread Denys Vlasenko
On 05/05/2014 08:06 PM, Denys Vlasenko wrote: > On 04/29/2014 04:47 PM, Frederic Weisbecker wrote: >> On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: >>> +void tick_nohz_iowait_to_idle(int cpu) >>> +{ >>> + struct tick_sched *ts = tick_get_tick_sched(cpu); >>> + ktime_t now =

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-07 Thread Denys Vlasenko
On 05/05/2014 08:06 PM, Denys Vlasenko wrote: On 04/29/2014 04:47 PM, Frederic Weisbecker wrote: On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: +void tick_nohz_iowait_to_idle(int cpu) +{ + struct tick_sched *ts = tick_get_tick_sched(cpu); + ktime_t now = ktime_get(); +

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-05 Thread Denys Vlasenko
On 04/29/2014 06:20 PM, Frederic Weisbecker wrote: >> index 268a45e..ffea757 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -4218,7 +4218,14 @@ void __sched io_schedule(void) >> current->in_iowait = 1; >> schedule(); >> current->in_iowait = 0; >> +#ifdef

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-05 Thread Denys Vlasenko
On 04/29/2014 04:47 PM, Frederic Weisbecker wrote: > On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: >> +void tick_nohz_iowait_to_idle(int cpu) >> +{ >> +struct tick_sched *ts = tick_get_tick_sched(cpu); >> +ktime_t now = ktime_get(); >> + >> +

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-05 Thread Denys Vlasenko
On 04/29/2014 04:47 PM, Frederic Weisbecker wrote: On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: +void tick_nohz_iowait_to_idle(int cpu) +{ +struct tick_sched *ts = tick_get_tick_sched(cpu); +ktime_t now = ktime_get(); + +

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-05-05 Thread Denys Vlasenko
On 04/29/2014 06:20 PM, Frederic Weisbecker wrote: index 268a45e..ffea757 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4218,7 +4218,14 @@ void __sched io_schedule(void) current-in_iowait = 1; schedule(); current-in_iowait = 0; +#ifdef CONFIG_NO_HZ_COMMON +

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-29 Thread Frederic Weisbecker
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: > Before this change, if last IO-blocked task wakes up > on a different CPU, the original CPU may stay idle for much longer, > and the entire time it stays idle is accounted as iowait time. > > This change adds struct

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-29 Thread Frederic Weisbecker
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: > Before this change, if last IO-blocked task wakes up > on a different CPU, the original CPU may stay idle for much longer, > and the entire time it stays idle is accounted as iowait time. > > This change adds struct

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-29 Thread Frederic Weisbecker
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: Before this change, if last IO-blocked task wakes up on a different CPU, the original CPU may stay idle for much longer, and the entire time it stays idle is accounted as iowait time. This change adds struct

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-29 Thread Frederic Weisbecker
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: Before this change, if last IO-blocked task wakes up on a different CPU, the original CPU may stay idle for much longer, and the entire time it stays idle is accounted as iowait time. This change adds struct

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-25 Thread Denys Vlasenko
On 04/24/2014 09:18 PM, Peter Zijlstra wrote: > On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: >> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >> index 268a45e..ffea757 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -4218,7 +4218,14 @@ void

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-25 Thread Denys Vlasenko
On 04/24/2014 09:18 PM, Peter Zijlstra wrote: On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 268a45e..ffea757 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4218,7 +4218,14 @@ void __sched

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-24 Thread Peter Zijlstra
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 268a45e..ffea757 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -4218,7 +4218,14 @@ void __sched io_schedule(void) > current->in_iowait = 1; >

[PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-24 Thread Denys Vlasenko
Before this change, if last IO-blocked task wakes up on a different CPU, the original CPU may stay idle for much longer, and the entire time it stays idle is accounted as iowait time. This change adds struct tick_sched::iowait_exittime member. On entry to idle, it is set to KTIME_MAX. Last

[PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-24 Thread Denys Vlasenko
Before this change, if last IO-blocked task wakes up on a different CPU, the original CPU may stay idle for much longer, and the entire time it stays idle is accounted as iowait time. This change adds struct tick_sched::iowait_exittime member. On entry to idle, it is set to KTIME_MAX. Last

Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

2014-04-24 Thread Peter Zijlstra
On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote: diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 268a45e..ffea757 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4218,7 +4218,14 @@ void __sched io_schedule(void) current-in_iowait = 1;