[lkml]   [2007]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 06/11] syslets: core, documentation
On Wed, 14 Feb 2007, Benjamin LaHaise wrote:

> On Wed, Feb 14, 2007 at 11:45:23AM -0800, Davide Libenzi wrote:
> > Sort of, except that the whole thing can complete syncronously w/out
> > context switches. The real point of the whole fibrils/syslets solution is
> > that kind of optimization. The solution is as good as it is now, for
> Except that You Can't Do That (tm). Try to predict beforehand if the code
> path being followed will touch the FPU or SSE state, and you can't. There is
> no way to avoid the context switch overhead, as you have to preserve things
> so that whatever state is being returned to the user is as it was. Unless
> you plan on resetting the state beforehand, but then you have to call into
> arch specific code that ends up with a comparable overhead to the context
> switch.

I think you may have mis-interpreted my words. *When* a schedule would
block a synco execution try, then you do have a context switch. Noone
argue that, and the code is clear. The sys_async_exec thread will block,
and a newly woke up thread will re-emerge to sys_async_exec with a NULL
returned to userspace. But in a "cachehit" case (no schedule happens
during the syscall/*let execution), there is no context switch at all.
That is the whole point of the optimization.

- Davide

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-14 21:17    [W:0.370 / U:0.588 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site