ULE 2.0 hits -HEAD

• 本文约 506 字,阅读大致需要 3 分钟 | *nix and Win32 Kernel

Today, Jeff Roberson has committed his version 2.0 ULE scheduler. This new version has addressed several design issues as well as several bugs.

The new scheduler has adopted a circular queue, instead of the double-queue structure which is also found in the Linux O(1) scheduler. The latter has lead to difficulty implementing nice correctly.

For uniprocessor case, ULE is now faster.

MP algorithm has been simplified a bit.

A lot of bugfixes, etc.

To quote the original commit message:

ULE 2.0:

Bug fixes/Clean up:

Tested on: up x86/amd64, 8way amd64.

David Xu has pointed out that, in reply to Jeff’s announcement:

“I think it might be not a right way to work on FreeBSD thread scheduler, it is more important to work out a cpu dispatcher rather than inventing a dynamic priority algorithm to replace 4BSD’s algorithm, the 4BSD dynamic priority algorithm is still the best one I can find, it provides very good fairness. the most important thing is there should be a cpu dispatcher which knows how to place a thread on a cpu with cpu affinity-aware, maybe multiple runqueues, it knows cpu topology, and may be NUMA awareness, maybe provide cpu partitions, root can create and destroy a partition, root can add cpu to the partition or remove a cpu from the parition or move a cpu from partition a to partition b, bind applications to a partition etcs. On the top of cpu-dispatcher, there could be 4BSD or other dynamic priority alogrithm, but that’s less important than this one. with this thought, I am going to remove sched_core as I found the cpu dispatcher is the key thing.”