Skip to contentSkip to conversation

HZ, tick timer and scheduler relation

Xenomai-core Junior 2 participants 2 messages Jun 16, 2007

lore
Share & tools
lore

Junior

author
#0 lore raw

Hi all,
It was suggested that I ask this question on this list. If I have the wrong list please let me know.

I'm using ARM linux kernel 2.6.18 on a custom board and on my development board the scheduler timeslice was 10ms and on my custom board it's 100ms. I had HZ up'ed to 400 instead of the 200 ARM default.
I've tried repeatedly to reduce this to 10ms but for some reason changing HZ has no effect as the scheduler timeslice hovers around 100ms +/- 10ms. My clock tick timer is set the same @ ~3.6MHz. On the 2.6.18 kernel, Changing HZ does have the expected effect but perhaps something changed in 2.6.18.

I'm trying to understand what the relation is between HZ, the clock tick timer and the scheduler timeslice.
Could anyone help me understand this? or suggest some good reading materials?

Thank You.
--Jr.

#1 lore raw
Quoted 14 lines · Junior

Hi all,
It was suggested that I ask this question on this list. If I have the wrong list please let me know.

I'm using ARM linux kernel 2.6.18 on a custom board and on my development board the scheduler timeslice was 10ms and on my custom board it's 100ms. I had HZ up'ed to 400 instead of the 200 ARM default.
I've tried repeatedly to reduce this to 10ms but for some reason changing HZ has no effect as the scheduler timeslice hovers around 100ms +/- 10ms. My clock tick timer is set the same @ ~3.6MHz. On the 2.6.18 kernel, Changing HZ does have the expected effect but perhaps something changed in 2.6.18.

Quoted 3 lines

I'm trying to understand what the relation is between HZ, the clock tick timer and the scheduler timeslice.
Could anyone help me understand this? or suggest some good reading materials?

Looking at linux 2.6.19 code, it seems that the scheduler timeslice (as returned by sched_get_rr_interval) depends on the nice value of a process. Higher priority processes have a longer timeslice.

Signature · 1 line
					    Gilles Chanteperdrix.