Discussion:
CFS and nice values
Norbert Aschendorff
2013-06-23 20:42:50 UTC
Permalink
Hi, I hope I'm right on the newbie list for my issue. If not, please
direct me to the correct place :)

I currently have a hard time understanding how CFS uses the nice
values/priorities to give to some processes more processor time. If I
got it right till here (I'm reading "Linux Kernel Development" by Robert
Love), CFS always schedules the runnable process with the lowest
vruntime (the leftmost node in the rq (runqueue?) RBTree).
I think I somewhere read something (rather fuzzy, hehe) that
high-priority tasks are given a longer slice before they run.
But after gazing at the code in kernel/sched/fair.c for a while, I still
don't know how the nice value is used (e.g. where and how is the length
of the run time of the task calculated, and where does the context
switch happen?)

I'd be happy if someone could help me :)

Regards,
Norbert
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Loading...