Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-25 Thread Vojtech Pavlik
On Sat, Jul 23, 2005 at 04:40:46PM -0700, randy_dunlap wrote: > On Sat, 16 Jul 2005 23:55:17 -0400 Lee Revell wrote: > > > On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: > > > As you've seen, I think it depends on the timesource: for the PIT, it > > > would be

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-25 Thread Vojtech Pavlik
On Sat, Jul 23, 2005 at 04:40:46PM -0700, randy_dunlap wrote: On Sat, 16 Jul 2005 23:55:17 -0400 Lee Revell wrote: On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: As you've seen, I think it depends on the timesource: for the PIT, it would be

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-24 Thread Bill Davidsen
Jesper Juhl wrote: On 7/24/05, randy_dunlap <[EMAIL PROTECTED]> wrote: On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: +static int __init jiffies_increment_setup(char *str) +{ + printk(KERN_NOTICE "setting up jiffies_increment : "); + if (str) { +

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-24 Thread Bill Davidsen
Jesper Juhl wrote: On 7/24/05, randy_dunlap [EMAIL PROTECTED] wrote: On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: +static int __init jiffies_increment_setup(char *str) +{ + printk(KERN_NOTICE setting up jiffies_increment : ); + if (str) { +

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread Jesper Juhl
On 7/24/05, randy_dunlap <[EMAIL PROTECTED]> wrote: > On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: > > > +static int __init jiffies_increment_setup(char *str) > > +{ > > + printk(KERN_NOTICE "setting up jiffies_increment : "); > > + if (str) { > > + printk("kernel_hz

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread randy_dunlap
On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: > +static int __init jiffies_increment_setup(char *str) > +{ > + printk(KERN_NOTICE "setting up jiffies_increment : "); > + if (str) { > + printk("kernel_hz = %s, ", str); > + } else { > + printk("kernel_hz

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread randy_dunlap
On Sat, 16 Jul 2005 23:55:17 -0400 Lee Revell wrote: > On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: > > As you've seen, I think it depends on the timesource: for the PIT, it > > would be arch/i386/kernel/timers/timer_pit.c::setup_pit_timer(). > > That one looks pretty

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread randy_dunlap
On Sat, 16 Jul 2005 23:55:17 -0400 Lee Revell wrote: On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: As you've seen, I think it depends on the timesource: for the PIT, it would be arch/i386/kernel/timers/timer_pit.c::setup_pit_timer(). That one looks pretty straightforward.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread randy_dunlap
On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: +static int __init jiffies_increment_setup(char *str) +{ + printk(KERN_NOTICE setting up jiffies_increment : ); + if (str) { + printk(kernel_hz = %s, , str); + } else { + printk(kernel_hz is unset, );

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-23 Thread Jesper Juhl
On 7/24/05, randy_dunlap [EMAIL PROTECTED] wrote: On Fri, 15 Jul 2005 05:46:44 +0200 Jesper Juhl wrote: +static int __init jiffies_increment_setup(char *str) +{ + printk(KERN_NOTICE setting up jiffies_increment : ); + if (str) { + printk(kernel_hz = %s, , str); +

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-18 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: > Well.. I tried a patch to do the broadcast thing couple of months ago and > failed to convince everyone :(. I must have missed the patch -- but was the change unconditional or affecting only broken systems? And how such systems were

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-18 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Andi Kleen wrote: > > That's like scratching your left ear with your right hand -- broadcasting > > that external timer interrupt in the first place is more straightforward. > > If you want to exclude CPUs from the list of receivers, just use the > > logical destination

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-18 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Andi Kleen wrote: That's like scratching your left ear with your right hand -- broadcasting that external timer interrupt in the first place is more straightforward. If you want to exclude CPUs from the list of receivers, just use the logical destination mode

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-18 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: Well.. I tried a patch to do the broadcast thing couple of months ago and failed to convince everyone :(. I must have missed the patch -- but was the change unconditional or affecting only broken systems? And how such systems were determined?

Re: High irq load (Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-17 Thread Herbert Poetzl
On Thu, Jul 14, 2005 at 04:25:12PM +0200, Peter Osterlund wrote: > Linus Torvalds <[EMAIL PROTECTED]> writes: > > > On Wed, 13 Jul 2005, Jan Engelhardt wrote: > > > > > > No, some kernel code causes a triple-fault-and-reboot when the HZ is >= > > > 10KHz. Maybe the highest possible value is 8192

Re: High irq load (Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-17 Thread Herbert Poetzl
On Thu, Jul 14, 2005 at 04:25:12PM +0200, Peter Osterlund wrote: Linus Torvalds [EMAIL PROTECTED] writes: On Wed, 13 Jul 2005, Jan Engelhardt wrote: No, some kernel code causes a triple-fault-and-reboot when the HZ is = 10KHz. Maybe the highest possible value is 8192 Hz, not sure.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Lee Revell
On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: > As you've seen, I think it depends on the timesource: for the PIT, it > would be arch/i386/kernel/timers/timer_pit.c::setup_pit_timer(). That one looks pretty straightforward. arch/i386/kernel/timers/timer_tsc.c really looks like fun.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Nish Aravamudan
On 7/16/05, Jesper Juhl <[EMAIL PROTECTED]> wrote: > On 7/15/05, Jesper Juhl <[EMAIL PROTECTED]> wrote: > > On 7/15/05, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > > > > On Fri, 15 Jul 2005, Jesper Juhl wrote: > > > > > > > > It's buggy, that I know. setting kernel_hz (the new boot parameter)

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Lee Revell
On Sun, 2005-07-17 at 04:13 +0200, Jesper Juhl wrote: > Where do we actually program the tick rate we want? > In arch/i386/kernel/timers/timer_pit.c: 166 void setup_pit_timer(void) 167 { 168 unsigned long flags; 169 170 spin_lock_irqsave(_lock, flags);

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Jesper Juhl
On 7/15/05, Jesper Juhl <[EMAIL PROTECTED]> wrote: > On 7/15/05, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > > On Fri, 15 Jul 2005, Jesper Juhl wrote: > > > > > > It's buggy, that I know. setting kernel_hz (the new boot parameter) to > > > 250 causes my system clock to run at something like

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Pavel Machek
Hi! > > The real answer here is for the tickless patches to cleaned up to > > the point where they can be merged, and then we won't waste battery > > power entering the timer interrupt in the first place. :-) > > Whilst conceptually this is a nice idea I've yet to see any viable > code that

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Pavel Machek
Hi! > > Alan tested it and said that 250HZ does not save much power anyway. > > Len Brown, a year ago: "The bottom line number to laptop users is battery > lifetime. Just today somebody complained to me that Windows gets twice the > battery life that Linux does." > > And "Maybe I can get Andy

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Pavel Machek
Hi! Alan tested it and said that 250HZ does not save much power anyway. Len Brown, a year ago: The bottom line number to laptop users is battery lifetime. Just today somebody complained to me that Windows gets twice the battery life that Linux does. And Maybe I can get Andy Grover over

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Pavel Machek
Hi! The real answer here is for the tickless patches to cleaned up to the point where they can be merged, and then we won't waste battery power entering the timer interrupt in the first place. :-) Whilst conceptually this is a nice idea I've yet to see any viable code that overall has

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Jesper Juhl
On 7/15/05, Jesper Juhl [EMAIL PROTECTED] wrote: On 7/15/05, Linus Torvalds [EMAIL PROTECTED] wrote: On Fri, 15 Jul 2005, Jesper Juhl wrote: It's buggy, that I know. setting kernel_hz (the new boot parameter) to 250 causes my system clock to run at something like 4-5 times normal

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Lee Revell
On Sun, 2005-07-17 at 04:13 +0200, Jesper Juhl wrote: Where do we actually program the tick rate we want? In arch/i386/kernel/timers/timer_pit.c: 166 void setup_pit_timer(void) 167 { 168 unsigned long flags; 169 170 spin_lock_irqsave(i8253_lock, flags);

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Nish Aravamudan
On 7/16/05, Jesper Juhl [EMAIL PROTECTED] wrote: On 7/15/05, Jesper Juhl [EMAIL PROTECTED] wrote: On 7/15/05, Linus Torvalds [EMAIL PROTECTED] wrote: On Fri, 15 Jul 2005, Jesper Juhl wrote: It's buggy, that I know. setting kernel_hz (the new boot parameter) to 250 causes my

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-16 Thread Lee Revell
On Sat, 2005-07-16 at 19:35 -0700, Nish Aravamudan wrote: As you've seen, I think it depends on the timesource: for the PIT, it would be arch/i386/kernel/timers/timer_pit.c::setup_pit_timer(). That one looks pretty straightforward. arch/i386/kernel/timers/timer_tsc.c really looks like fun. So

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Eric St-Laurent
On Fri, 2005-07-15 at 12:58 -0700, Stephen Pollei wrote: > But If I understand Linus's points he wants jiffies to remain a memory > fetch, and make sure it doesn't turn into a singing dancing christmas > tree. It seems it relatively easy to support dynamic tick, the ARM architecture has it. But

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Stephen Pollei
On 7/14/05, Eric St-Laurent <[EMAIL PROTECTED]> wrote: > On Thu, 2005-07-14 at 17:24 -0700, Linus Torvalds wrote: > > Trust me. When I say that the right thing to do is to just have a fixed > > (but high) HZ value, and just changing the timer rate, I'm -right-. > Of course you are, jiffies are

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 07:57:01PM +0200, Andi Kleen wrote: > > I wouldn't say it is totally impossible. There are ways in which Linux can > > work > > without a reliable Local APIC timer. One option being - make one CPU that > > gets > > the external timer interrupt multicast an IPI to all the

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 06:54:30PM +0100, Maciej W. Rozycki wrote: > On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: > > > I wouldn't say it is totally impossible. There are ways in which Linux can > > work > > without a reliable Local APIC timer. One option being - make one CPU that > > gets

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
> That's like scratching your left ear with your right hand -- broadcasting > that external timer interrupt in the first place is more straightforward. > If you want to exclude CPUs from the list of receivers, just use the > logical destination mode appropriately. The problem with that is

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
> I wouldn't say it is totally impossible. There are ways in which Linux can > work > without a reliable Local APIC timer. One option being - make one CPU that > gets > the external timer interrupt multicast an IPI to all the other CPUs that > wants to get periodic timer interrupt. That

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: > I wouldn't say it is totally impossible. There are ways in which Linux can > work > without a reliable Local APIC timer. One option being - make one CPU that > gets > the external timer interrupt multicast an IPI to all the other CPUs that >

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 07:02:24PM +0200, Andi Kleen wrote: > > At least on multi processor systems LAPIC has to work anyways (otherwise > you cannot schedule other CPUs), so it is fine to use there. > > AFAIK there are no x86 CPUs right now that do both C3 > and SMP. If they ever do then they

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread kernel
Quoting Lee Revell <[EMAIL PROTECTED]>: > On Thu, 2005-07-14 at 22:54 -0600, Zwane Mwaikambo wrote: > > On Fri, 15 Jul 2005, Lee Revell wrote: > > > > > On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: > > > > Audio did show slightly larger max latencies but nothing that would be > of > >

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
"Brown, Len" <[EMAIL PROTECTED]> writes: > >That's an APIC bug. > >When Intel originally released the APIC (some > >thirteen years ago) they stated it should be used as a source of the > timer > >interrupt instead of the 8254. There is no excuse for changing the > >behaviour after so many years.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Lee Revell
On Thu, 2005-07-14 at 22:54 -0600, Zwane Mwaikambo wrote: > On Fri, 15 Jul 2005, Lee Revell wrote: > > > On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: > > > Audio did show slightly larger max latencies but nothing that would be of > > > significance. > > > > > > On video, maximum

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Chris Wedgwood
On Fri, Jul 15, 2005 at 12:33:15PM -0400, Brown, Len wrote: > So, the 13-year-old design advice will continue to apply to > 13-year-old systems, but newer systems with C3 and HPET > should be using them. Last I looked HPET isn't everywhere yet (absent from nforce4 mainboards for example, but

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Fernando Lopez-Lezcano
On Fri, 2005-07-15 at 05:46, Bill Davidsen wrote: > Fernando Lopez-Lezcano wrote: > >On Thu, 2005-07-14 at 16:49, Linus Torvalds wrote: > >>On Thu, 14 Jul 2005, Lee Revell wrote: > >>>And I'm incredibly frustrated by this insistence on hard data when it's > >>>completely obvious to anyone who

RE: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Brown, Len
>That's an APIC bug. >When Intel originally released the APIC (some >thirteen years ago) they stated it should be used as a source of the timer >interrupt instead of the 8254. There is no excuse for changing the >behaviour after so many years. So if you are on a broken system, you may >want to

Re: [OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Lee Revell
On Fri, 2005-07-15 at 08:57 -0700, Christoph Lameter wrote: > Try HPET which is pretty standard these days. > Really? None of my machines have it. I suspect lots of "embeddable" systems don't either. Lee - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Christoph Lameter
On Fri, 15 Jul 2005, Paul Jakma wrote: > On Thu, 14 Jul 2005, Christoph Lameter wrote: > > > Linux can already provide a response time within < 3 usecs from user space > > using f.e. the Altix RTC driver which can generate an interrupt that then > > sends a signal to an application. The Altix

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Jesper Juhl
On 7/15/05, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > On Fri, 15 Jul 2005, Jesper Juhl wrote: > > > > It's buggy, that I know. setting kernel_hz (the new boot parameter) to > > 250 causes my system clock to run at something like 4-5 times normal > > speed > > 4 times normal. You don't

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Bill Davidsen
Fernando Lopez-Lezcano wrote: On Thu, 2005-07-14 at 16:49, Linus Torvalds wrote: On Thu, 14 Jul 2005, Lee Revell wrote: And I'm incredibly frustrated by this insistence on hard data when it's completely obvious to anyone who knows the first thing about MIDI that HZ=250 will fail in

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Alan Cox
On Gwe, 2005-07-15 at 00:19, Linus Torvalds wrote: > That's not what "jiffies" are about. If you want accurate time, use > something else, like gettimeofday. The timeouts are _only_ relevant on the > scale of a timer interrupt, since by definition that's what we're waiting > for. Ok makes sense -

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Bill Davidsen
Lee Revell wrote: On Thu, 2005-07-14 at 16:49 -0700, Linus Torvalds wrote: YOUR argument is "nobody else matters, only I do". MY argument is that this is a case of give and take. I wouldn't say that. I do agree with you that HZ=1000 for everyone is problematic, I just feel that a

[OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Paul Jakma
On Thu, 14 Jul 2005, Christoph Lameter wrote: Linux can already provide a response time within < 3 usecs from user space using f.e. the Altix RTC driver which can generate an interrupt that then sends a signal to an application. The Altix RTC clock is supported via POSIX timer syscalls and

RE: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Maciej W. Rozycki
On Thu, 14 Jul 2005, Brown, Len wrote: > >Of course using APIC internal timers is generally the best idea on SMP, > >but they may have had reasons to avoid them (it's not an ISA interrupt, > so > >it could have been simply out of question in the initial design). > > Best? No. > > Local APIC

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Matthias Urlichs
Hi, Bill Davidsen wrote: > Do you actually have something against tickless, or just don't think it > can be done in reasonable time? You can do it in small steps. When you have that jiffies_increment variable, you can add code to dynamically adjust it at runtime -- just reprogram the system

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Russell King
On Thu, Jul 14, 2005 at 05:24:39PM -0700, Linus Torvalds wrote: > HOWEVER. I bet that somebody who really really cares (hint hint) could > easily make HZ be 1000, and then dynamically tweak the divisor at bootup > to be either 1000, 250, or 100, and then increment "jiffies" by 1, 4 or > 10.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Russell King
On Thu, Jul 14, 2005 at 05:42:15PM -0700, Linus Torvalds wrote: > So this is why I so strongly argue that we should have a constant HZ, but > a dynamic _increment_ of "jiffies". Nobody (obviously) depends on jiffies > being constant, so it's ok to increment jiffies by pretty much any value. I

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Gerd Knorr
Linus Torvalds <[EMAIL PROTECTED]> writes: > Now, if somebody wants to make nicer helper functions so that you can say > > timeout = ms_from_now(500); We already have something very simliar: timeout = jiffies + msecs_to_jiffies(500); ;) Gerd -- panic("it works"); /* avoid

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Gerd Knorr
Linus Torvalds [EMAIL PROTECTED] writes: Now, if somebody wants to make nicer helper functions so that you can say timeout = ms_from_now(500); We already have something very simliar: timeout = jiffies + msecs_to_jiffies(500); ;) Gerd -- panic(it works); /* avoid being

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Russell King
On Thu, Jul 14, 2005 at 05:42:15PM -0700, Linus Torvalds wrote: So this is why I so strongly argue that we should have a constant HZ, but a dynamic _increment_ of jiffies. Nobody (obviously) depends on jiffies being constant, so it's ok to increment jiffies by pretty much any value. I agree.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Russell King
On Thu, Jul 14, 2005 at 05:24:39PM -0700, Linus Torvalds wrote: HOWEVER. I bet that somebody who really really cares (hint hint) could easily make HZ be 1000, and then dynamically tweak the divisor at bootup to be either 1000, 250, or 100, and then increment jiffies by 1, 4 or 10. Wouldn't

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Matthias Urlichs
Hi, Bill Davidsen wrote: Do you actually have something against tickless, or just don't think it can be done in reasonable time? You can do it in small steps. When you have that jiffies_increment variable, you can add code to dynamically adjust it at runtime -- just reprogram the system

RE: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Maciej W. Rozycki
On Thu, 14 Jul 2005, Brown, Len wrote: Of course using APIC internal timers is generally the best idea on SMP, but they may have had reasons to avoid them (it's not an ISA interrupt, so it could have been simply out of question in the initial design). Best? No. Local APIC timers are

[OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Paul Jakma
On Thu, 14 Jul 2005, Christoph Lameter wrote: Linux can already provide a response time within 3 usecs from user space using f.e. the Altix RTC driver which can generate an interrupt that then sends a signal to an application. The Altix RTC clock is supported via POSIX timer syscalls and can

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Bill Davidsen
Lee Revell wrote: On Thu, 2005-07-14 at 16:49 -0700, Linus Torvalds wrote: YOUR argument is nobody else matters, only I do. MY argument is that this is a case of give and take. I wouldn't say that. I do agree with you that HZ=1000 for everyone is problematic, I just feel that a

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Alan Cox
On Gwe, 2005-07-15 at 00:19, Linus Torvalds wrote: That's not what jiffies are about. If you want accurate time, use something else, like gettimeofday. The timeouts are _only_ relevant on the scale of a timer interrupt, since by definition that's what we're waiting for. Ok makes sense - thats

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Bill Davidsen
Fernando Lopez-Lezcano wrote: On Thu, 2005-07-14 at 16:49, Linus Torvalds wrote: On Thu, 14 Jul 2005, Lee Revell wrote: And I'm incredibly frustrated by this insistence on hard data when it's completely obvious to anyone who knows the first thing about MIDI that HZ=250 will fail in

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Jesper Juhl
On 7/15/05, Linus Torvalds [EMAIL PROTECTED] wrote: On Fri, 15 Jul 2005, Jesper Juhl wrote: It's buggy, that I know. setting kernel_hz (the new boot parameter) to 250 causes my system clock to run at something like 4-5 times normal speed 4 times normal. You don't actually make the

Re: [OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Christoph Lameter
On Fri, 15 Jul 2005, Paul Jakma wrote: On Thu, 14 Jul 2005, Christoph Lameter wrote: Linux can already provide a response time within 3 usecs from user space using f.e. the Altix RTC driver which can generate an interrupt that then sends a signal to an application. The Altix RTC clock

Re: [OT] high precision hardware (was Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt)

2005-07-15 Thread Lee Revell
On Fri, 2005-07-15 at 08:57 -0700, Christoph Lameter wrote: Try HPET which is pretty standard these days. Really? None of my machines have it. I suspect lots of embeddable systems don't either. Lee - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a

RE: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Brown, Len
That's an APIC bug. When Intel originally released the APIC (some thirteen years ago) they stated it should be used as a source of the timer interrupt instead of the 8254. There is no excuse for changing the behaviour after so many years. So if you are on a broken system, you may want to work

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Fernando Lopez-Lezcano
On Fri, 2005-07-15 at 05:46, Bill Davidsen wrote: Fernando Lopez-Lezcano wrote: On Thu, 2005-07-14 at 16:49, Linus Torvalds wrote: On Thu, 14 Jul 2005, Lee Revell wrote: And I'm incredibly frustrated by this insistence on hard data when it's completely obvious to anyone who knows the first

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Chris Wedgwood
On Fri, Jul 15, 2005 at 12:33:15PM -0400, Brown, Len wrote: So, the 13-year-old design advice will continue to apply to 13-year-old systems, but newer systems with C3 and HPET should be using them. Last I looked HPET isn't everywhere yet (absent from nforce4 mainboards for example, but that

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Lee Revell
On Thu, 2005-07-14 at 22:54 -0600, Zwane Mwaikambo wrote: On Fri, 15 Jul 2005, Lee Revell wrote: On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: Audio did show slightly larger max latencies but nothing that would be of significance. On video, maximum latencies are only

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
Brown, Len [EMAIL PROTECTED] writes: That's an APIC bug. When Intel originally released the APIC (some thirteen years ago) they stated it should be used as a source of the timer interrupt instead of the 8254. There is no excuse for changing the behaviour after so many years. So if you are

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread kernel
Quoting Lee Revell [EMAIL PROTECTED]: On Thu, 2005-07-14 at 22:54 -0600, Zwane Mwaikambo wrote: On Fri, 15 Jul 2005, Lee Revell wrote: On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: Audio did show slightly larger max latencies but nothing that would be of significance.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 07:02:24PM +0200, Andi Kleen wrote: At least on multi processor systems LAPIC has to work anyways (otherwise you cannot schedule other CPUs), so it is fine to use there. AFAIK there are no x86 CPUs right now that do both C3 and SMP. If they ever do then they will

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Maciej W. Rozycki
On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: I wouldn't say it is totally impossible. There are ways in which Linux can work without a reliable Local APIC timer. One option being - make one CPU that gets the external timer interrupt multicast an IPI to all the other CPUs that wants to

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
I wouldn't say it is totally impossible. There are ways in which Linux can work without a reliable Local APIC timer. One option being - make one CPU that gets the external timer interrupt multicast an IPI to all the other CPUs that wants to get periodic timer interrupt. That doesn't mix

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Andi Kleen
That's like scratching your left ear with your right hand -- broadcasting that external timer interrupt in the first place is more straightforward. If you want to exclude CPUs from the list of receivers, just use the logical destination mode appropriately. The problem with that is that

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 06:54:30PM +0100, Maciej W. Rozycki wrote: On Fri, 15 Jul 2005, Venkatesh Pallipadi wrote: I wouldn't say it is totally impossible. There are ways in which Linux can work without a reliable Local APIC timer. One option being - make one CPU that gets the

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Venkatesh Pallipadi
On Fri, Jul 15, 2005 at 07:57:01PM +0200, Andi Kleen wrote: I wouldn't say it is totally impossible. There are ways in which Linux can work without a reliable Local APIC timer. One option being - make one CPU that gets the external timer interrupt multicast an IPI to all the other

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Stephen Pollei
On 7/14/05, Eric St-Laurent [EMAIL PROTECTED] wrote: On Thu, 2005-07-14 at 17:24 -0700, Linus Torvalds wrote: Trust me. When I say that the right thing to do is to just have a fixed (but high) HZ value, and just changing the timer rate, I'm -right-. Of course you are, jiffies are simple and

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-15 Thread Eric St-Laurent
On Fri, 2005-07-15 at 12:58 -0700, Stephen Pollei wrote: But If I understand Linus's points he wants jiffies to remain a memory fetch, and make sure it doesn't turn into a singing dancing christmas tree. It seems it relatively easy to support dynamic tick, the ARM architecture has it. But with

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Linus Torvalds
On Fri, 15 Jul 2005, Jesper Juhl wrote: > > It's buggy, that I know. setting kernel_hz (the new boot parameter) to > 250 causes my system clock to run at something like 4-5 times normal > speed 4 times normal. You don't actually make the timer interrupt happen at 250Hz, so the timer will be

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Zwane Mwaikambo
On Fri, 15 Jul 2005, Lee Revell wrote: > On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: > > Audio did show slightly larger max latencies but nothing that would be of > > significance. > > > > On video, maximum latencies are only slightly larger at HZ 250, all the > > desired cpu was

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Lee Revell
On Fri, 2005-07-15 at 14:08 +1000, Con Kolivas wrote: > Audio did show slightly larger max latencies but nothing that would be of > significance. > > On video, maximum latencies are only slightly larger at HZ 250, all the > desired cpu was achieved, but the average latency and number of missed

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Con Kolivas
On Fri, 15 Jul 2005 09:25, Linus Torvalds wrote: > On Thu, 14 Jul 2005, Lee Revell wrote: > > On Thu, 2005-07-14 at 09:37 -0700, Linus Torvalds wrote: > > > I have to say, this whole thread has been pretty damn worthless in > > > general in my not-so-humble opinion. > > > > This thread has really

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Jesper Juhl
Linus Torvalds wrote: On Thu, 14 Jul 2005, Lee Revell wrote: I don't think this will fly because we take a big performance hit by calculating HZ at runtime. I think it might be an acceptable solution for a distribution that really needed it, since it should be fairly simple. However, it's

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Fernando Lopez-Lezcano
On Thu, 2005-07-14 at 16:49, Linus Torvalds wrote: > On Thu, 14 Jul 2005, Lee Revell wrote: > > > > And I'm incredibly frustrated by this insistence on hard data when it's > > completely obvious to anyone who knows the first thing about MIDI that > > HZ=250 will fail in situations where HZ=1000

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Bill Davidsen
Linus Torvalds wrote: On Thu, 14 Jul 2005, Lee Revell wrote: I don't think this will fly because we take a big performance hit by calculating HZ at runtime. I think it might be an acceptable solution for a distribution that really needed it, since it should be fairly simple.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Eric St-Laurent
On Thu, 2005-07-14 at 17:24 -0700, Linus Torvalds wrote: > > On Thu, 14 Jul 2005, Lee Revell wrote: > > Trust me. When I say that the right thing to do is to just have a fixed > (but high) HZ value, and just changing the timer rate, I'm -right-. > > I'm always right. This time I'm just even

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Jesper Juhl
On 7/15/05, Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > On Thu, 14 Jul 2005, Lee Revell wrote: > > > > I don't think this will fly because we take a big performance hit by > > calculating HZ at runtime. > > I think it might be an acceptable solution for a distribution that really > needed

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Eric St-Laurent
On Thu, 2005-07-14 at 23:37 +0100, Alan Cox wrote: > In actual fact you also want to fix users of > > while(time_before(foo, jiffies)) { whack(mole); } > > to become > > init_timeout(); > timeout.expires = jiffies + n > add_timeout(); > while(!timeout_expired())

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Bill Davidsen
David Lang wrote: On Wed, 13 Jul 2005, Bill Davidsen wrote: How serious is the 1/HZ = sane problem, and more to the point how many programs get the HZ value with a system call as opposed to including a header or building it in? I know some of my older programs use header files, that was

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Linus Torvalds
On Fri, 15 Jul 2005, Jesper Juhl wrote: > > Even if we only have to do it once at boot? The thought was to detect > what type of machine we are booting on, figure out what a good HZ > would be for that type of box, then set that HZ value and treat it as > a constant from that point forward.

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Linus Torvalds
On Thu, 14 Jul 2005, Lee Revell wrote: > > I don't think this will fly because we take a big performance hit by > calculating HZ at runtime. I think it might be an acceptable solution for a distribution that really needed it, since it should be fairly simple. However, it's definitely not the

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Jesper Juhl
On 7/15/05, Lee Revell <[EMAIL PROTECTED]> wrote: > On Fri, 2005-07-15 at 02:04 +0200, Jesper Juhl wrote: > > While reading this thread it occoured to me that perhaps what we > > really want (besides sub HZ timers) might be for the kernel to > > auto-tune HZ? > > > > Would it make sense to

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Lee Revell
On Fri, 2005-07-15 at 02:04 +0200, Jesper Juhl wrote: > While reading this thread it occoured to me that perhaps what we > really want (besides sub HZ timers) might be for the kernel to > auto-tune HZ? > > Would it make sense to introduce a new config option (say > CONFIG_HZ_AUTO) that when

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Jesper Juhl
On 7/13/05, Chris Wedgwood <[EMAIL PROTECTED]> wrote: > On Wed, Jul 13, 2005 at 01:48:57PM -0700, Andrew Morton wrote: > > > Len Brown, a year ago: "The bottom line number to laptop users is > > battery lifetime. Just today somebody complained to me that Windows > > gets twice the battery life

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Lee Revell
On Thu, 2005-07-14 at 16:49 -0700, Linus Torvalds wrote: > > On Thu, 14 Jul 2005, Lee Revell wrote: > > > > And I'm incredibly frustrated by this insistence on hard data when it's > > completely obvious to anyone who knows the first thing about MIDI that > > HZ=250 will fail in situations where

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Lee Revell
On Thu, 2005-07-14 at 16:49 -0700, Linus Torvalds wrote: > YOUR argument is "nobody else matters, only I do". > > MY argument is that this is a case of give and take. I wouldn't say that. I do agree with you that HZ=1000 for everyone is problematic, I just feel that a reasonable compromise is

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Linus Torvalds
On Thu, 14 Jul 2005, Lee Revell wrote: > > And I'm incredibly frustrated by this insistence on hard data when it's > completely obvious to anyone who knows the first thing about MIDI that > HZ=250 will fail in situations where HZ=1000 succeeds. Ok, guys. How many people have this MIDI thing?

Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

2005-07-14 Thread Lee Revell
On Thu, 2005-07-14 at 16:25 -0700, Linus Torvalds wrote: > On Thu, 14 Jul 2005, Lee Revell wrote: > > This thread has really gone OT, but to revisit the original issue for a > > bit, are you still unwilling to consider leaving the default HZ at 1000 > > for 2.6.13? > > Yes. I see absolutely no

  1   2   3   4   5   >