Re: GSoC: Add SMT/HT awareness to DragonFlyBSD scheduler
Mihai Carabas <[email protected]>
| Newsgroups | gmane.os.dragonfly-bsd.kernel |
|---|---|
| Message-ID | <CANg1yUt7=+mGi2Ych4r5Nu4+C2zFZ=XS0AjCecP-q2rcRGahMA@mail.gmail.com> |
Hi, I fixed the bugs regarding the CPU Topology on monster (here [1] you have the cpu topology sysctl output from the monster). There were multiple problems: - one bug that I introduced when I did the refactoring in order to add support for cpu topology to the vkernel - I considered that the APICIDs are starting from 0 (in this case the APICIDs were starting from 16) - I considered that the APICIDs are consecutive (in this case they weren't...because the number of cores/cpu isn't a power of two, so it had to be skipped some ids between different physical cpus) - I found a bug in "sbuf_vprintf". If the sbuf is auto expandable and if there isn't enough space to put all the data, the sbuf is expanded and give another try. The problem is that the va_list "ap" may be left in an inconsistent state (va_arg() only iterated through some of the arguments) and the print of the arguments would be wrong. I have made a fix, using a copy of the "ap" [2]. (Alex H, I think this commit must go to master if I am right). PS: Matthew thanks a lot for the monster. You can shut it down now:). I don't have any heuristics for core/chip cache coherence right now to do performance testing. [1] http://leaf.dragonflybsd.org/~mihaic/monster_cpu_topology [2] https://github.com/mihaicarabas/dragonfly/commit/5834c4f987284ba4f395ae701a64f3985ffc7490