Tuesday, 5 October 2010  Interactive at any load?  A funny thing
happened on the way to creating a patch to test out a feature
I've long been thinking about for BFS. I'd always thought it was
wrong that applications that are massively multithreaded (java
applications are often the biggest example, such as
azureus/vuze) get way too much CPU because threads are treated
no differently to processes on linux. So I'd been thinking for a
while for a way to group the threads together as a single
process for the purpose of CPU distribution. Today I finally
decided to toy with an approach involving adjusting deadline
(since that's how CPU is distributed on BFS) according to how
many active threads each thread group has running at any one
time.  In the spirit of BFS, I tried to find the cheapest
possible way to do this, and decided to use the thread
group_parent to store the number of active threads, and simply
extend the deadline for each thread (relative to its own nice
level). To my surprise, the group_parent was mor