Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 09-06-2012, 06:53 PM   #1
LQ Newbie
Registered: Jul 2012
Posts: 4

Rep: Reputation: Disabled
Linux fair schedule timeslice 1-5ms?

I understand that Linux fair timeslice varies depending on the nr_running and the relative weight of this fair task, but through code studying, I figured out the main idea is to keep the timeslice 1 to 5 ms. Please correct me if I understand it wrong. I must be wrong here but I just cannot figure out how!

Also knowing that HZ, or the number of system ticks per s, or the number of timer interrupts every second, is normally 200 or 100 for arm machine (and most non-desktop machines too), which gives us a 5 to 10 ms tick rate.

Timeslice is put in action by starting rq->hrtick_timer in set_next_entity(), every time a fair task is scheduled to run, and invoking resched_task() in timeout callback function hrtick(). This timer is simply one of the queued timers that are processed by timer irq handler on every tick, timer_tick()...run_local_timer(). There seems no other hidden secret.

Then how we can get a timeslice shorter than 5 ms? Please help me understand this. Thank you very much!

The reason of asking this was really because of the interest to know how fine the granularity of the time service we can get at the most. Thanks!

Last edited by helenwoo; 09-07-2012 at 02:47 PM. Reason: wanted to make the title more attractive, but it seems that title cannot be modified, so give up.


linux, linux +

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux: The Really Fair Scheduler LXer Syndicated Linux News 0 09-01-2007 09:50 AM
LXer: Schedule Tasks Using Gnome-schedule (cron & at GUI) LXer Syndicated Linux News 0 07-28-2007 12:31 AM
Will this work - Wide Screen TFT Monitor 5ms Greebstreebling Linux - Hardware 2 05-16-2007 08:17 PM
LXer: Fair use or lack of fair play? LXer Syndicated Linux News 0 07-22-2006 06:03 AM
Something fair to say about linux and windows TigerLinux Linux - General 4 02-26-2006 11:51 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration