lkml.org 
[lkml]   [2011]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: Remove WAKEUP_PREEMPT feature check in entity_tick
On Fri, Jul 29, 2011 at 03:36:15PM +0800, Lin Ming wrote:
> >From another point of view, below !sched_feat(WAKEUP_PREEMPT) still
> looks like duplicated.
>
> if (cfs_rq->nr_running > 1 || !sched_feat(WAKEUP_PREEMPT))
> check_preempt_tick(cfs_rq, curr);
>
> if "!sched_feat(WAKEUP_PREEMPT)" is run,
> that implies cfs_rq->nr_running == 1.

That's true.

>
> Why do we need to call check_preempt_tick when there is only 1 task
> runnable?

Just set_tsk_need_resched(p) if p's slice is over, thus:

(n tick) ---> (n+1 tick)
set_tsk_need_resched(p);
another task Q is awaked

If we don't have !sched_feat(WAKEUP_PREEMPT), Q maybe will wait
for tick coming to get scheduled. If we have
!sched_feat(WAKEUP_PREEMPT), Q will get scheduled when some event
happen, like IRQ.

Thanks,
Yong

--
Only stand for myself


\
 
 \ /
  Last update: 2011-07-29 09:49    [W:0.049 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site