* [Question] Local Timer based on SPI
@ 2010-11-26 2:01 Kukjin Kim
2010-11-26 9:10 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Kukjin Kim @ 2010-11-26 2:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
I have a question about local timer.
Current ARM Local Timer code is based on PPI using.
If want to use SPI on local timer, what approach is right or better?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Question] Local Timer based on SPI
2010-11-26 2:01 [Question] Local Timer based on SPI Kukjin Kim
@ 2010-11-26 9:10 ` Russell King - ARM Linux
2010-11-29 10:25 ` Kukjin Kim
0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-11-26 9:10 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 26, 2010 at 11:01:31AM +0900, Kukjin Kim wrote:
> Current ARM Local Timer code is based on PPI using.
> If want to use SPI on local timer, what approach is right or better?
SPI interrupts only go to one core at a time. You can't have local
timer support off a targetted interrupt.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Question] Local Timer based on SPI
2010-11-26 9:10 ` Russell King - ARM Linux
@ 2010-11-29 10:25 ` Kukjin Kim
2010-11-29 11:05 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Kukjin Kim @ 2010-11-29 10:25 UTC (permalink / raw)
To: linux-arm-kernel
Russell King wrote:
>
> On Fri, Nov 26, 2010 at 11:01:31AM +0900, Kukjin Kim wrote:
> > Current ARM Local Timer code is based on PPI using.
> > If want to use SPI on local timer, what approach is right or better?
>
> SPI interrupts only go to one core at a time. You can't have local
> timer support off a targetted interrupt.
Hi Russell,
Thank you for your reply :-)
Yeah, it seems CONFIG_LOCAL_TIMER is just for PPI.
The purpose of my question is for the plan to use different SPIs to support
each CPU event timer. According to the help message of LOCAL_TIMER in
Kconfig, it seems better each CPU has a different event timer source clock
instead of using IPI broadcast method. Current ARM implementation registers
dummy_timers when CONFIG_LOCAL_TIMERS is not set so, I think need to set
CONFIG_LOCAL_TIMERS.
To support different SPIs for each CPU event timer, should I neglect the
dummy_timer?
Or is it not worth to implement?...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Question] Local Timer based on SPI
2010-11-29 10:25 ` Kukjin Kim
@ 2010-11-29 11:05 ` Russell King - ARM Linux
0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-11-29 11:05 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 29, 2010 at 07:25:30PM +0900, Kukjin Kim wrote:
> Yeah, it seems CONFIG_LOCAL_TIMER is just for PPI.
>
> The purpose of my question is for the plan to use different SPIs to support
> each CPU event timer. According to the help message of LOCAL_TIMER in
> Kconfig, it seems better each CPU has a different event timer source clock
> instead of using IPI broadcast method. Current ARM implementation registers
> dummy_timers when CONFIG_LOCAL_TIMERS is not set so, I think need to set
> CONFIG_LOCAL_TIMERS.
The dummy timer clock event device is setup to provide the core with a
means to broadcast the timer IPI when there isn't a local timer. When
there is a local timer, this function falls to the local timer clock
event device (which is actually the same structure, just initialized in
a different way.)
> To support different SPIs for each CPU event timer, should I neglect the
> dummy_timer?
> Or is it not worth to implement?...
It depends how many CPU cores you have. If you have just two, then the
"thundering herd" issue may not affect you too much.
The idea behind local timers is to avoid all CPUs being woken at the same
point in time, and then immediately contending over the same set of locks.
Local timers help to distribute the wakeups throughout the interval, and
thereby avoid contention.
If you have one CPU and you IPI the timer to it, then you've probably
already done much of the work with the locks held already.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-29 11:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 2:01 [Question] Local Timer based on SPI Kukjin Kim
2010-11-26 9:10 ` Russell King - ARM Linux
2010-11-29 10:25 ` Kukjin Kim
2010-11-29 11:05 ` Russell King - ARM Linux
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).