Skip to content

Use TASK_IDLE for homa_timer sleeps - #17

Closed
Stuartwastaken wants to merge 1 commit into
mainfrom
fix/timer-task-idle
Closed

Stuartwastaken wants to merge 1 commit into
mainfrom
fix/timer-task-idle

Conversation

@Stuartwastaken

Copy link
Copy Markdown
Owner

homa_timer_main sleeps between ticks in TASK_UNINTERRUPTIBLE, so the homa_timer thread sits in D state almost all the time and counts toward the load average. On an idle VM with Homa loaded, /proc/loadavg settles at about 1.0 and ps shows homa_timer as D; with this change it shows I and the load average decays toward 0.

TASK_IDLE is TASK_UNINTERRUPTIBLE plus TASK_NOLOAD, so signals and kthread_stop behave as before; only the load accounting changes.

The timer thread slept in TASK_UNINTERRUPTIBLE between ticks, so it
counted toward the load average: an idle machine with Homa loaded
showed a load average of about 1.0. TASK_IDLE sleeps the same way
but isn't counted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant