Skip to content

Commit

Permalink
sched: poll for longer before HLTing
Browse files Browse the repository at this point in the history
Increasing the poll time increases the chances that we can avoid the IPI.
Idle host load increase is negligible.
  • Loading branch information
avikivity committed Aug 5, 2013
1 parent 032aa93 commit 4e3177e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/sched.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void cpu::do_idle()
idle_poll_lock_type idle_poll_lock{*this};
WITH_LOCK(idle_poll_lock) {
// spin for a bit before halting
for (unsigned ctr = 0; ctr < 100; ++ctr) {
for (unsigned ctr = 0; ctr < 10000; ++ctr) {
// FIXME: can we pull threads from loaded cpus?
handle_incoming_wakeups();
if (!runqueue.empty()) {
Expand Down

0 comments on commit 4e3177e

Please sign in to comment.