All of lore.kernel.org
 help / color / mirror / Atom feed
* system timer interrupt targets for SMP platforms with local timer support
@ 2011-05-17 20:11 Christopher Harvey
  2011-05-17 22:28 ` Mulyadi Santosa
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Harvey @ 2011-05-17 20:11 UTC (permalink / raw)
  To: kernelnewbies

 I'm having a hard time finding out by reading documentation and source 
 code if a system timer IRQ is supposed to be directed at all cores of a 
 processor or if just interrupting one core is enough.

 I know interrupting one core is enough without local timers, because an 
 IPI will be used to interrupt the other. These IPIs are not used with 
 local timers, so does the global timer need to send an IRQ at the same 
 time to both cores in that case?

 Thanks,
 -Chris

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

* system timer interrupt targets for SMP platforms with local timer support
  2011-05-17 20:11 system timer interrupt targets for SMP platforms with local timer support Christopher Harvey
@ 2011-05-17 22:28 ` Mulyadi Santosa
  2011-05-17 23:56   ` Christopher Harvey
  0 siblings, 1 reply; 4+ messages in thread
From: Mulyadi Santosa @ 2011-05-17 22:28 UTC (permalink / raw)
  To: kernelnewbies

Hi Chris....

On Wed, May 18, 2011 at 03:11, Christopher Harvey
<chris@basementcode.com> wrote:
> ?I'm having a hard time finding out by reading documentation and source
> ?code if a system timer IRQ is supposed to be directed at all cores of a
> ?processor or if just interrupting one core is enough.

my take is if we don't use local timer interrupt, then logically
(global timer) should interrupt all cores.

I came to this understanding after recalling a fact that timer is a
way to trigger rescheduling after a time slice of a task is expired.
SInce we can't assume anything on which core a task is currently
running, then it would be easier if we just send interrupt to all
cores.

Not sure if you are agree with my deduction above....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* system timer interrupt targets for SMP platforms with local timer support
  2011-05-17 22:28 ` Mulyadi Santosa
@ 2011-05-17 23:56   ` Christopher Harvey
  2011-05-18 20:08     ` Mulyadi Santosa
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Harvey @ 2011-05-17 23:56 UTC (permalink / raw)
  To: kernelnewbies

On 05/17/11 18:28, Mulyadi Santosa wrote:
> Hi Chris....
>
> On Wed, May 18, 2011 at 03:11, Christopher Harvey
> <chris@basementcode.com>  wrote:
>>   I'm having a hard time finding out by reading documentation and source
>>   code if a system timer IRQ is supposed to be directed at all cores of a
>>   processor or if just interrupting one core is enough.
>
> my take is if we don't use local timer interrupt, then logically
> (global timer) should interrupt all cores.
>
> I came to this understanding after recalling a fact that timer is a
> way to trigger rescheduling after a time slice of a task is expired.
> SInce we can't assume anything on which core a task is currently
> running, then it would be easier if we just send interrupt to all
> cores.
>
> Not sure if you are agree with my deduction above....
>

I half agree. The way I see it now, WITHOUT local timers a timer only 
needs to interrupt one core, and an IPI will interrupt the other.

My question is:
Does a global timer need to send an interrupt to both cores when local 
timers are enabled or is a a global timer interrupt on one core combined 
with the local timers enough?

Thanks

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

* system timer interrupt targets for SMP platforms with local timer support
  2011-05-17 23:56   ` Christopher Harvey
@ 2011-05-18 20:08     ` Mulyadi Santosa
  0 siblings, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2011-05-18 20:08 UTC (permalink / raw)
  To: kernelnewbies

Hi...

On Wed, May 18, 2011 at 06:56, Christopher Harvey
<chris@basementcode.com> wrote:
> I half agree. The way I see it now, WITHOUT local timers a timer only needs
> to interrupt one core, and an IPI will interrupt the other.

based on my knowledge that registered timer handler (created by kernel
function, not the one that handle PIT for example) are kept as per CPU
list, then I am fairly sure local timer just need to interrupt its
core and IPI is not really needed.

> My question is:
> Does a global timer need to send an interrupt to both cores when local
> timers are enabled or is a a global timer interrupt on one core combined
> with the local timers enough?

my take is: if local timer (i.e by using LAPIC) is enabled and active,
then global timer is practically not needed. After all, I guess they
would be just overlapping...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

end of thread, other threads:[~2011-05-18 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17 20:11 system timer interrupt targets for SMP platforms with local timer support Christopher Harvey
2011-05-17 22:28 ` Mulyadi Santosa
2011-05-17 23:56   ` Christopher Harvey
2011-05-18 20:08     ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.