Feature #9
Finish multicore support
| Status: | Closed | Start: | 06/12/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | 09/15/2010 | |
| Assigned to: | % Done: | 100% |
||
| Category: | Kernel | Spent time: | 12.00 hours | |
| Target version: | Foster | Estimated time: | 4.00 hours |
Description
Title says it all - finish multicore support.
History
Updated by Eduard Burtescu about 1 year ago
- Category set to Kernel
- Status changed from New to Assigned
- Assigned to set to Matthew Iselin
Updated by Matthew Iselin about 1 year ago
- Due date set to 09/15/2010
- Target version set to Foster
- % Done changed from 0 to 70
- Estimated time set to 4.00
All additional cores are now started up and the system runs as normal. At the moment however everything runs on the BSP and the APs just sit there with an idle thread running - there needs to be a primitive somewhere that transfers a thread from one PerProcessorScheduler to another, and does so safely. This way as one core becomes loaded threads can be moved to a less loaded processor - or, a round robin concept can be used to get coverage across all CPUs.
A round robin concept would just involve keeping track of every PerProcessorScheduler and the "next one" to use, and converting Thread's code to register with the scheduler to use this new round robin core allocator. Ideally this would use a CoreAllocationAlgorithm to allow us to move to more complex routines for moving threads between cores. As each thread comes in to the round robin allocator, it assigns it to the "next" PerProcessorScheduler and jumps to the next one, ready to take the next thread. A round robin system means that on a 4-core system, with 8 threads, each core will be running 2 threads. It does not distinguish load, so a significant load on CPU0 from 2 threads will not cause a balance operation to improve performance. It's just a quick and dirty implementation that does the job until a better algorithm is implemented.
Updated by Matthew Iselin about 1 year ago
- Status changed from Assigned to Closed
- % Done changed from 70 to 100
Thread to core allocation is now done: shows up some issues with IRQ handling - need to implement an APIC driver still (this'll be good for the rest of the system anyway!).
It'd be nice to replace the uniprocessor build with the multiprocessor build even for single-core targets to increase coverage - stuff like the APIC and all that is currently MP-only in Pedigree.
New issues should be made for further issues, the core support is done.