lkml.org 
[lkml]   [2007]   [Jul]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 30 Jul 2007 20:38:04 +0200
FromIngo Molnar <>
SubjectRe: [ck] Re: SD still better than CFS for 3d ?(was Re: 2.6.23-rc1)
* Miguel Figueiredo <elmig@debianpt.org> wrote:

> in mainline (2.6.22): > /**>  * sys_sched_yield - yield the current processor to other threads.
>  *
>  * This function yields the current CPU by moving the calling thread
>  * to the expired array. If there are no other threads running on this
>  * CPU then this function will return.
>  */
> 
> you changed it to something like:
> 
> if (unlikely(rq->nr_running == 1))
>                 schedstat_inc(rq, yld_act_empty);
>         else
>                 current->sched_class->yield_task(rq, current);
>
> wile mainline (2.6.22) and SD use:
> 
> dequeue_task(current, array);
> enqueue_task(current, target);

this is what CFS does:

  static void yield_task_fair(struct rq *rq, struct task_struct *p)
  {
          struct cfs_rq *cfs_rq = task_cfs_rq(p);
          u64 now = __rq_clock(rq);
          /*
           * Dequeue and enqueue the task to update its
           * position within the tree:
           */
          dequeue_entity(cfs_rq, &p->se, 0, now);
          enqueue_entity(cfs_rq, &p->se, 0, now);
  }
	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-30 20:41    [from the cache]
©2003-2008