apci: dump slit
PATCH 1/1 apci: dump slit
--- drivers/acpi/numa.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/numa.c +8 -0
@@ -150,6 +150,14 @@ static __init int slit_valid(struct acpi {int i, j;int d = slit->locality_count; +printk (KERN_DEBUG "ACPI: SLIT: nodes = %d\n" , d); +for (i =0 ; i < d; i++) { +for (j =0 ; j < d; j++) { +u8 val = slit->entry[d*i + j]; +printk (" %d" , val); + } +printk ("\n" ); + }for (i =0 ; i < d; i++) {for (j =0 ; j < d; j++) {u8 val = slit->entry[d*i + j];
Quoted 15 lines · On Fri, 12 Sep 2008 11:17:48 -0700 Yinghai Lu <[email protected]> wrote:
Signed-off-by Yinghai Lu <[email protected]>--- drivers/acpi/numa.c | 8 ++++++++ 1 file changed, 8 insertions(+)Index:
linux-2.6/drivers/acpi/numa.c
===================================================================drivers/acpi/numa.c +1
-0@@ -150,6 +150,14 @@ static __init int slit_valid(struct acpi {int i, j;int d = slit->locality_count; +printk (KERN_DEBUG "ACPI: SLIT: nodes = %d\n" , d);
drivers/acpi/numa.c static __init int slit_valid(struct acpi · line 163
Quoted 10 lines
drivers/acpi/numa.c +7
-0+for (i =0 ; i < d; i++) { +for (j =0 ; j < d; j++) { +u8 val = slit->entry[d*i + j]; +printk (" %d" , val); + } +printk ("\n" ); + }for (i =0 ; i < d; i++) {for (j =0 ; j < d; j++) {u8 val = slit->entry[d*i + j];
why?
Quoted 22 lines · Andrew Morton
Quoted 19 lines · On Fri, 12 Sep 2008 11:17:48 -0700 Yinghai Lu <[email protected]> wrote:
Signed-off-by Yinghai Lu <[email protected]>--- drivers/acpi/numa.c | 8 ++++++++ 1 file changed, 8 insertions(+)Index:
linux-2.6/drivers/acpi/numa.c
===================================================================drivers/acpi/numa.c +5
-0@@ -150,6 +150,14 @@ static __init int slit_valid(struct acpi {int i, j;int d = slit->locality_count; +printk (KERN_DEBUG "ACPI: SLIT: nodes = %d\n" , d); +for (i =0 ; i < d; i++) { +for (j =0 ; j < d; j++) { +u8 val = slit->entry[d*i + j]; +printk (" %d" , val);
Quoted 8 lines
drivers/acpi/numa.c static __init int slit_valid(struct acpi · line 163
Quoted 6 lines
drivers/acpi/numa.c +3
-0+ } +printk ("\n" ); + }for (i =0 ; i < d; i++) {for (j =0 ; j < d; j++) {u8 val = slit->entry[d*i + j];why?
to see how wrong could be set by BIOS.
YH
Quoted 3 lines · Yinghai Lu
to see how wrong could be set by BIOS.
I'm starting to think that all this dumping of ACPI information needs to be put under a command-line option.
-hpa
Quoted 6 lines · H. Peter Anvin
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
I'm starting to think that all this dumping of ACPI information needs to be put under a command-line option.
The majority of ACPI information at boot is related to interrupt routing. While interrupt routing isn't that big a problem anymore it used to be and when something goes wrong with it you often have a non booting system. I think it's safer to dump it by default.
On the other hand there's quite some other information dumped at boot that could be cut out. e.g. It doesn't really make much sense to dump the cache information of each CPU at boot when that information can easily be gotten from user space later.
I personally was also always sceptical of some of the more detailed new memory map dumping, like those "nosave memory" or the early reservation/early node/add_active_range output. It's pretty much a direct function of the e820 map dumped earlier. Also node information has now the dubious distinction to be the most redundantly dumped kernel information of all.
-Andi
Quoted 5 lines · Andi Kleen
On the other hand there's quite some other information dumped at boot that could be cut out. e.g. It doesn't really make much sense to dump the cache information of each CPU at boot when that information can easily be gotten from user space later.
You're assuming that you ever reach user space, which is a pretty dumb assumption.
I prefer to have a detailed view of the machine when I have to look at a bug report where the machine does _NOT_ reach user space.
Quoted 6 lines
I personally was also always sceptical of some of the more detailed new memory map dumping, like those "nosave memory" or the early reservation/early node/add_active_range output. It's pretty much a direct function of the e820 map dumped earlier. Also node information has now the dubious distinction to be the most redundantly dumped kernel information of all.
Bla, bla, bla.
This code was reworked significantly and every information which is given about the various decisions made are useful to debug problems. I prefer a more noisy startup over some silent fuckup when a problem hits.
We had enough trouble to decode silent "fixups" which failed miserably.
Thanks,
tglx
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
-Andi
Signature · 1 line
[email protected]
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Nervertheless the changelog of the patch needs some useful information why we actually need this information.
Thanks,
tglx
Quoted 1 line
1.) what guarantees that we reach user space ?
Broken SLITs don't prevent booting.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Yes excellent point. Should we dump the complete ACPI tables? Do you prefer hexdump or do we need a ASL disassembler? Also complete SMBIOS? Also the legacy mptables of course too. And all the EFI methods. Ideally a disassembly of the complete BIOS. Did I miss anything?
-Andi
Quoted 8 lines · Andi Kleen
Quoted 1 line
1.) what guarantees that we reach user space ?
Broken SLITs don't prevent booting.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Quoted 6 lines
Yes excellent point. Should we dump the complete ACPI tables? Do you prefer hexdump or do we need a ASL disassembler? Also complete SMBIOS? Also the legacy mptables of course too. And all the EFI methods. Ideally a disassembly of the complete BIOS. Did I miss anything?
Harsh... but harsh.
Matt
Quoted 3 lines · Andi Kleen
Quoted 1 line
1.) what guarantees that we reach user space ?
Broken SLITs don't prevent booting.
Of course you can guarantee that.
Thanks,
tglx
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · Andi Kleen
Quoted 1 line
1.) what guarantees that we reach user space ?
Broken SLITs don't prevent booting.
Of course you can guarantee that.
Yes I'm pretty sure:
(a) the kernel does a sanity check on SLITs and replaces them with a fallback if they're bogus. Even that is not strictly needed for correctness, just for performance.
(b) SLIT information is only an optimization, but does not really break anything if it's wrong. In the worst case your scheduler domains or your zone fallback lists are not quite optimally set up, but they will still work.
-Andi
Signature · 1 line
[email protected]
Quoted 3 lines · Andi Kleen
Yes excellent point. Should we dump the complete ACPI tables? Do you prefer hexdump
good point. there is one time BIOS put blank slit there. (only have acpi table header)
only after dump that earlier in kernel boot log, they shut up and go back to fix their problem.
YH
Quoted 9 lines · Yinghai Lu
Quoted 3 lines · Andi Kleen
Yes excellent point. Should we dump the complete ACPI tables? Do you prefer hexdump
good point. there is one time BIOS put blank slit there. (only have acpi table header)
only after dump that earlier in kernel boot log, they shut up and go back to fix their problem.
You should have asked them to run firmwaretestkit (and if fwtestkit doesn't test for a correct SLIT fix it there). That is what it is for. But adding it
to all Linux bootlogs ever just for this special case is the wrong way.
-Andi
Signature · 1 line
[email protected]
Quoted 9 lines · Thomas Gleixner
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
We can dump in *any* kernel.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Ooh, 'lets dump more junk at everyone, typing commands is hard' :-(.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 11 lines · Pavel Machek
Quoted 9 lines · Thomas Gleixner
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
Quoted 7 lines
We can dump in *any* kernel.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Ooh, 'lets dump more junk at everyone, typing commands is hard' :-(.
no, the principle is, information like the boot-time CPUID information (and even the BIOS environment) can be indicative of _kernel bugs_. It is often essential to dump what the booting (and failing) kernel thinks is its environment.
Often that environment is corrupted (by the kernel) and that leads to problems. This 'environment' can also be affected by things like hard boot vs cold boot differences, whether it's in a kexec environment, whether it's booted as a virtual guest, etc., etc.
For a long time we had the kernel's x86 bootup pretty much as a mostly silent black box and when it broke we tried to figure things out afterwards which was difficult and error-prone. Now we've got various quite effective debug mechanisms (which includes printouts as well) and figuring out x86 problems is visibly easier. We definitely wont go back to the 'black box code, can only be debugged by a few experts' method.
So extending on that is a good and obvious idea in general - and i agree with Peter that this should be command-line dependent, i.e. not printed by default. Only printing it when 'debug' is specified on the command line is a good solution.
Ingo
Quoted 39 lines · Ingo Molnar
Quoted 11 lines · Pavel Machek
Quoted 9 lines · Thomas Gleixner
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
Quoted 7 lines
We can dump in *any* kernel.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Ooh, 'lets dump more junk at everyone, typing commands is hard' :-(.
no, the principle is, information like the boot-time CPUID information (and even the BIOS environment) can be indicative of
_kernelbugs_. It is often essential to dump what the booting (and failing) kernel thinks is its environment.Often that environment is corrupted (by the kernel) and that leads to problems. This 'environment' can also be affected by things like hard boot vs cold boot differences, whether it's in a kexec environment, whether it's booted as a virtual guest, etc., etc.
For a long time we had the kernel's x86 bootup pretty much as a mostly silent black box and when it broke we tried to figure things out afterwards which was difficult and error-prone. Now we've got various quite effective debug mechanisms (which includes printouts as well) and figuring out x86 problems is visibly easier. We definitely wont go back to the 'black box code, can only be debugged by a few experts' method.
Quoted 4 lines
So extending on that is a good and obvious idea in general - and i agree with Peter that this should be command-line dependent, i.e. not printed by default. Only printing it when 'debug' is specified on the command line is a good solution.
Dumping when user requested it on commandline seems like good compromise to me.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 40 lines · Pavel Machek
Quoted 39 lines · Ingo Molnar
Quoted 11 lines · Pavel Machek
Quoted 9 lines · Thomas Gleixner
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
Quoted 7 lines
We can dump in *any* kernel.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Ooh, 'lets dump more junk at everyone, typing commands is hard' :-(.
no, the principle is, information like the boot-time CPUID information (and even the BIOS environment) can be indicative of
_kernelbugs_. It is often essential to dump what the booting (and failing) kernel thinks is its environment.Often that environment is corrupted (by the kernel) and that leads to problems. This 'environment' can also be affected by things like hard boot vs cold boot differences, whether it's in a kexec environment, whether it's booted as a virtual guest, etc., etc.
For a long time we had the kernel's x86 bootup pretty much as a mostly silent black box and when it broke we tried to figure things out afterwards which was difficult and error-prone. Now we've got various quite effective debug mechanisms (which includes printouts as well) and figuring out x86 problems is visibly easier. We definitely wont go back to the 'black box code, can only be debugged by a few experts' method.
Quoted 7 lines
Quoted 4 lines
So extending on that is a good and obvious idea in general - and i agree with Peter that this should be command-line dependent, i.e. not printed by default. Only printing it when 'debug' is specified on the command line is a good solution.
Dumping when user requested it on commandline seems like good compromise to me.
(I meant 'on kernel commandline' == 'in kernel parameters'. I agree with ingo here.)
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 40 lines · Pavel Machek
Quoted 39 lines · Ingo Molnar
Quoted 11 lines · Pavel Machek
Quoted 9 lines · Thomas Gleixner
Quoted 6 lines · Andi Kleen
Quoted 2 lines · Yinghai Lu
to see how wrong could be set by BIOS.
Just dump it from user space then. There are plenty of tools to access ACPI tables.
1.) what guarantees that we reach user space ?
Quoted 7 lines
We can dump in *any* kernel.
Quoted 3 lines
2) If it is _valuable_ information which we can gather via kernel output, then it is much more conveniant than asking the user to type whatevercryptictoolcommandline and provide the output.
Ooh, 'lets dump more junk at everyone, typing commands is hard' :-(.
no, the principle is, information like the boot-time CPUID information (and even the BIOS environment) can be indicative of
_kernelbugs_. It is often essential to dump what the booting (and failing) kernel thinks is its environment.Often that environment is corrupted (by the kernel) and that leads to problems. This 'environment' can also be affected by things like hard boot vs cold boot differences, whether it's in a kexec environment, whether it's booted as a virtual guest, etc., etc.
For a long time we had the kernel's x86 bootup pretty much as a mostly silent black box and when it broke we tried to figure things out afterwards which was difficult and error-prone. Now we've got various quite effective debug mechanisms (which includes printouts as well) and figuring out x86 problems is visibly easier. We definitely wont go back to the 'black box code, can only be debugged by a few experts' method.
Quoted 7 lines
Quoted 4 lines
So extending on that is a good and obvious idea in general - and i agree with Peter that this should be command-line dependent, i.e. not printed by default. Only printing it when 'debug' is specified on the command line is a good solution.
Dumping when user requested it on commandline seems like good compromise to me.
great! Yinghai, mind reworking the patch in that direction please? I'd suggest to enable the optional dumping of all things BIOS environment related, not just the ACPI/SLIT.
there's also CONFIG_X86_VERBOSE_BOOTUP=y [default disabled] - which could be coupled with an x86=verbose boot parameter or so.
Ingo
Quoted 10 lines · Ingo Molnar
Quoted 3 lines
Dumping when user requested it on commandline seems like good compromise to me.
great! Yinghai, mind reworking the patch in that direction please? I'd suggest to enable the optional dumping of all things BIOS environment related, not just the ACPI/SLIT.
there's also
CONFIG_X86_VERBOSE_BOOTUP=y[default disabled] - which could be coupled with an x86=verbose boot parameter or so.
will work on it.
YH
Quoted 3 lines
great! Yinghai, mind reworking the patch in that direction please? I'd suggest to enable the optional dumping of all things BIOS environment related, not just the ACPI/SLIT.
Great. I'm preparing the "kernel iasl -d" patch now @)
-Andi