lkml.org 
[lkml]   [2005]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [uml-devel] [patch 02/12] uml: cpu_relax fix
Blaisorblade <blaisorblade@yahoo.it> wrote:
>
> On Wednesday 23 March 2005 18:09, Bodo Stroesser wrote:
> > blaisorblade@yahoo.it wrote:
> > > Use rep_nop instead of barrier for cpu_relax, following $(SUBARCH)'s
> > > doing that (i.e. i386 and x86_64).
> >
> > IIRC, Jeff had the idea, to use sched_yield() for this (from a discussion
> > on #uml).
> Hmm, makes sense, but this is to benchmark well... I remember from early
> discussions on 2.6 scheduler that using sched_yield might decrease
> performance (IIRC starve the calling application).

yup, sched_yield() is pretty uniformly bad, and can result in heaps of
starvation if the machine is busy. Best to avoid it unless you really want
it, and have tested it thoroughly under many-tasks-busy workloads.

-
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: 2005-04-06 13:30    [W:0.059 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site