Re: sched /HT processor

From: Jesper Juhl
Date: Sun Apr 03 2005 - 06:17:02 EST


On Sun, 3 Apr 2005, Arun Srinivas wrote:

>
> I looked at my "include/asm-i386/param.h" and the HZ value is 1000.So, I
> suppose the timer interrupt frequency is 1000 times per sec. or once every 1
> millisec.
>
> So, is scheduler_tick() ( for resceduling) called only once every 1 ms?? I am
> measuring the time when 2 of my processes are scheduled in a HT processor.So,
> the possible timedifference of when my 2 processes are scheduled can be only
> the following:
>
> 1) 0 (if both of my processes are scheduled @ the same time since its a HT)
> 2) 1ms ( this is the min. possible time diff.
> 3) some value greater than 1 ms
> Is the above argument correct?

A reschedule can happen once every ms, but also upon returning to
userspace and when returning from an interrupt handler, and also when
something in the kernel explicitly calls schedule() or sleeps (which in
turn results in a call to schedule()). And each CPU runs schedule()
independently.
At least that's my understanding of it - if I'm wrong I hope someone on
the list will correct me.


--
Jesper Juhl


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/