* RE: [processor frequency]
@ 2006-01-09 22:00 ` Mitchell, Earl
0 siblings, 0 replies; 8+ messages in thread
From: Mitchell, Earl @ 2006-01-09 22:00 UTC (permalink / raw)
To: Wolfgang Denk, Kevin D. Kissell; +Cc: Sathesh Babu Edara, linux-mips
Wolfgang,
In your summary you mention ...
"This probably explains why many developers who never use low-end embedded processors don't care about (and usually don't even know of) these problems in the 2.6 kernel."
The desktop/server guys typically use much larger caches (i.e. >= 512K)
and most have L2, compared to embedded systems which typically use less
without an L2. So I'd also expect embedded guys using small caches to see
larger decreases in performance due to more cache misses (i.e. more
interrupts produce more evictions).
-earlm
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org]On Behalf Of Wolfgang Denk
> Sent: Monday, January 09, 2006 1:24 PM
> To: Kevin D. Kissell
> Cc: Sathesh Babu Edara; linux-mips@linux-mips.org
> Subject: Re: [processor frequency]
>
>
> In message <005a01c614fb$2fe76b00$10eca8c0@grendel> you wrote:
> > There is no "ideal" value for a given processor frequency.
> > The lower the value, the less interrupt processing overhead,
> > but the slower the response time to events that are detected
> > or serviced during clock interrupts. 1000 HZ *may* be a sensible
> > value (I have my doubts, personally) for 2+ GHz PC processors,
> > but it's excessive (IMHO) for a 200MHz processor and unworkable
> > for a 20MHz CPU. I think that 100HZ is still a reasonable value
> > for an embedded RISC CPU, but the "ideal" value is going to
> > be a function of the application.
>
> We did some tests of the performance impact of 100 vs. 1000 Hz clock
> frequency on low end systems (50 MHz PowerPC); for details please see
> http://www.denx.de/wiki/view/Know/Clock100vs1000Hz
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering: Embedded and Realtime Systems, Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> Our missions are peaceful -- not for conquest. When we do battle, it
> is only because we have no choice.
> -- Kirk, "The Squire of Gothos", stardate 2124.5
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [processor frequency]
@ 2006-01-09 22:00 ` Mitchell, Earl
0 siblings, 0 replies; 8+ messages in thread
From: Mitchell, Earl @ 2006-01-09 22:00 UTC (permalink / raw)
To: Wolfgang Denk, Kevin D. Kissell; +Cc: Sathesh Babu Edara, linux-mips
Wolfgang,
In your summary you mention ...
"This probably explains why many developers who never use low-end embedded processors don't care about (and usually don't even know of) these problems in the 2.6 kernel."
The desktop/server guys typically use much larger caches (i.e. >= 512K)
and most have L2, compared to embedded systems which typically use less
without an L2. So I'd also expect embedded guys using small caches to see
larger decreases in performance due to more cache misses (i.e. more
interrupts produce more evictions).
-earlm
> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org
> [mailto:linux-mips-bounce@linux-mips.org]On Behalf Of Wolfgang Denk
> Sent: Monday, January 09, 2006 1:24 PM
> To: Kevin D. Kissell
> Cc: Sathesh Babu Edara; linux-mips@linux-mips.org
> Subject: Re: [processor frequency]
>
>
> In message <005a01c614fb$2fe76b00$10eca8c0@grendel> you wrote:
> > There is no "ideal" value for a given processor frequency.
> > The lower the value, the less interrupt processing overhead,
> > but the slower the response time to events that are detected
> > or serviced during clock interrupts. 1000 HZ *may* be a sensible
> > value (I have my doubts, personally) for 2+ GHz PC processors,
> > but it's excessive (IMHO) for a 200MHz processor and unworkable
> > for a 20MHz CPU. I think that 100HZ is still a reasonable value
> > for an embedded RISC CPU, but the "ideal" value is going to
> > be a function of the application.
>
> We did some tests of the performance impact of 100 vs. 1000 Hz clock
> frequency on low end systems (50 MHz PowerPC); for details please see
> http://www.denx.de/wiki/view/Know/Clock100vs1000Hz
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering: Embedded and Realtime Systems, Embedded Linux
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
> Our missions are peaceful -- not for conquest. When we do battle, it
> is only because we have no choice.
> -- Kirk, "The Squire of Gothos", stardate 2124.5
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [processor frequency]
2006-01-09 22:00 ` Mitchell, Earl
(?)
@ 2006-01-09 23:05 ` Wolfgang Denk
-1 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-01-09 23:05 UTC (permalink / raw)
To: Mitchell, Earl; +Cc: Kevin D. Kissell, Sathesh Babu Edara, linux-mips
Hello,
in message <3CB54817FDF733459B230DD27C690CEC010495E3@Exchange.MIPS.COM> you wrote:
>
> The desktop/server guys typically use much larger caches (i.e. >= 512K)
> and most have L2, compared to embedded systems which typically use less
> without an L2. So I'd also expect embedded guys using small caches to see
> larger decreases in performance due to more cache misses (i.e. more
> interrupts produce more evictions).
Corrent. FYI: the system used in my tests is a PowerPC at 50 MHz CPU
clock with 4 kB I-Cache and 4 kB D-Cache ...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Every program has at least one bug and can be shortened by at least
one instruction - from which, by induction, one can deduce that every
program can be reduced to one instruction which doesn't work.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [processor frequency]
@ 2006-01-10 9:36 ` Dominic Sweetman
0 siblings, 0 replies; 8+ messages in thread
From: Dominic Sweetman @ 2006-01-10 9:36 UTC (permalink / raw)
To: Mitchell, Earl
Cc: Wolfgang Denk, Kevin D. Kissell, Sathesh Babu Edara, linux-mips
My colleague Earl writes:
> The desktop/server guys typically use much larger caches (i.e. >= 512K)
> and most have L2, compared to embedded systems which typically use less
> without an L2. So I'd also expect embedded guys using small caches to see
> larger decreases in performance due to more cache misses (i.e. more
> interrupts produce more evictions).
It's certainly true that running an interrupt routine (even one which
doesn't lead to any scheduling activity) will cause some cache
traffic. But it is important to keep the relative timescales in mind.
With an averagely bad memory system, evicting and replacing a cache
line costs 150ns read latency, with a 100ns writeback (notionally done
"in the background" just after the read) on about one miss in four...
Let's make some pessimistic assumptions. Suppose an interrupt routine
displaces 2KB of code and data and uses 32-byte cache lines, and we
assume the process happens twice as the background process refills the
cache to its liking. Then we'll get 120 odd reads, which will cost
about 20us, about 2% of total time on a 1KHz clock. That doesn't
sound like it should be a huge effect.
It would be better to measure it, though.
--
Dominic Sweetman
MIPS Technologies.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [processor frequency]
@ 2006-01-10 9:36 ` Dominic Sweetman
0 siblings, 0 replies; 8+ messages in thread
From: Dominic Sweetman @ 2006-01-10 9:36 UTC (permalink / raw)
To: Mitchell, Earl
Cc: Wolfgang Denk, Kevin D. Kissell, Sathesh Babu Edara, linux-mips
My colleague Earl writes:
> The desktop/server guys typically use much larger caches (i.e. >= 512K)
> and most have L2, compared to embedded systems which typically use less
> without an L2. So I'd also expect embedded guys using small caches to see
> larger decreases in performance due to more cache misses (i.e. more
> interrupts produce more evictions).
It's certainly true that running an interrupt routine (even one which
doesn't lead to any scheduling activity) will cause some cache
traffic. But it is important to keep the relative timescales in mind.
With an averagely bad memory system, evicting and replacing a cache
line costs 150ns read latency, with a 100ns writeback (notionally done
"in the background" just after the read) on about one miss in four...
Let's make some pessimistic assumptions. Suppose an interrupt routine
displaces 2KB of code and data and uses 32-byte cache lines, and we
assume the process happens twice as the background process refills the
cache to its liking. Then we'll get 120 odd reads, which will cost
about 20us, about 2% of total time on a 1KHz clock. That doesn't
sound like it should be a huge effect.
It would be better to measure it, though.
--
Dominic Sweetman
MIPS Technologies.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re:
@ 2006-01-09 9:00 Kevin D. Kissell
2006-01-09 21:23 ` [processor frequency] Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Kevin D. Kissell @ 2006-01-09 9:00 UTC (permalink / raw)
To: Sathesh Babu Edara, linux-mips-bounce, linux-mips
There is no "ideal" value for a given processor frequency.
The lower the value, the less interrupt processing overhead,
but the slower the response time to events that are detected
or serviced during clock interrupts. 1000 HZ *may* be a sensible
value (I have my doubts, personally) for 2+ GHz PC processors,
but it's excessive (IMHO) for a 200MHz processor and unworkable
for a 20MHz CPU. I think that 100HZ is still a reasonable value
for an embedded RISC CPU, but the "ideal" value is going to
be a function of the application.
Regards,
Kevin K.
----- Original Message -----
From: "Sathesh Babu Edara" <satheshbabu.edara@analog.com>
To: "'Kevin D. Kissell'" <kevink@mips.com>; <linux-mips-bounce@linux-mips.org>; <linux-mips@linux-mips.org>
Sent: Monday, January 09, 2006 8:43 AM
Subject: RE:
>
> Hi,
> Appreciate your response .
>
> What is the ideal HZ value if the processor speed is 200Mhz?.
>
> Regards,
> Sathesh
> -----Original Message-----
> From: Kevin D. Kissell [mailto:kevink@mips.com]
> Sent: Wednesday, January 04, 2006 6:37 PM
> To: Sathesh Babu Edara
> Cc: linux-mips-bounce@linux-mips.org; linux-mips@linux-mips.org
> Subject: Re:
>
> Sathesh Babu Edara wrote:
> >
> >
> > Hi,
> > We have ported linux-2.6.12 kernel onto MIPS processor (LX4189) and
> > the processor speed is 200Mhz.
> > By default Linux-2.6.12 kernel comes with HZ value 1000.Will this HZ
> > value cause an overhead on the 200MHZ CPU.Can someone advise me on
> > whether going back to HZ vaule of 100 like Linux-2.4 will reduce the
> > overhead on this CPU.What are the side effects this change can cause?.
>
> The 1000Hz clock should not actually cause any problems with a 200MHz CPU,
> but it will suck up an annoyingly high percentage of available cycles.
> Backing off to 100Hz may cause some degradation of some
> real-time/interactive response times, but the improved overall performance
> will probably more than make up for it. I never build with a HZ value
> greater than 100 these days, but then again, I'm mostly running on FPGAs and
> other hardware emulators where the CPU clock frequencies may be less than
> 1MHz, and are never more than 33MHz.
> Note that a HZ value of less than 100 may cause some kernel macros to
> generate divide-by-zero operations/exceptions.
>
> Regards,
>
> Kevin K.
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [processor frequency]
2006-01-09 9:00 Kevin D. Kissell
@ 2006-01-09 21:23 ` Wolfgang Denk
2006-01-09 21:53 ` Kevin D. Kissell
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2006-01-09 21:23 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Sathesh Babu Edara, linux-mips
In message <005a01c614fb$2fe76b00$10eca8c0@grendel> you wrote:
> There is no "ideal" value for a given processor frequency.
> The lower the value, the less interrupt processing overhead,
> but the slower the response time to events that are detected
> or serviced during clock interrupts. 1000 HZ *may* be a sensible
> value (I have my doubts, personally) for 2+ GHz PC processors,
> but it's excessive (IMHO) for a 200MHz processor and unworkable
> for a 20MHz CPU. I think that 100HZ is still a reasonable value
> for an embedded RISC CPU, but the "ideal" value is going to
> be a function of the application.
We did some tests of the performance impact of 100 vs. 1000 Hz clock
frequency on low end systems (50 MHz PowerPC); for details please see
http://www.denx.de/wiki/view/Know/Clock100vs1000Hz
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Our missions are peaceful -- not for conquest. When we do battle, it
is only because we have no choice.
-- Kirk, "The Squire of Gothos", stardate 2124.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [processor frequency]
2006-01-09 21:23 ` [processor frequency] Wolfgang Denk
@ 2006-01-09 21:53 ` Kevin D. Kissell
2006-01-09 23:01 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Kevin D. Kissell @ 2006-01-09 21:53 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: Sathesh Babu Edara, linux-mips
Wolfgang Denk wrote:
> In message <005a01c614fb$2fe76b00$10eca8c0@grendel> you wrote:
>> There is no "ideal" value for a given processor frequency.
>> The lower the value, the less interrupt processing overhead,
>> but the slower the response time to events that are detected
>> or serviced during clock interrupts. 1000 HZ *may* be a sensible
>> value (I have my doubts, personally) for 2+ GHz PC processors,
>> but it's excessive (IMHO) for a 200MHz processor and unworkable
>> for a 20MHz CPU. I think that 100HZ is still a reasonable value
>> for an embedded RISC CPU, but the "ideal" value is going to
>> be a function of the application.
>
> We did some tests of the performance impact of 100 vs. 1000 Hz clock
> frequency on low end systems (50 MHz PowerPC); for details please see
> http://www.denx.de/wiki/view/Know/Clock100vs1000Hz
My own results, on an SMP 2.6 kernel (as opposed to the uniprocessor
2.4 kernel used for the experiments reported) have been rather different.
Certainly the degradations I observed were far worse than the 5-10% reported
in the document you cite. I'll try to repeat your experiment when I get
the time.
BTW, I'm puzzled by the "context switch" benchmark test results. By what
mechanism - or by what definition of "context switch" - can having more
frequent interrupts make context switches happen more quickly? It seems
to me that those results must be due to a systematic measurement error
being added/removed.
Regards,
Kevin K
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [processor frequency]
2006-01-09 21:53 ` Kevin D. Kissell
@ 2006-01-09 23:01 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-01-09 23:01 UTC (permalink / raw)
To: Kevin D. Kissell; +Cc: Sathesh Babu Edara, linux-mips
In message <43C2DB61.7090704@mips.com> you wrote:
>
> BTW, I'm puzzled by the "context switch" benchmark test results. By what
> mechanism - or by what definition of "context switch" - can having more
> frequent interrupts make context switches happen more quickly? It seems
> to me that those results must be due to a systematic measurement error
> being added/removed.
I have to admit that I don't have a good explanation for this either.
It's what I got with (repeated) measurements. Cache (flush) issues
might play a role here - but without closer analysis this is just
speculation.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If you can't beat it or corrupt it, you pretend it was your idea in
the first place. - Terry Pratchett, _Guards! Guards!_
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-01-10 9:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-09 22:00 [processor frequency] Mitchell, Earl
2006-01-09 22:00 ` Mitchell, Earl
2006-01-09 23:05 ` Wolfgang Denk
2006-01-10 9:36 ` Dominic Sweetman
2006-01-10 9:36 ` Dominic Sweetman
-- strict thread matches above, loose matches on Subject: below --
2006-01-09 9:00 Kevin D. Kissell
2006-01-09 21:23 ` [processor frequency] Wolfgang Denk
2006-01-09 21:53 ` Kevin D. Kissell
2006-01-09 23:01 ` Wolfgang Denk
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.