linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What's the timeslice size for kernel 2.6.0-test2, IA32?
@ 2003-08-01 15:51 Stephen Anthony
  2003-08-01 16:13 ` Con Kolivas
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Anthony @ 2003-08-01 15:51 UTC (permalink / raw)
  To: linux-kernel

I haven't been able to find this information anywhere.  I know HZ was 
increased to 1000, but was the timeslice decreased to 1 ms (from 10 ms) 
as well?

Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the timeslice size for kernel 2.6.0-test2, IA32?
  2003-08-01 15:51 What's the timeslice size for kernel 2.6.0-test2, IA32? Stephen Anthony
@ 2003-08-01 16:13 ` Con Kolivas
  0 siblings, 0 replies; 4+ messages in thread
From: Con Kolivas @ 2003-08-01 16:13 UTC (permalink / raw)
  To: Stephen Anthony, linux-kernel

On Sat, 2 Aug 2003 01:51, Stephen Anthony wrote:
> I haven't been able to find this information anywhere.  I know HZ was
> increased to 1000, but was the timeslice decreased to 1 ms (from 10 ms)
> as well?

Depends on nice of the task. Nice 0 tasks get 102ms.

Con


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the timeslice size for kernel 2.6.0-test2, IA32?
  2003-08-01 19:29   ` Ben Greear
@ 2003-08-02  9:25     ` george anzinger
  0 siblings, 0 replies; 4+ messages in thread
From: george anzinger @ 2003-08-02  9:25 UTC (permalink / raw)
  To: Ben Greear; +Cc: Mark Mielke, Stephen Anthony, linux-kernel

Ben Greear wrote:
> 
> Mark Mielke wrote:
> 
>> On Fri, Aug 01, 2003 at 02:04:46PM -0230, Stephen Anthony wrote:
>>
>>> It would be great if sleeps were 1ms accurate instead of 10ms.  It 
>>> would make synchronization code a lot easier.
>>
>>
>>
>> Doesn't this depend on what HZ you define for the kernel?
>>
>> If you want 1ms sleep, just set HZ to 1000HZ+, and give your process a
>> high priority?

As it currently stands in the 2.6 kernel for the i386, HZ is defined 
as 1000.  Since the PIT interrupt source can not hit this, the actual 
timer interrupt period is 999848 nano seconds.  The minimum sleep 
interval nanosleep will take is 1 of these and since the time may 
start between ticks it adds another to give a min sleep time of 
999848+~1/2 of that depending on where the request falls in the time 
period.

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What's the timeslice size for kernel 2.6.0-test2, IA32?
  2003-08-01 18:34 ` Mark Mielke
@ 2003-08-01 19:29   ` Ben Greear
  2003-08-02  9:25     ` george anzinger
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Greear @ 2003-08-01 19:29 UTC (permalink / raw)
  To: Mark Mielke; +Cc: Stephen Anthony, linux-kernel

Mark Mielke wrote:
> On Fri, Aug 01, 2003 at 02:04:46PM -0230, Stephen Anthony wrote:
> 
>>It would be great if sleeps were 1ms accurate instead of 10ms.  It would 
>>make synchronization code a lot easier.
> 
> 
> Doesn't this depend on what HZ you define for the kernel?
> 
> If you want 1ms sleep, just set HZ to 1000HZ+, and give your process a
> high priority?
> 
> mark
> 

 From user space, at least, you can configure /dev/rtc to 1024HZ and then
select on it's file descriptor.  That will give you fairly reliable 1ms (or so)
sleeps, especially if you set your niceness to a high-priority setting.

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-02  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 15:51 What's the timeslice size for kernel 2.6.0-test2, IA32? Stephen Anthony
2003-08-01 16:13 ` Con Kolivas
2003-08-01 16:34 Stephen Anthony
2003-08-01 18:34 ` Mark Mielke
2003-08-01 19:29   ` Ben Greear
2003-08-02  9:25     ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).