2007-01-16 11:58:11

by Ingo Molnar

[permalink] [raw]
Subject: Re: Two 2.6.20-rc5-rt2 issues


* Rui Nuno Capela <[email protected]> wrote:

> First one is about building for UP (CONFIG_SMP not set) on my old P4
> laptop. As it seems, all my build attempts failed at the final link
> stage, with undefined references to paravirt_enable. After disabling
> CONFIG_PARAVIRT I get a similar failure, but this time for a couple
> kvm* symbols. [...]

ok, i think i have managed to fix both bugs. I have released -rt3,
please re-check whether it works any better. If it still doesnt then
please send me the exact .config that fails.

> [...] I could only get a clean build when CONFIG_SMP is set, which is
> (IMHO) overkill for a machine which is neither HyperThread/SMT enabled
> nor multi-core. Its plain dead UP and it used to run PREEMPT_RT
> kernels for a long time now.

btw., latest SMP kernels (2.6.18 and later) "patch themselves back" to
UP instructions to a high degree if they run on a single CPU - that's
why for example Fedora uses only an SMP kernel these days. Running a
genuine UP kernel is still more efficient - but the difference shouldnt
be /that/ large anymore. (if someone would like to measure it that would
be interesting to see)

> Second one is already about running SMP, on a Dual Core2 T7200, for
> which the build goes fine but run-time is haunted by a crippling BUG:

> Call Trace:
> [<c0102dad>] __switch_to+0xcc/0x176
> [<c01185c8>] wake_up_process+0x19/0x1b
> [<c01fe568>] acpi_ec_gpe_handler+0x1f/0x53
> [<c01ec6c6>] acpi_ev_gpe_dispatch+0x64/0x163
> [<c01eca06>] acpi_ev_gpe_detect+0x94/0xd7

hm, this is a -rt specific thing that i hoped to have worked around but
apparently not. The ACPI code uses a waitqueue in its idle routine
(argh!) which cannot by done sanely on PREEMPT_RT. In -rt3 i've added a
more conservative (but still ugly and incorrect) hack - could you try
it, does -rt3 work any better?

Ingo


2007-01-17 00:53:56

by Rui Nuno Capela

[permalink] [raw]
Subject: Re: Two 2.6.20-rc5-rt2 issues

On Tue, January 16, 2007 11:56, Ingo Molnar wrote:
>

> * Rui Nuno Capela <[email protected]> wrote:
>
>> First one is about building for UP (CONFIG_SMP not set) on my old P4
>> laptop. As it seems, all my build attempts failed at the final link
>> stage, with undefined references to paravirt_enable. After disabling
>> CONFIG_PARAVIRT I get a similar failure, but this time for a couple
>> kvm* symbols. [...]
>
> ok, i think i have managed to fix both bugs. I have released -rt3,
> please re-check whether it works any better. If it still doesnt then
> please send me the exact .config that fails.
>

Building this already with -rt5, still gives:
...
LD arch/i386/boot/compressed/vmlinux
OBJCOPY arch/i386/boot/vmlinux.bin
BUILD arch/i386/boot/bzImage
Root device is (3, 2)
Boot sector 512 bytes.
Setup is 7407 bytes.
System is 1427 kB
Kernel: arch/i386/boot/bzImage is ready (#1)
WARNING: "profile_hits" [drivers/kvm/kvm-intel.ko] undefined!
WARNING: "profile_hits" [drivers/kvm/kvm-amd.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
...

.config as .gz is attached.


>
>> Second one is already about running SMP, on a Dual Core2 T7200, for
>> which the build goes fine but run-time is haunted by a crippling BUG:
>
>> Call Trace:
>> [<c0102dad>] __switch_to+0xcc/0x176
>> [<c01185c8>] wake_up_process+0x19/0x1b
>> [<c01fe568>] acpi_ec_gpe_handler+0x1f/0x53
>> [<c01ec6c6>] acpi_ev_gpe_dispatch+0x64/0x163
>> [<c01eca06>] acpi_ev_gpe_detect+0x94/0xd7
>>
>
> hm, this is a -rt specific thing that i hoped to have worked around but
> apparently not. The ACPI code uses a waitqueue in its idle routine
> (argh!) which cannot by done sanely on PREEMPT_RT. In -rt3 i've added
> a more conservative (but still ugly and incorrect) hack - could you try
> it, does -rt3 work any better?
>

Yes it does. No BUG has been spotted on -rt3, yet.

Cheers.
--
rncbc aka Rui Nuno Capela
[email protected]


Attachments:
config.gz (19.82 kB)

2007-01-17 06:33:21

by Ingo Molnar

[permalink] [raw]
Subject: Re: Two 2.6.20-rc5-rt2 issues


* Rui Nuno Capela <[email protected]> wrote:

> Building this already with -rt5, still gives:
> ...
> LD arch/i386/boot/compressed/vmlinux
> OBJCOPY arch/i386/boot/vmlinux.bin
> BUILD arch/i386/boot/bzImage
> Root device is (3, 2)
> Boot sector 512 bytes.
> Setup is 7407 bytes.
> System is 1427 kB
> Kernel: arch/i386/boot/bzImage is ready (#1)
> WARNING: "profile_hits" [drivers/kvm/kvm-intel.ko] undefined!
> WARNING: "profile_hits" [drivers/kvm/kvm-amd.ko] undefined!

ok - in my test-config i didnt have KVM modular - the patch below should
fix this problem.

Ingo

Index: linux/kernel/profile.c
===================================================================
--- linux.orig/kernel/profile.c
+++ linux/kernel/profile.c
@@ -332,7 +332,6 @@ out:
local_irq_restore(flags);
put_cpu();
}
-EXPORT_SYMBOL_GPL(profile_hits);

static int __devinit profile_cpu_callback(struct notifier_block *info,
unsigned long action, void *__cpu)
@@ -402,6 +401,8 @@ void profile_hits(int type, void *__pc,
}
#endif /* !CONFIG_SMP */

+EXPORT_SYMBOL_GPL(profile_hits);
+
void __profile_tick(int type, struct pt_regs *regs)
{
if (type == CPU_PROFILING && timer_hook)

2007-01-17 08:59:06

by Rui Nuno Capela

[permalink] [raw]
Subject: Re: Two 2.6.20-rc5-rt2 issues


On Wed, January 17, 2007 06:31, Ingo Molnar wrote:
>
> * Rui Nuno Capela <[email protected]> wrote:
>
>> Building this already with -rt5, still gives:
>> ...
>> LD arch/i386/boot/compressed/vmlinux
>> OBJCOPY arch/i386/boot/vmlinux.bin
>> BUILD arch/i386/boot/bzImage
>> Root device is (3, 2)
>> Boot sector 512 bytes.
>> Setup is 7407 bytes.
>> System is 1427 kB
>> Kernel: arch/i386/boot/bzImage is ready (#1)
>> WARNING: "profile_hits" [drivers/kvm/kvm-intel.ko] undefined!
>> WARNING: "profile_hits" [drivers/kvm/kvm-amd.ko] undefined!
>>
>
> ok - in my test-config i didnt have KVM modular - the patch below should
> fix this problem.
>
> Ingo
>
>
> Index: linux/kernel/profile.c
> ===================================================================
> --- linux.orig/kernel/profile.c
> +++ linux/kernel/profile.c
> @@ -332,7 +332,6 @@ out:
> local_irq_restore(flags); put_cpu(); }
> -EXPORT_SYMBOL_GPL(profile_hits);
>
>
> static int __devinit profile_cpu_callback(struct notifier_block *info,
> unsigned long action, void *__cpu) @@ -402,6 +401,8 @@ void
> profile_hits(int type, void *__pc, }
> #endif /* !CONFIG_SMP */
>
>
> +EXPORT_SYMBOL_GPL(profile_hits);
> +
> void __profile_tick(int type, struct pt_regs *regs) {
> if (type == CPU_PROFILING && timer_hook)
>

OK, now it builds alright.

Both issues seem to be fixed now, thanks.

Bye.
--
rncbc aka Rui Nuno Capela
[email protected]