lkml.org 
[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/19] scheduler: implement workqueue scheduler class


On Thu, 1 Oct 2009, Ingo Molnar wrote:
>
> Yeah. That scheme was hobbled by signal semantics: it looked hard to do
> the 'flip a reserve thread with a blocked thread' trick in the scheduler
> while still keeping all the signal details in place.

I think we should look at David Wheeler's advice: "Any problem in computer
science can be solved with another level of indirection".

In particular, my favourite solution to this is to split "struct
thread_struct" into a new part, which would be "CPU state".

In other words, all threadlets would share one single "struct
thread_struct" (and thus local signal state), but they would then each
have a "struct cpu_state" associated with them, which includes the kernel
stack. And that cpu_state thing would not be preempted, it would be
something like a round-robin cooperative scheduling that is only invoced
when a threadlet goes to sleep.

Linus


\
 
 \ /
  Last update: 2009-10-18 23:28    [W:0.407 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site