Re: [PATCH 3/3] sched: Rework check_for_tasks()

2014-06-23 Thread Peter Zijlstra
On Mon, Jun 23, 2014 at 02:52:18PM +0400, Kirill Tkhai wrote: > > Then again, I suppose anything without rq->lock can and will miss tasks. > > If we use rq->lock it's possible to move check_for_tasks() to > kernel/sched/core.c. > > And we can leave TASK_RUNNING check for waking tasks. Maybe some

Re: [PATCH 3/3] sched: Rework check_for_tasks()

2014-06-23 Thread Kirill Tkhai
В Пн, 23/06/2014 в 12:24 +0200, Peter Zijlstra пишет: > On Tue, Jun 17, 2014 at 05:24:22PM +0400, Kirill Tkhai wrote: > > > > 1)Iterate throw all of threads in the system. > > thru Thanks :) > > > Check for all threads, not only for group leaders. > > > > 2)Check for p->on_rq instead

Re: [PATCH 3/3] sched: Rework check_for_tasks()

2014-06-23 Thread Peter Zijlstra
On Tue, Jun 17, 2014 at 05:24:22PM +0400, Kirill Tkhai wrote: > > 1)Iterate throw all of threads in the system. thru > Check for all threads, not only for group leaders. > > 2)Check for p->on_rq instead of p->state and cputime. > Preempted task in !TASK_RUNNING state OR just > cr

[PATCH 3/3] sched: Rework check_for_tasks()

2014-06-17 Thread Kirill Tkhai
1)Iterate throw all of threads in the system. Check for all threads, not only for group leaders. 2)Check for p->on_rq instead of p->state and cputime. Preempted task in !TASK_RUNNING state OR just created task may be queued, that we want to be reported too. 3)Use read_lock() instead of