[haiku-bugs] [Haiku] #1069: Create thread scheduler with CPU affinity

  • From: "Duggan" <trac@xxxxxxxxxxxx>
  • Date: Thu, 20 Oct 2011 22:23:07 -0000

#1069: Create thread scheduler with CPU affinity
-----------------------------+---------------------------
   Reporter:  axeld          |      Owner:  meianoite
       Type:  enhancement    |     Status:  new
   Priority:  normal         |  Milestone:  R1
  Component:  System/Kernel  |    Version:  R1/pre-alpha1
 Resolution:                 |   Keywords:
 Blocked By:                 |   Blocking:
Has a Patch:  0              |   Platform:  All
-----------------------------+---------------------------

Attachment added (by Duggan):

scheduler.diff (15.5 KB) - This is an intermediate patch to some work I'm doing 
on the extant affine scheduler. Theoretically hyperthreaded cores should share 
ready queues now and there's a little support for soft affinities for teams. I 
can't test the hyperthreading code so if you guys can test this on various 
Intel and AMD processors and provide some feedback (mostly syslogs, bt's if it 
crashes) I would appreciate it. Future work includes proper load balancing and 
affinities, API functions to support affinities, possibly a thread class (a la 
BeAPI) that provides an OO wrapper to the API functions. Other changes I would 
like to make as well include shutting down unnecessary cores when the load is 
light and reenabling them as the load increases as well as potentially doing 
away with the global scheduler lock in favour of per-queue locks. Again, this 
is an intermediate patch so there's likely alot of problems with it besides 
bugs (but I did run it through the style checker and did the diff from trunk 
this time ;) ... not saying there's not still style errors, just not in my 
code). Cheers!

View the file at http://dev.haiku-os.org/attachment/ticket/1069/scheduler.diff

-- 
Ticket URL: http://dev.haiku-os.org/ticket/1069
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: