Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 14:04 +0100, Stefan Prechtel wrote:
> I uploaded the output of dmesg (kernel 2.6.21-rc4-git5) (battery / ac)
> and dmidecode
> I can boot on battery with nolapic_timer and the second core is online, too.
> /proc/acpi/processor/C000/ shows the same as before but
> /proc/interrupts has changed:
> 
> (battery)
>CPU0   CPU1
>   0:  47131  0  local-APIC-edge-fasteoi   timer
> LOC:  0  46978
> 
> (ac)
>CPU0   CPU1
>   0:  59137  0  local-APIC-edge-fasteoi   timer
> LOC:  0  58984

That's correct. We keep the PIT alive and trigger the lapic timer
interrupt via an IPI.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Stefan Prechtel

2007/3/21, Andi Kleen <[EMAIL PROTECTED]>:

On Wednesday 21 March 2007 12:14, Thomas Gleixner wrote:
> On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
> > > The BIOS/ACPI is broken and does only expose C1, which should not
> > > switch off LAPIC. The BIOS is switching into deeper C-States behind the
> > > kernels back somehow.
> >
> > Hmm, perhaps we can check AMD && (cstate >= 2 || has a battery) ?
> > Should be doable by looking up the battery object in ACPI
>
> Which makes us rely on another ACPI feature. What guarantees that the
> ACPI tables are correct for this one ?

Nothing, but wrong C2 and wrong battery state together seems unlikely.

-Andi



Hello

I uploaded the output of dmesg (kernel 2.6.21-rc4-git5) (battery / ac)
and dmidecode
I can boot on battery with nolapic_timer and the second core is online, too.
/proc/acpi/processor/C000/ shows the same as before but
/proc/interrupts has changed:

(battery)
  CPU0   CPU1
 0:  47131  0  local-APIC-edge-fasteoi   timer
LOC:  0  46978

(ac)
  CPU0   CPU1
 0:  59137  0  local-APIC-edge-fasteoi   timer
LOC:  0  58984


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen
On Wednesday 21 March 2007 12:14, Thomas Gleixner wrote:
> On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
> > > The BIOS/ACPI is broken and does only expose C1, which should not
> > > switch off LAPIC. The BIOS is switching into deeper C-States behind the
> > > kernels back somehow.
> >
> > Hmm, perhaps we can check AMD && (cstate >= 2 || has a battery) ?
> > Should be doable by looking up the battery object in ACPI
>
> Which makes us rely on another ACPI feature. What guarantees that the
> ACPI tables are correct for this one ?

Nothing, but wrong C2 and wrong battery state together seems unlikely.

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 13:15 +0100, Thomas Gleixner wrote:
> + return;
> + }}
> +

Ooops, sorry. Did not quilt refresh before sending it out. Correct
version below.

tglx

diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 5cff797..83cf98d 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -61,6 +61,8 @@ static int enable_local_apic __initdata = 0;
 
 /* Local APIC timer verification ok */
 static int local_apic_timer_verify_ok;
+/* Disable local APIC timer from the kernel commandline */
+static int local_apic_timer_disabled;
 
 /*
  * Debug level, exported for io_apic.c
@@ -340,6 +342,13 @@ void __init setup_boot_APIC_clock(void)
long delta, deltapm;
int pm_referenced = 0;
 
+   if (local_apic_timer_disabled) {
+   /* No broadcast on UP ! */
+   if (num_possible_cpus() > 1)
+   setup_APIC_timer();
+   return;
+   }
+
apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
"calibrating APIC timer ...\n");
 
@@ -1179,6 +1188,13 @@ static int __init parse_nolapic(char *arg)
 }
 early_param("nolapic", parse_nolapic);
 
+static int __init parse_disable_lapic_timer(char *arg)
+{
+   local_apic_timer_disabled = 1;
+   return 0;
+}
+early_param("nolapic_timer", parse_disable_lapic_timer);
+
 static int __init apic_set_verbosity(char *str)
 {
if (strcmp("debug", str) == 0)


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
Stefan, Grzegorz

On Wed, 2007-03-21 at 12:14 +0100, Thomas Gleixner wrote:
> On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
> > > The BIOS/ACPI is broken and does only expose C1, which should not switch
> > > off LAPIC. The BIOS is switching into deeper C-States behind the kernels
> > > back somehow.
> > 
> > Hmm, perhaps we can check AMD && (cstate >= 2 || has a battery) ? 
> > Should be doable by looking up the battery object in ACPI
> 
> Which makes us rely on another ACPI feature. What guarantees that the
> ACPI tables are correct for this one ?

Can you please apply the patch below and add "nolapic_timer" to the
kernel command line ?

Please provide also the output of

# dmidecode

on your laptops.

Thanks,

tglx

diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 5cff797..67f8d9f 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -61,6 +61,8 @@ static int enable_local_apic __initdata = 0;
 
 /* Local APIC timer verification ok */
 static int local_apic_timer_verify_ok;
+/* Disable local APIC timer from the kernel commandline */
+static int local_apic_timer_disabled;
 
 /*
  * Debug level, exported for io_apic.c
@@ -340,6 +342,13 @@ void __init setup_boot_APIC_clock(void)
long delta, deltapm;
int pm_referenced = 0;
 
+   if (local_apic_timer_disabled) {
+   /* No broadcast on UP ! */
+   if (num_possible_cpus() > 1)
+   setup_APIC_timer();
+   return;
+   }}
+
apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n"
"calibrating APIC timer ...\n");
 
@@ -1179,6 +1188,13 @@ static int __init parse_nolapic(char *arg)
 }
 early_param("nolapic", parse_nolapic);
 
+static int __init parse_disable_lapic_timer(char *arg)
+{
+   local_apic_timer_disabled = 1;
+   return 0;
+}
+early_param("nolapic_timer", parse_disable_lapic_timer);
+
 static int __init apic_set_verbosity(char *str)
 {
if (strcmp("debug", str) == 0)


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
> > The BIOS/ACPI is broken and does only expose C1, which should not switch
> > off LAPIC. The BIOS is switching into deeper C-States behind the kernels
> > back somehow.
> 
> Hmm, perhaps we can check AMD && (cstate >= 2 || has a battery) ? 
> Should be doable by looking up the battery object in ACPI

Which makes us rely on another ACPI feature. What guarantees that the
ACPI tables are correct for this one ?

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen

> The BIOS/ACPI is broken and does only expose C1, which should not switch
> off LAPIC. The BIOS is switching into deeper C-States behind the kernels
> back somehow.

Hmm, perhaps we can check AMD && (cstate >= 2 || has a battery) ? 
Should be doable by looking up the battery object in ACPI

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 10:46 +0100, Andi Kleen wrote:
> On Wednesday 21 March 2007 10:24, Thomas Gleixner wrote:
> > On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
> > > I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
> > > nothing special in dmesg. Just in case I'm posting my
> > > dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
> > > http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
> > >
> > > Below I post output of my /proc interrupts (10 sec. delay between reads).
> > >
> > > Other interesting thing on 2.6-git is that when I press a key on keyboard
> > > it doesn't repeat (on battery), but it repeats on 2.6-git on ac.
> >
> > Sigh. The periodic PIT interrupt pampers over the problem in <2.6.21-rc.
> > It prevents the BIOS to switch the CPU in lower power states.
> 
> I think I ran into the same problem with my initial noidletick patch.
> I don't have that test machine anymore though.
> 
> Normally the "use PIT when AMD && Cstate >= 2" check should
> have caught that though. Why did it here?

The BIOS/ACPI is broken and does only expose C1, which should not switch
off LAPIC. The BIOS is switching into deeper C-States behind the kernels
back somehow.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen
On Wednesday 21 March 2007 10:24, Thomas Gleixner wrote:
> On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
> > I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
> > nothing special in dmesg. Just in case I'm posting my
> > dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
> > http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
> >
> > Below I post output of my /proc interrupts (10 sec. delay between reads).
> >
> > Other interesting thing on 2.6-git is that when I press a key on keyboard
> > it doesn't repeat (on battery), but it repeats on 2.6-git on ac.
>
> Sigh. The periodic PIT interrupt pampers over the problem in <2.6.21-rc.
> It prevents the BIOS to switch the CPU in lower power states.

I think I ran into the same problem with my initial noidletick patch.
I don't have that test machine anymore though.

Normally the "use PIT when AMD && Cstate >= 2" check should
have caught that though. Why did it here?

-Andi

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
> I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
> nothing special in dmesg. Just in case I'm posting my
> dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
> http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
> 
> Below I post output of my /proc interrupts (10 sec. delay between reads).
>
> Other interesting thing on 2.6-git is that when I press a key on keyboard it
> doesn't repeat (on battery), but it repeats on 2.6-git on ac.

Sigh. The periodic PIT interrupt pampers over the problem in <2.6.21-rc.
It prevents the BIOS to switch the CPU in lower power states.

I'm working on a detect LAPIC / BIOS madness check.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
 I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
 nothing special in dmesg. Just in case I'm posting my
 dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
 http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
 
 Below I post output of my /proc interrupts (10 sec. delay between reads).

 Other interesting thing on 2.6-git is that when I press a key on keyboard it
 doesn't repeat (on battery), but it repeats on 2.6-git on ac.

Sigh. The periodic PIT interrupt pampers over the problem in 2.6.21-rc.
It prevents the BIOS to switch the CPU in lower power states.

I'm working on a detect LAPIC / BIOS madness check.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen
On Wednesday 21 March 2007 10:24, Thomas Gleixner wrote:
 On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
  I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
  nothing special in dmesg. Just in case I'm posting my
  dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
  http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
 
  Below I post output of my /proc interrupts (10 sec. delay between reads).
 
  Other interesting thing on 2.6-git is that when I press a key on keyboard
  it doesn't repeat (on battery), but it repeats on 2.6-git on ac.

 Sigh. The periodic PIT interrupt pampers over the problem in 2.6.21-rc.
 It prevents the BIOS to switch the CPU in lower power states.

I think I ran into the same problem with my initial noidletick patch.
I don't have that test machine anymore though.

Normally the use PIT when AMD  Cstate = 2 check should
have caught that though. Why did it here?

-Andi

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 10:46 +0100, Andi Kleen wrote:
 On Wednesday 21 March 2007 10:24, Thomas Gleixner wrote:
  On Tue, 2007-03-20 at 17:47 +0100, Grzegorz Chwesewicz wrote:
   I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
   nothing special in dmesg. Just in case I'm posting my
   dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
   http://bugzilla.kernel.org/show_bug.cgi?id=8235 .
  
   Below I post output of my /proc interrupts (10 sec. delay between reads).
  
   Other interesting thing on 2.6-git is that when I press a key on keyboard
   it doesn't repeat (on battery), but it repeats on 2.6-git on ac.
 
  Sigh. The periodic PIT interrupt pampers over the problem in 2.6.21-rc.
  It prevents the BIOS to switch the CPU in lower power states.
 
 I think I ran into the same problem with my initial noidletick patch.
 I don't have that test machine anymore though.
 
 Normally the use PIT when AMD  Cstate = 2 check should
 have caught that though. Why did it here?

The BIOS/ACPI is broken and does only expose C1, which should not switch
off LAPIC. The BIOS is switching into deeper C-States behind the kernels
back somehow.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen

 The BIOS/ACPI is broken and does only expose C1, which should not switch
 off LAPIC. The BIOS is switching into deeper C-States behind the kernels
 back somehow.

Hmm, perhaps we can check AMD  (cstate = 2 || has a battery) ? 
Should be doable by looking up the battery object in ACPI

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
  The BIOS/ACPI is broken and does only expose C1, which should not switch
  off LAPIC. The BIOS is switching into deeper C-States behind the kernels
  back somehow.
 
 Hmm, perhaps we can check AMD  (cstate = 2 || has a battery) ? 
 Should be doable by looking up the battery object in ACPI

Which makes us rely on another ACPI feature. What guarantees that the
ACPI tables are correct for this one ?

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
Stefan, Grzegorz

On Wed, 2007-03-21 at 12:14 +0100, Thomas Gleixner wrote:
 On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
   The BIOS/ACPI is broken and does only expose C1, which should not switch
   off LAPIC. The BIOS is switching into deeper C-States behind the kernels
   back somehow.
  
  Hmm, perhaps we can check AMD  (cstate = 2 || has a battery) ? 
  Should be doable by looking up the battery object in ACPI
 
 Which makes us rely on another ACPI feature. What guarantees that the
 ACPI tables are correct for this one ?

Can you please apply the patch below and add nolapic_timer to the
kernel command line ?

Please provide also the output of

# dmidecode

on your laptops.

Thanks,

tglx

diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 5cff797..67f8d9f 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -61,6 +61,8 @@ static int enable_local_apic __initdata = 0;
 
 /* Local APIC timer verification ok */
 static int local_apic_timer_verify_ok;
+/* Disable local APIC timer from the kernel commandline */
+static int local_apic_timer_disabled;
 
 /*
  * Debug level, exported for io_apic.c
@@ -340,6 +342,13 @@ void __init setup_boot_APIC_clock(void)
long delta, deltapm;
int pm_referenced = 0;
 
+   if (local_apic_timer_disabled) {
+   /* No broadcast on UP ! */
+   if (num_possible_cpus()  1)
+   setup_APIC_timer();
+   return;
+   }}
+
apic_printk(APIC_VERBOSE, Using local APIC timer interrupts.\n
calibrating APIC timer ...\n);
 
@@ -1179,6 +1188,13 @@ static int __init parse_nolapic(char *arg)
 }
 early_param(nolapic, parse_nolapic);
 
+static int __init parse_disable_lapic_timer(char *arg)
+{
+   local_apic_timer_disabled = 1;
+   return 0;
+}
+early_param(nolapic_timer, parse_disable_lapic_timer);
+
 static int __init apic_set_verbosity(char *str)
 {
if (strcmp(debug, str) == 0)


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 13:15 +0100, Thomas Gleixner wrote:
 + return;
 + }}
 +

Ooops, sorry. Did not quilt refresh before sending it out. Correct
version below.

tglx

diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 5cff797..83cf98d 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -61,6 +61,8 @@ static int enable_local_apic __initdata = 0;
 
 /* Local APIC timer verification ok */
 static int local_apic_timer_verify_ok;
+/* Disable local APIC timer from the kernel commandline */
+static int local_apic_timer_disabled;
 
 /*
  * Debug level, exported for io_apic.c
@@ -340,6 +342,13 @@ void __init setup_boot_APIC_clock(void)
long delta, deltapm;
int pm_referenced = 0;
 
+   if (local_apic_timer_disabled) {
+   /* No broadcast on UP ! */
+   if (num_possible_cpus()  1)
+   setup_APIC_timer();
+   return;
+   }
+
apic_printk(APIC_VERBOSE, Using local APIC timer interrupts.\n
calibrating APIC timer ...\n);
 
@@ -1179,6 +1188,13 @@ static int __init parse_nolapic(char *arg)
 }
 early_param(nolapic, parse_nolapic);
 
+static int __init parse_disable_lapic_timer(char *arg)
+{
+   local_apic_timer_disabled = 1;
+   return 0;
+}
+early_param(nolapic_timer, parse_disable_lapic_timer);
+
 static int __init apic_set_verbosity(char *str)
 {
if (strcmp(debug, str) == 0)


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Andi Kleen
On Wednesday 21 March 2007 12:14, Thomas Gleixner wrote:
 On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
   The BIOS/ACPI is broken and does only expose C1, which should not
   switch off LAPIC. The BIOS is switching into deeper C-States behind the
   kernels back somehow.
 
  Hmm, perhaps we can check AMD  (cstate = 2 || has a battery) ?
  Should be doable by looking up the battery object in ACPI

 Which makes us rely on another ACPI feature. What guarantees that the
 ACPI tables are correct for this one ?

Nothing, but wrong C2 and wrong battery state together seems unlikely.

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Stefan Prechtel

2007/3/21, Andi Kleen [EMAIL PROTECTED]:

On Wednesday 21 March 2007 12:14, Thomas Gleixner wrote:
 On Wed, 2007-03-21 at 11:37 +0100, Andi Kleen wrote:
   The BIOS/ACPI is broken and does only expose C1, which should not
   switch off LAPIC. The BIOS is switching into deeper C-States behind the
   kernels back somehow.
 
  Hmm, perhaps we can check AMD  (cstate = 2 || has a battery) ?
  Should be doable by looking up the battery object in ACPI

 Which makes us rely on another ACPI feature. What guarantees that the
 ACPI tables are correct for this one ?

Nothing, but wrong C2 and wrong battery state together seems unlikely.

-Andi



Hello

I uploaded the output of dmesg (kernel 2.6.21-rc4-git5) (battery / ac)
and dmidecode
I can boot on battery with nolapic_timer and the second core is online, too.
/proc/acpi/processor/C000/ shows the same as before but
/proc/interrupts has changed:

(battery)
  CPU0   CPU1
 0:  47131  0  local-APIC-edge-fasteoi   timer
LOC:  0  46978

(ac)
  CPU0   CPU1
 0:  59137  0  local-APIC-edge-fasteoi   timer
LOC:  0  58984


- Stefan Prechtel
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-21 Thread Thomas Gleixner
On Wed, 2007-03-21 at 14:04 +0100, Stefan Prechtel wrote:
 I uploaded the output of dmesg (kernel 2.6.21-rc4-git5) (battery / ac)
 and dmidecode
 I can boot on battery with nolapic_timer and the second core is online, too.
 /proc/acpi/processor/C000/ shows the same as before but
 /proc/interrupts has changed:
 
 (battery)
CPU0   CPU1
   0:  47131  0  local-APIC-edge-fasteoi   timer
 LOC:  0  46978
 
 (ac)
CPU0   CPU1
   0:  59137  0  local-APIC-edge-fasteoi   timer
 LOC:  0  58984

That's correct. We keep the PIT alive and trigger the lapic timer
interrupt via an IPI.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-20 Thread Grzegorz Chwesewicz
I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
nothing special in dmesg. Just in case I'm posting my
dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
http://bugzilla.kernel.org/show_bug.cgi?id=8235 .

Below I post output of my /proc interrupts (10 sec. delay between reads).

#

2.6.20_ac:

   CPU0   CPU1
  0:  73190  0  local-APIC-edge-fasteio   timer
LOC:  72967  72966

   CPU0   CPU1
  0:  83196  0  local-APIC-edge-fasteio   timer

LOC:  82974  82973

#

2.6.20_battery:

   CPU0   CPU1
  0: 468590  0  local-APIC-edge-fasteio   timer
LOC: 468410 468409

   CPU0   CPU1
  0: 478596  0  local-APIC-edge-fasteio   timer
LOC: 478417 478416

#

2.6-git_ac:

   CPU0   CPU1
  0:262  0  local-APIC-edge-fasteoi   timer
LOC:  66041  66041

   CPU0   CPU1
  0:262  0  local-APIC-edge-fasteoi   timer
LOC:  76067  76067

#

2.6-git_battery:

   CPU0   CPU1
  0:261  0  local-APIC-edge-fasteoi   timer
LOC:  29007  29015

   CPU0   CPU1
  0:261  0  local-APIC-edge-fasteoi   timer
LOC:  29189  29200

#

Other interesting thing on 2.6-git is that when I press a key on keyboard it
doesn't repeat (on battery), but it repeats on 2.6-git on ac.

--
Greetings - Grzegorz Chwesewicz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-20 Thread Stefan Prechtel

2007/3/20, Thomas Gleixner <[EMAIL PROTECTED]>:

On Mon, 2007-03-19 at 22:51 +0100, Stefan Prechtel wrote:
> 2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:
> > On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
> > >CPU0   CPU1
> > >  0:  28289  0  local-APIC-edge-fasteio   timer
> > > ...
> > > LOC:  28237  28236
> > >
> > > after a read: (I hope that is this what you want :-)
> > >CPU0   CPU1
> > >   0:  30344  0  local-APIC-edge-fasteio   timer
> > > ...
> > > LOC:  30292  30291
> >
> > Is this with AC plugged in ? If yes, please provide the same numbers for
> > battery mode.
>
> Yes. And here is the output for battery mode (2.6.20):
>CPU0   CPU1
>   0: 292153  0  local-APIC-edge-fasteio   timer
> LOC: 292114 292113
>
>CPU0   CPU1
>   0: 293263  0  local-APIC-edge-fasteio   timer
> LOC: 293224 293223

Hmm. Can you please apply the following patch on top of 2.6.20 and
check, if the WARN_ON_ONCE triggers when you boot w/o AC plugged ?

Thanks,

tglx


Good morning!

The WARN_ON / WARN_ON_ONCE didn't trigger on boot.

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-20 Thread Stefan Prechtel

2007/3/20, Thomas Gleixner [EMAIL PROTECTED]:

On Mon, 2007-03-19 at 22:51 +0100, Stefan Prechtel wrote:
 2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:
  On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
  CPU0   CPU1
0:  28289  0  local-APIC-edge-fasteio   timer
   ...
   LOC:  28237  28236
  
   after a read: (I hope that is this what you want :-)
  CPU0   CPU1
 0:  30344  0  local-APIC-edge-fasteio   timer
   ...
   LOC:  30292  30291
 
  Is this with AC plugged in ? If yes, please provide the same numbers for
  battery mode.

 Yes. And here is the output for battery mode (2.6.20):
CPU0   CPU1
   0: 292153  0  local-APIC-edge-fasteio   timer
 LOC: 292114 292113

CPU0   CPU1
   0: 293263  0  local-APIC-edge-fasteio   timer
 LOC: 293224 293223

Hmm. Can you please apply the following patch on top of 2.6.20 and
check, if the WARN_ON_ONCE triggers when you boot w/o AC plugged ?

Thanks,

tglx


Good morning!

The WARN_ON / WARN_ON_ONCE didn't trigger on boot.

- Stefan Prechtel
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-20 Thread Grzegorz Chwesewicz
I have HP nx6325. I've tried to use WARN_ON_ONCE patch, but I don't see
nothing special in dmesg. Just in case I'm posting my
dmesg_2.6.20_WARN_ON_ONCE_on_battery log on
http://bugzilla.kernel.org/show_bug.cgi?id=8235 .

Below I post output of my /proc interrupts (10 sec. delay between reads).

#

2.6.20_ac:

   CPU0   CPU1
  0:  73190  0  local-APIC-edge-fasteio   timer
LOC:  72967  72966

   CPU0   CPU1
  0:  83196  0  local-APIC-edge-fasteio   timer

LOC:  82974  82973

#

2.6.20_battery:

   CPU0   CPU1
  0: 468590  0  local-APIC-edge-fasteio   timer
LOC: 468410 468409

   CPU0   CPU1
  0: 478596  0  local-APIC-edge-fasteio   timer
LOC: 478417 478416

#

2.6-git_ac:

   CPU0   CPU1
  0:262  0  local-APIC-edge-fasteoi   timer
LOC:  66041  66041

   CPU0   CPU1
  0:262  0  local-APIC-edge-fasteoi   timer
LOC:  76067  76067

#

2.6-git_battery:

   CPU0   CPU1
  0:261  0  local-APIC-edge-fasteoi   timer
LOC:  29007  29015

   CPU0   CPU1
  0:261  0  local-APIC-edge-fasteoi   timer
LOC:  29189  29200

#

Other interesting thing on 2.6-git is that when I press a key on keyboard it
doesn't repeat (on battery), but it repeats on 2.6-git on ac.

--
Greetings - Grzegorz Chwesewicz
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 22:51 +0100, Stefan Prechtel wrote:
> 2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:
> > On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
> > >CPU0   CPU1
> > >  0:  28289  0  local-APIC-edge-fasteio   timer
> > > ...
> > > LOC:  28237  28236
> > >
> > > after a read: (I hope that is this what you want :-)
> > >CPU0   CPU1
> > >   0:  30344  0  local-APIC-edge-fasteio   timer
> > > ...
> > > LOC:  30292  30291
> >
> > Is this with AC plugged in ? If yes, please provide the same numbers for
> > battery mode.
> 
> Yes. And here is the output for battery mode (2.6.20):
>CPU0   CPU1
>   0: 292153  0  local-APIC-edge-fasteio   timer
> LOC: 292114 292113
> 
>CPU0   CPU1
>   0: 293263  0  local-APIC-edge-fasteio   timer
> LOC: 293224 293223

Hmm. Can you please apply the following patch on top of 2.6.20 and
check, if the WARN_ON_ONCE triggers when you boot w/o AC plugged ?

Thanks,

tglx

Index: linux-2.6.20/arch/i386/kernel/apic.c
===
--- linux-2.6.20.orig/arch/i386/kernel/apic.c
+++ linux-2.6.20/arch/i386/kernel/apic.c
@@ -1174,6 +1174,8 @@ void switch_APIC_timer_to_ipi(void *cpum
cpumask_t mask = *(cpumask_t *)cpumask;
int cpu = smp_processor_id();
 
+   WARN_ON_ONCE(1);
+
if (cpu_isset(cpu, mask) &&
!cpu_isset(cpu, timer_bcast_ipi)) {
disable_APIC_timer();


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:

On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
>CPU0   CPU1
>  0:  28289  0  local-APIC-edge-fasteio   timer
> ...
> LOC:  28237  28236
>
> after a read: (I hope that is this what you want :-)
>CPU0   CPU1
>   0:  30344  0  local-APIC-edge-fasteio   timer
> ...
> LOC:  30292  30291

Is this with AC plugged in ? If yes, please provide the same numbers for
battery mode.


Yes. And here is the output for battery mode (2.6.20):
  CPU0   CPU1
 0: 292153  0  local-APIC-edge-fasteio   timer
LOC: 292114 292113

  CPU0   CPU1
 0: 293263  0  local-APIC-edge-fasteio   timer
LOC: 293224 293223




What's the output of
cat /proc/acpi/processor/C000/power

for 2.6.20 and 2.6.21-rc4-latest-git with and w/o AC ?


2.6.20 / 2.6.21: (both the same)
battery / ac (both the same)
# cat /proc/acpi/processor/C000/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--] latency[000] usage[
] duration[]
# cat /proc/acpi/processor/C001/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--] latency[000] usage[
] duration[]




Can you also please upload a bootlog with and without AC of 2.6.20 to
bugzilla ?

Yes, one moment please. I will upload files..


Thanks,

tglx


Thanks too ;)
- Stefan Prechtel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
>CPU0   CPU1
>  0:  28289  0  local-APIC-edge-fasteio   timer
> ...
> LOC:  28237  28236
> 
> after a read: (I hope that is this what you want :-)
>CPU0   CPU1
>   0:  30344  0  local-APIC-edge-fasteio   timer
> ...
> LOC:  30292  30291

Is this with AC plugged in ? If yes, please provide the same numbers for
battery mode.

What's the output of 
cat /proc/acpi/processor/C000/power

for 2.6.20 and 2.6.21-rc4-latest-git with and w/o AC ?

Can you also please upload a bootlog with and without AC of 2.6.20 to
bugzilla ?

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:

> Here is the output of /proc/interrupts on 2.6.20:
>CPU0   CPU1
>   0:   7089  0  local-APIC-edge-fasteio   timer
> 

Can you provide the numbers for LOC too ?
  0:   29801420   29793520IO-APIC-edge  timer
...
LOC:  119180305  119180039

And please do a sleep 10; between two reads, so I can see the deltas.


Ah sorry. I forgot it..
  CPU0   CPU1
0:  28289  0  local-APIC-edge-fasteio   timer
...
LOC:  28237  28236

after a read: (I hope that is this what you want :-)
  CPU0   CPU1
 0:  30344  0  local-APIC-edge-fasteio   timer
...
LOC:  30292  30291


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 20:49 +0100, Stefan Prechtel wrote:
> > Can you please boot with 2.6.20 or earlier and check the output
> > of /proc/interrupts ?
> >
> > IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
> > same frequency.
> >
> > tglx
> 
> Here is the output of /proc/interrupts on 2.6.20:
>CPU0   CPU1
>   0:   7089  0  local-APIC-edge-fasteio   timer
> 

Can you provide the numbers for LOC too ?
  0:   29801420   29793520IO-APIC-edge  timer
...
LOC:  119180305  119180039

And please do a sleep 10; between two reads, so I can see the deltas.

> and this on 2.6.21-rc*:
>CPU0   CPU1
>   0:255  0  local-APIC-edge-fasteoi   timer
> 
> 
> on 2.6.21-rc* the number "255" doesn't change.

Yes. I know. We rely on the local APIC, if the ACPI code does us not
tell to use the PIT broadcast, sigh.

> But if it is ACPI relevant, shouldn't it boot with acpi=off?
> I've tried with acpi=off and noapic but only with nolapic it started.
> 
> And the content of /proc/acpi/processor/C000/power shows only one
> c-state; shouldn't it show more C-states? (please correct me if I'm
> wrong)
> 
>  # cat /proc/acpi/processor/C000/power
> active state:C1
> max_cstate:  C8
> bus master activity: 
> maximum allowed latency: 2000 usec
> states:
>*C1:  type[C1] promotion[--] demotion[--]
> latency[000] usage[] duration[]

Yup. It should.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:

We have a broadcast mechanism for this, which gets activated from ACPI,
but the broadcast mechanism is not activated:

[3.798000] Clock Event Device: pit

[3.798000] tick_broadcast_mask: 

Can you please boot with 2.6.20 or earlier and check the output
of /proc/interrupts ?

IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
same frequency.

tglx


Here is the output of /proc/interrupts on 2.6.20:
  CPU0   CPU1
 0:   7089  0  local-APIC-edge-fasteio   timer

and this on 2.6.21-rc*:
  CPU0   CPU1
 0:255  0  local-APIC-edge-fasteoi   timer


on 2.6.21-rc* the number "255" doesn't change.

But if it is ACPI relevant, shouldn't it boot with acpi=off?
I've tried with acpi=off and noapic but only with nolapic it started.

And the content of /proc/acpi/processor/C000/power shows only one
c-state; shouldn't it show more C-states? (please correct me if I'm
wrong)

# cat /proc/acpi/processor/C000/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--]
latency[000] usage[] duration[]


Regards,
Stefan Prechtel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
Stefan,

On Mon, 2007-03-19 at 19:53 +0100, Stefan Prechtel wrote:
> You can find the files here:
> http://bugzilla.kernel.org/show_bug.cgi?id=8235

thanks for providing the data. Your ACPI tables don't provide
information about the power states (C-States), but your BIOS seems to
switch the CPUs into deeper power states, when it runs on battery. In
those deeper power states the local APIC timers and the TSC are stopped.
So the machine waits for ever on the next timer interrupt.

We have a broadcast mechanism for this, which gets activated from ACPI,
but the broadcast mechanism is not activated:

[3.798000] Clock Event Device: pit

[3.798000] tick_broadcast_mask: 

Can you please boot with 2.6.20 or earlier and check the output
of /proc/interrupts ?

IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
same frequency.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

(Bugzilla)
Does booting w/ clocksource=acpi_pm avoid the problem?

No, it doesn't.
I hope it's ok that I added your email to CC.


2007/3/19, Stefan Prechtel <[EMAIL PROTECTED]>:

Hi!

If the ac-cable is plugged in, I can start my Notebook (HP nx6325)
without any problems.
On battery the kernel hanging around and it takes "hours" to boot the
kernel and the system is *very* slow. For example an init-skript takes
very long until it's started.

I did a git-bisect and found out that this is the first bad commit:
commit e9e2cdb412412326c4827fc78ba27f410d837e6e
Author: Thomas Gleixner <[EMAIL PROTECTED]>
Date:   Fri Feb 16 01:28:04 2007 -0800

[PATCH] clockevents: i386 drivers

Add clockevent drivers for i386: lapic (local) and PIT/HPET
(global).  Update
the timer IRQ to call into the PIT/HPET driver's event handler and the
lapic-timer IRQ to call into the lapic clockevent driver.  The
assignement of
timer functionality is delegated to the core framework code and replaces the
compile and runtime evalution in do_timer_interrupt_hook()

Use the clockevents broadcast support and implement the lapic_broadcast
function for ACPI.

No changes to existing functionality.

So I tried to boot with nolapic on battery and with this option the
kernel (and system) starts as it should.
If you need more information, I will send it to you.

Regards,
Stefan Prechtel


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

You can find the files here:
http://bugzilla.kernel.org/show_bug.cgi?id=8235

Regards,
Stefan Prechtel


2007/3/19, Thomas Gleixner <[EMAIL PROTECTED]>:

On Mon, 2007-03-19 at 18:36 +0100, Thomas Gleixner wrote:
Oh, a bootlog with ac plugged in would be great too.

Also can you please enable CONFIG_SYSRQ and hit SysRq-Q once, when the
slowness kicks in.

Thanks,

tglx

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 18:36 +0100, Thomas Gleixner wrote:
> On Mon, 2007-03-19 at 18:10 +0100, Stefan Prechtel wrote:
> > So I tried to boot with nolapic on battery and with this option the
> > kernel (and system) starts as it should.
> > If you need more information, I will send it to you.
> 
> Can you please provide your .config and a bootlog from a boot with
> "nolapic" and without. Also please add apic=verbose to the commandline.
> 
> Can you please use Linus' latest git snaphost
> http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.21-rc4-git4.bz2
> 
> or pull from Linus' git repository.
> 
> You can please open a new bug (Category: Timers, Component: Other) on
> http://bugzilla.kernel.org and upload the files there, so we avoid
> distributing them via LKML.

Oh, a bootlog with ac plugged in would be great too. 

Also can you please enable CONFIG_SYSRQ and hit SysRq-Q once, when the
slowness kicks in.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 18:10 +0100, Stefan Prechtel wrote:
> So I tried to boot with nolapic on battery and with this option the
> kernel (and system) starts as it should.
> If you need more information, I will send it to you.

Can you please provide your .config and a bootlog from a boot with
"nolapic" and without. Also please add apic=verbose to the commandline.

Can you please use Linus' latest git snaphost
http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.21-rc4-git4.bz2

or pull from Linus' git repository.

You can please open a new bug (Category: Timers, Component: Other) on
http://bugzilla.kernel.org and upload the files there, so we avoid
distributing them via LKML.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 18:10 +0100, Stefan Prechtel wrote:
 So I tried to boot with nolapic on battery and with this option the
 kernel (and system) starts as it should.
 If you need more information, I will send it to you.

Can you please provide your .config and a bootlog from a boot with
nolapic and without. Also please add apic=verbose to the commandline.

Can you please use Linus' latest git snaphost
http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.21-rc4-git4.bz2

or pull from Linus' git repository.

You can please open a new bug (Category: Timers, Component: Other) on
http://bugzilla.kernel.org and upload the files there, so we avoid
distributing them via LKML.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 18:36 +0100, Thomas Gleixner wrote:
 On Mon, 2007-03-19 at 18:10 +0100, Stefan Prechtel wrote:
  So I tried to boot with nolapic on battery and with this option the
  kernel (and system) starts as it should.
  If you need more information, I will send it to you.
 
 Can you please provide your .config and a bootlog from a boot with
 nolapic and without. Also please add apic=verbose to the commandline.
 
 Can you please use Linus' latest git snaphost
 http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.21-rc4-git4.bz2
 
 or pull from Linus' git repository.
 
 You can please open a new bug (Category: Timers, Component: Other) on
 http://bugzilla.kernel.org and upload the files there, so we avoid
 distributing them via LKML.

Oh, a bootlog with ac plugged in would be great too. 

Also can you please enable CONFIG_SYSRQ and hit SysRq-Q once, when the
slowness kicks in.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

You can find the files here:
http://bugzilla.kernel.org/show_bug.cgi?id=8235

Regards,
Stefan Prechtel


2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:

On Mon, 2007-03-19 at 18:36 +0100, Thomas Gleixner wrote:
Oh, a bootlog with ac plugged in would be great too.

Also can you please enable CONFIG_SYSRQ and hit SysRq-Q once, when the
slowness kicks in.

Thanks,

tglx

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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

(Bugzilla)
Does booting w/ clocksource=acpi_pm avoid the problem?

No, it doesn't.
I hope it's ok that I added your email to CC.


2007/3/19, Stefan Prechtel [EMAIL PROTECTED]:

Hi!

If the ac-cable is plugged in, I can start my Notebook (HP nx6325)
without any problems.
On battery the kernel hanging around and it takes hours to boot the
kernel and the system is *very* slow. For example an init-skript takes
very long until it's started.

I did a git-bisect and found out that this is the first bad commit:
commit e9e2cdb412412326c4827fc78ba27f410d837e6e
Author: Thomas Gleixner [EMAIL PROTECTED]
Date:   Fri Feb 16 01:28:04 2007 -0800

[PATCH] clockevents: i386 drivers

Add clockevent drivers for i386: lapic (local) and PIT/HPET
(global).  Update
the timer IRQ to call into the PIT/HPET driver's event handler and the
lapic-timer IRQ to call into the lapic clockevent driver.  The
assignement of
timer functionality is delegated to the core framework code and replaces the
compile and runtime evalution in do_timer_interrupt_hook()

Use the clockevents broadcast support and implement the lapic_broadcast
function for ACPI.

No changes to existing functionality.

So I tried to boot with nolapic on battery and with this option the
kernel (and system) starts as it should.
If you need more information, I will send it to you.

Regards,
Stefan Prechtel


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
Stefan,

On Mon, 2007-03-19 at 19:53 +0100, Stefan Prechtel wrote:
 You can find the files here:
 http://bugzilla.kernel.org/show_bug.cgi?id=8235

thanks for providing the data. Your ACPI tables don't provide
information about the power states (C-States), but your BIOS seems to
switch the CPUs into deeper power states, when it runs on battery. In
those deeper power states the local APIC timers and the TSC are stopped.
So the machine waits for ever on the next timer interrupt.

We have a broadcast mechanism for this, which gets activated from ACPI,
but the broadcast mechanism is not activated:

[3.798000] Clock Event Device: pit

[3.798000] tick_broadcast_mask: 

Can you please boot with 2.6.20 or earlier and check the output
of /proc/interrupts ?

IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
same frequency.

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:

We have a broadcast mechanism for this, which gets activated from ACPI,
but the broadcast mechanism is not activated:

[3.798000] Clock Event Device: pit

[3.798000] tick_broadcast_mask: 

Can you please boot with 2.6.20 or earlier and check the output
of /proc/interrupts ?

IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
same frequency.

tglx


Here is the output of /proc/interrupts on 2.6.20:
  CPU0   CPU1
 0:   7089  0  local-APIC-edge-fasteio   timer

and this on 2.6.21-rc*:
  CPU0   CPU1
 0:255  0  local-APIC-edge-fasteoi   timer


on 2.6.21-rc* the number 255 doesn't change.

But if it is ACPI relevant, shouldn't it boot with acpi=off?
I've tried with acpi=off and noapic but only with nolapic it started.

And the content of /proc/acpi/processor/C000/power shows only one
c-state; shouldn't it show more C-states? (please correct me if I'm
wrong)

# cat /proc/acpi/processor/C000/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--]
latency[000] usage[] duration[]


Regards,
Stefan Prechtel
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 20:49 +0100, Stefan Prechtel wrote:
  Can you please boot with 2.6.20 or earlier and check the output
  of /proc/interrupts ?
 
  IRQ#0 and the LOC (local APIC timer) Interrupts should increment in the
  same frequency.
 
  tglx
 
 Here is the output of /proc/interrupts on 2.6.20:
CPU0   CPU1
   0:   7089  0  local-APIC-edge-fasteio   timer
 

Can you provide the numbers for LOC too ?
  0:   29801420   29793520IO-APIC-edge  timer
...
LOC:  119180305  119180039

And please do a sleep 10; between two reads, so I can see the deltas.

 and this on 2.6.21-rc*:
CPU0   CPU1
   0:255  0  local-APIC-edge-fasteoi   timer
 
 
 on 2.6.21-rc* the number 255 doesn't change.

Yes. I know. We rely on the local APIC, if the ACPI code does us not
tell to use the PIT broadcast, sigh.

 But if it is ACPI relevant, shouldn't it boot with acpi=off?
 I've tried with acpi=off and noapic but only with nolapic it started.
 
 And the content of /proc/acpi/processor/C000/power shows only one
 c-state; shouldn't it show more C-states? (please correct me if I'm
 wrong)
 
  # cat /proc/acpi/processor/C000/power
 active state:C1
 max_cstate:  C8
 bus master activity: 
 maximum allowed latency: 2000 usec
 states:
*C1:  type[C1] promotion[--] demotion[--]
 latency[000] usage[] duration[]

Yup. It should.

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:

 Here is the output of /proc/interrupts on 2.6.20:
CPU0   CPU1
   0:   7089  0  local-APIC-edge-fasteio   timer
 

Can you provide the numbers for LOC too ?
  0:   29801420   29793520IO-APIC-edge  timer
...
LOC:  119180305  119180039

And please do a sleep 10; between two reads, so I can see the deltas.


Ah sorry. I forgot it..
  CPU0   CPU1
0:  28289  0  local-APIC-edge-fasteio   timer
...
LOC:  28237  28236

after a read: (I hope that is this what you want :-)
  CPU0   CPU1
 0:  30344  0  local-APIC-edge-fasteio   timer
...
LOC:  30292  30291


- Stefan Prechtel
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
CPU0   CPU1
  0:  28289  0  local-APIC-edge-fasteio   timer
 ...
 LOC:  28237  28236
 
 after a read: (I hope that is this what you want :-)
CPU0   CPU1
   0:  30344  0  local-APIC-edge-fasteio   timer
 ...
 LOC:  30292  30291

Is this with AC plugged in ? If yes, please provide the same numbers for
battery mode.

What's the output of 
cat /proc/acpi/processor/C000/power

for 2.6.20 and 2.6.21-rc4-latest-git with and w/o AC ?

Can you also please upload a bootlog with and without AC of 2.6.20 to
bugzilla ?

Thanks,

tglx


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


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Stefan Prechtel

2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:

On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
CPU0   CPU1
  0:  28289  0  local-APIC-edge-fasteio   timer
 ...
 LOC:  28237  28236

 after a read: (I hope that is this what you want :-)
CPU0   CPU1
   0:  30344  0  local-APIC-edge-fasteio   timer
 ...
 LOC:  30292  30291

Is this with AC plugged in ? If yes, please provide the same numbers for
battery mode.


Yes. And here is the output for battery mode (2.6.20):
  CPU0   CPU1
 0: 292153  0  local-APIC-edge-fasteio   timer
LOC: 292114 292113

  CPU0   CPU1
 0: 293263  0  local-APIC-edge-fasteio   timer
LOC: 293224 293223




What's the output of
cat /proc/acpi/processor/C000/power

for 2.6.20 and 2.6.21-rc4-latest-git with and w/o AC ?


2.6.20 / 2.6.21: (both the same)
battery / ac (both the same)
# cat /proc/acpi/processor/C000/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--] latency[000] usage[
] duration[]
# cat /proc/acpi/processor/C001/power
active state:C1
max_cstate:  C8
bus master activity: 
maximum allowed latency: 2000 usec
states:
  *C1:  type[C1] promotion[--] demotion[--] latency[000] usage[
] duration[]




Can you also please upload a bootlog with and without AC of 2.6.20 to
bugzilla ?

Yes, one moment please. I will upload files..


Thanks,

tglx


Thanks too ;)
- Stefan Prechtel
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4})

2007-03-19 Thread Thomas Gleixner
On Mon, 2007-03-19 at 22:51 +0100, Stefan Prechtel wrote:
 2007/3/19, Thomas Gleixner [EMAIL PROTECTED]:
  On Mon, 2007-03-19 at 21:35 +0100, Stefan Prechtel wrote:
  CPU0   CPU1
0:  28289  0  local-APIC-edge-fasteio   timer
   ...
   LOC:  28237  28236
  
   after a read: (I hope that is this what you want :-)
  CPU0   CPU1
 0:  30344  0  local-APIC-edge-fasteio   timer
   ...
   LOC:  30292  30291
 
  Is this with AC plugged in ? If yes, please provide the same numbers for
  battery mode.
 
 Yes. And here is the output for battery mode (2.6.20):
CPU0   CPU1
   0: 292153  0  local-APIC-edge-fasteio   timer
 LOC: 292114 292113
 
CPU0   CPU1
   0: 293263  0  local-APIC-edge-fasteio   timer
 LOC: 293224 293223

Hmm. Can you please apply the following patch on top of 2.6.20 and
check, if the WARN_ON_ONCE triggers when you boot w/o AC plugged ?

Thanks,

tglx

Index: linux-2.6.20/arch/i386/kernel/apic.c
===
--- linux-2.6.20.orig/arch/i386/kernel/apic.c
+++ linux-2.6.20/arch/i386/kernel/apic.c
@@ -1174,6 +1174,8 @@ void switch_APIC_timer_to_ipi(void *cpum
cpumask_t mask = *(cpumask_t *)cpumask;
int cpu = smp_processor_id();
 
+   WARN_ON_ONCE(1);
+
if (cpu_isset(cpu, mask) 
!cpu_isset(cpu, timer_bcast_ipi)) {
disable_APIC_timer();


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