Minimize scheduler locking on task creation

This takes my CPU utilization on task-perf-spawnalot from 35% to 55%
This commit is contained in:
Brian Anderson
2011-07-29 23:02:51 -07:00
parent ec46f07e6e
commit d552a0b959
2 changed files with 2 additions and 1 deletions

View File

@@ -272,7 +272,9 @@ rust_scheduler::create_task(rust_task *spawner, const char *name) {
task->pin(spawner->pinned_on);
task->on_wakeup(spawner->_on_wakeup);
}
lock.lock();
newborn_tasks.append(task);
lock.unlock();
sync::increment(kernel->live_tasks);