Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-12-06 Thread Tejun Heo
Hello, On Mon, Oct 31, 2016 at 10:45:56AM -0600, Tejun Heo wrote: > Tracking the owners of mutexes and rwsems does help quite a bit. I > don't think it's as simple as inheriting io sleep state from the > current owner tho. The owner might be running or in a non-IO sleep > when others try to

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-12-06 Thread Tejun Heo
Hello, On Mon, Oct 31, 2016 at 10:45:56AM -0600, Tejun Heo wrote: > Tracking the owners of mutexes and rwsems does help quite a bit. I > don't think it's as simple as inheriting io sleep state from the > current owner tho. The owner might be running or in a non-IO sleep > when others try to

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-11-08 Thread Tejun Heo
Hello, On Thu, Nov 03, 2016 at 09:03:45PM +0530, Pavan Kondeti wrote: > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > index 94732d1..f6baa38 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-11-08 Thread Tejun Heo
Hello, On Thu, Nov 03, 2016 at 09:03:45PM +0530, Pavan Kondeti wrote: > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > index 94732d1..f6baa38 100644 > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-11-03 Thread Pavan Kondeti
Hi Tejun, > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 94732d1..f6baa38 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > unsigned long *switch_count; > struct

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-11-03 Thread Pavan Kondeti
Hi Tejun, > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 94732d1..f6baa38 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > unsigned long *switch_count; > struct

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-31 Thread Tejun Heo
Hello, On Sat, Oct 29, 2016 at 05:21:26AM +0200, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 03:12:32PM -0400, Tejun Heo wrote: > > Hello, Peter. > > > > On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > > > One alternative is to inherit the iowait state of the task we block

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-31 Thread Tejun Heo
Hello, On Sat, Oct 29, 2016 at 05:21:26AM +0200, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 03:12:32PM -0400, Tejun Heo wrote: > > Hello, Peter. > > > > On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > > > One alternative is to inherit the iowait state of the task we block

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 03:12:32PM -0400, Tejun Heo wrote: > Hello, Peter. > > On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > > One alternative is to inherit the iowait state of the task we block on. > > That'll not get rid of the branches much, but it will remove the new > >

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 03:12:32PM -0400, Tejun Heo wrote: > Hello, Peter. > > On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > > One alternative is to inherit the iowait state of the task we block on. > > That'll not get rid of the branches much, but it will remove the new > >

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Tejun Heo
Hello, Peter. On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > One alternative is to inherit the iowait state of the task we block on. > That'll not get rid of the branches much, but it will remove the new > mutex APIs. Yeah, thought about that briefly but we don't necessarily

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Tejun Heo
Hello, Peter. On Fri, Oct 28, 2016 at 09:07:02PM +0200, Peter Zijlstra wrote: > One alternative is to inherit the iowait state of the task we block on. > That'll not get rid of the branches much, but it will remove the new > mutex APIs. Yeah, thought about that briefly but we don't necessarily

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 08:27:12PM +0200, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 12:58:09PM -0400, Tejun Heo wrote: > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > > unsigned long

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 08:27:12PM +0200, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 12:58:09PM -0400, Tejun Heo wrote: > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > > unsigned long

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 12:58:09PM -0400, Tejun Heo wrote: > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > unsigned long *switch_count; > struct pin_cookie cookie; > struct rq *rq; > -

Re: [PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 12:58:09PM -0400, Tejun Heo wrote: > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -3336,11 +3336,17 @@ static void __sched notrace __schedule(bool preempt) > unsigned long *switch_count; > struct pin_cookie cookie; > struct rq *rq; > -

[PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Tejun Heo
For an interface to support blocking for IOs, it must call io_schedule() instead of schedule(). This makes it tedious to add IO blocking to existing interfaces as the switching between schedule() and io_schedule() is often buried deep. As we already have a way to mark the task as IO scheduling,

[PATCH 1/4] sched: move IO scheduling accounting from io_schedule_timeout() to __schedule()

2016-10-28 Thread Tejun Heo
For an interface to support blocking for IOs, it must call io_schedule() instead of schedule(). This makes it tedious to add IO blocking to existing interfaces as the switching between schedule() and io_schedule() is often buried deep. As we already have a way to mark the task as IO scheduling,