Skip to contentSkip to conversation

Option to disable AMD C1E (allows dynticks to work)

PATCH Eduard-Gabriel Munteanu 4 participants 5 messages Dec 29, 2007 – Dec 30, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · On Fri, 28 Dec 2007 13:57:57 -0500 Richard Harman <[email protected]>…

I just saw this thread online from someone else who was having problems with an HP laptop -- I believe my laptop falls into this category.

Quoted 8 lines

The laptop is currently running Fedora Core 8, but I couldn't figure out what kernel that diff was against. I'm not experienced with git. Can you give me a few pointers on how to get that patch applied to a kernel tarball? I'll be more than willing to be your test subject to see how well this patch and whatever future revision of it may work.

Richard

Hi,

I'll assume you didn't read the thread careful enough, so I have to emphasize the fact that this patch won't improve power savings (even more, it may actually consume an additional 1-2 Watts). Try it only if you need dynticks for another purpose than just saving power (in which case, you should wait until a better solution comes up, namely LAPIC-less dynticks).

IIRC, the diff was made against 2.6.24-rc4, but it applies okay on the latest -rc (2.6.24-rc6 as of now) as far as I can see. Copy starting with the line below "---" all the way to the end and save it to a file (make sure tabs don't get messed up), then apply with "patch -p1" as you would apply any other patch. Run "make xconfig" (or whatever interface to Kconfig you use), make sure "Processor type and features -> Disable C1E on AMD systems to make dynticks work" is set, along with all other relevant options, then build and the kernel as usual.

#2 lore raw
Quoted 16 lines · Eduard-Gabriel Munteanu
Quoted 4 lines · On Fri, 28 Dec 2007 13:57:57 -0500 Richard Harman <[email protected]>…

I just saw this thread online from someone else who was having problems with an HP laptop -- I believe my laptop falls into this category.

Quoted 8 lines

The laptop is currently running Fedora Core 8, but I couldn't figure out what kernel that diff was against. I'm not experienced with git. Can you give me a few pointers on how to get that patch applied to a kernel tarball? I'll be more than willing to be your test subject to see how well this patch and whatever future revision of it may work.

Richard

Quoted 8 lines

Hi,

I'll assume you didn't read the thread careful enough, so I have to emphasize the fact that this patch won't improve power savings (even more, it may actually consume an additional 1-2 Watts). Try it only if you need dynticks for another purpose than just saving power (in which case, you should wait until a better solution comes up, namely LAPIC-less dynticks).

Oh, at the moment I couldn't care less about power savings, I'm more interested in simply getting the kernel properly -booting- on this hardware.

Right now, with your patch and the 'noirqdebug' option or disabling nohz the system appears to be stable. This laptop otherwise locks up trying to configure apic/lapic, or locks up solid later with NO oops/bug and nothing will bring it out of it (eg, sysrq has no effect). NMI watchdog was also inoperable, which I believe was due to the apic/lapic being disabled.

With your patch, the lapic is used:

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)

These kernel dmesg logs are hand-transcribed, and are from 2.6.22.5, but this shows where the kernel would lock up good and solid:

http://www.richardharman.com/pavilion/2.6.22.5/dmesg.txt

Quoted 9 lines

IIRC, the diff was made against 2.6.24-rc4, but it applies okay on the latest -rc (2.6.24-rc6 as of now) as far as I can see. Copy starting with the line below "---" all the way to the end and save it to a file (make sure tabs don't get messed up), then apply with "patch -p1" as you would apply any other patch. Run "make xconfig" (or whatever interface to Kconfig you use), make sure "Processor type and features -> Disable C1E on AMD systems to make dynticks work" is set, along with all other relevant options, then build and the kernel as usual.

Yeah, I actually found a how-to on how to pull down Linus's git tree, and managed to patch -p1 against that. Kudos to the folks who set up faqs on using git.

Anyway, I'm extremely open to getting to the bottom of working around the quirks on this hardware. If I havn't mentioned it previously, this laptop is an HP dv6408nr, with an amd turion tl-56 cpu and nVidia MCP51 chipset.

What can I do to help? It has been pulling teeth trying to get to the bottom of this.

#3 lore raw
Quoted 11 lines · On Sat, 29 Dec 2007 04:09:41 -0500 Richard Harman <[email protected]>…

Right now, with your patch and the 'noirqdebug' option or disabling nohz the system appears to be stable. This laptop otherwise locks up trying to configure apic/lapic, or locks up solid later with NO oops/bug and nothing will bring it out of it (eg, sysrq has no effect). NMI watchdog was also inoperable, which I believe was due to the apic/lapic being disabled.

With your patch, the lapic is used:

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)

The kernel should display these messages even without my patch.

Quoted 4 lines

These kernel dmesg logs are hand-transcribed, and are from 2.6.22.5, but this shows where the kernel would lock up good and solid:

http://www.richardharman.com/pavilion/2.6.22.5/dmesg.txt

I doubt it is my patch that makes your laptop work. C1E detection was added by the following commit:

$ git-describe fb79d22e1d4b06385796cc0db0084a2e07beccee
v2.6.23-2294-gfb79d22

Try building a 2.6.24-rc6 without my patch and see if it still works (apply it again in reverse mode, for example). I guess it will work, because the kernel shouldn't use the LAPIC as a timer at all (except as a dummy one), with or without dynticks support.

When I started investigating the "nohz is not working problem", I stumbled across a few threads on LKML where a few people had similar problems with their laptops and they where instructed to pass "nolapic" or something similar as a boot parameter to the kernel. I guess the problem disappeared after the commit I mentioned previously, since such reports weren't that recent. IIRC, that was on kernels previous to 2.6.24-*, where x86 and x86-64 weren't unified and there were no dynticks on the latter.

To be more clear, my patch disables C1E instead of disabling the LAPIC, as these two don't agree with each other.

#4 lore raw
In reply to Richard Harman

Hello.
I was interested in getting dynticks to work on my compaq presario v6000 to help with the 1 hour thirty minutes battery time, but after this discussion I lost interest.

I too had the early boot time hang, and found it was udev triggering the bug.

Changing the /etc/init.d/udev script so that the line containing

/sbin/udevtrigger

to

/sbin/udevtrigger --subsystem-nomatch="*misc*"

seemed to fix things.

the hang is triggered specifically by

echo add > /sys/class/misc/rtc/uevent

after inserting rtc.ko

Also using hwclock to set the rtc , will cause a hard hang, if you are using 64bit linux. Disable the init scripts that set the time, or use the 32bit binary, as suggested here :

http://www.mail-archive.com/[email protected]/msg41964.html

I hope this helps. But your hardware is slightly different though.

Quoted 73 lines · Richard Harman
Quoted 16 lines · Eduard-Gabriel Munteanu
Quoted 4 lines · On Fri, 28 Dec 2007 13:57:57 -0500 Richard Harman <[email protected]>…

I just saw this thread online from someone else who was having problems with an HP laptop -- I believe my laptop falls into this category.

Quoted 8 lines

The laptop is currently running Fedora Core 8, but I couldn't figure out what kernel that diff was against. I'm not experienced with git. Can you give me a few pointers on how to get that patch applied to a kernel tarball? I'll be more than willing to be your test subject to see how well this patch and whatever future revision of it may work.

Richard

Quoted 8 lines

Hi,

I'll assume you didn't read the thread careful enough, so I have to emphasize the fact that this patch won't improve power savings (even more, it may actually consume an additional 1-2 Watts). Try it only if you need dynticks for another purpose than just saving power (in which case, you should wait until a better solution comes up, namely LAPIC-less dynticks).

Oh, at the moment I couldn't care less about power savings, I'm more interested in simply getting the kernel properly -booting- on this hardware.

Right now, with your patch and the 'noirqdebug' option or disabling nohz the system appears to be stable. This laptop otherwise locks up trying to configure apic/lapic, or locks up solid later with NO oops/bug and nothing will bring it out of it (eg, sysrq has no effect). NMI watchdog was also inoperable, which I believe was due to the apic/lapic being disabled.

With your patch, the lapic is used:

ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)

These kernel dmesg logs are hand-transcribed, and are from 2.6.22.5, but this shows where the kernel would lock up good and solid:

http://www.richardharman.com/pavilion/2.6.22.5/dmesg.txt

Quoted 9 lines

IIRC, the diff was made against 2.6.24-rc4, but it applies okay on the latest -rc (2.6.24-rc6 as of now) as far as I can see. Copy starting with the line below "---" all the way to the end and save it to a file (make sure tabs don't get messed up), then apply with "patch -p1" as you would apply any other patch. Run "make xconfig" (or whatever interface to Kconfig you use), make sure "Processor type and features -> Disable C1E on AMD systems to make dynticks work" is set, along with all other relevant options, then build and the kernel as usual.

Yeah, I actually found a how-to on how to pull down Linus's git tree, and managed to patch -p1 against that. Kudos to the folks who set up faqs on using git.

Anyway, I'm extremely open to getting to the bottom of working around the quirks on this hardware. If I havn't mentioned it previously, this laptop is an HP dv6408nr, with an amd turion tl-56 cpu and nVidia MCP51 chipset.

What can I do to help? It has been pulling teeth trying to get to the bottom of this.
--
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/

#5 lore raw
In reply to Richard Harman
Quoted 3 lines · Richard Harman

Anyway, I'm extremely open to getting to the bottom of working around the quirks on this hardware. If I havn't mentioned it previously, this laptop is an HP dv6408nr, with an amd turion tl-56 cpu and nVidia MCP51 chipset.

What can I do to help? It has been pulling teeth trying to get to the bottom of this.

This thread-branch appears to be broken on lkml.org so I couldn't look back through it but was this what you tried?

http://lkml.org/lkml/2007/12/29/65

Updated patch with Islam's values added at:

http://lkml.org/lkml/2007/12/29/141

You'd plug in your values similarly and test...

Rene.