* At this point it's sure that we have a SMT * imbalance: this (physical) CPU is idle but * another CPU has two (or more) tasks running.

true? Do you mean "this cpu/sibling set are all idle but anothercpu/sibling set are all non-idle"? Are we assuming that because botha physical processor and its sibling are not idle, that it is better tomove a task from the sibling to a physical processor? In other words,we are presuming that the case where the task on the physical processorand the task(s) on the sibling(s) are actually benefitting from therelationship is rare?

* We wake up one of the migration threads (it * doesnt matter which one) and let it fix things up:

So although a migration thread normally pulls tasks to it, we've alteredmigration_thread now so that when cpu_active_balance() is set for itscpu, it will go find a cpu/sibling set in which all siblings are busy(knowing it has a good chance of finding one), decrement nr_running inthe runqueue it has found, call load_balance() on the queue which isidle, and hope that load_balance will again find the busy queue (thesame queue as the migration thread's) and decide to move a task over?

whew. So why are we perverting the migration thread to push ratherthan pull? If active_load_balance() finds a imbalance, why must we usesuch indirection? Why decrement nr_running? Couldn't we put togethera migration_req_t for the target queue's migration thread?

Making the migration thread TASK_UNINTERRUPTIBLE has the nasty sideeffect of artificially raising the load average. Why is this changed?