* [PATCH] x86: make mtrr code could use debugpat [not found] ` <20090403222928.GA6446@elte.hu> @ 2009-04-03 22:35 ` Yinghai Lu 2009-04-04 0:37 ` Linus Torvalds 0 siblings, 1 reply; 9+ messages in thread From: Yinghai Lu @ 2009-04-03 22:35 UTC (permalink / raw) To: Ingo Molnar Cc: Linus Torvalds, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org Impact: cleanup only print out get_mtrr when debugpat Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- arch/x86/kernel/cpu/mtrr/generic.c | 9 ++++++--- arch/x86/kernel/cpu/mtrr/mtrr.h | 4 ++++ arch/x86/mm/pat.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) Index: linux-2.6/arch/x86/kernel/cpu/mtrr/generic.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/cpu/mtrr/generic.c +++ linux-2.6/arch/x86/kernel/cpu/mtrr/generic.c @@ -462,9 +462,12 @@ static void generic_get_mtrr(unsigned in *base = base_hi << (32 - PAGE_SHIFT) | base_lo >> PAGE_SHIFT; *type = base_lo & 0xff; - printk(KERN_DEBUG " get_mtrr: cpu%d reg%02d base=%010lx size=%010lx %s\n", - cpu, reg, *base, *size, - mtrr_attrib_to_str(*type & 0xff)); +#ifdef CONFIG_X86_PAT + if (debugpat) + printk(KERN_DEBUG " get_mtrr: cpu%d reg%02d base=%010lx size=%010lx %s\n", + cpu, reg, *base, *size, + mtrr_attrib_to_str(*type & 0xff)); +#endif out_put_cpu: put_cpu(); } Index: linux-2.6/arch/x86/kernel/cpu/mtrr/mtrr.h =================================================================== --- linux-2.6.orig/arch/x86/kernel/cpu/mtrr/mtrr.h +++ linux-2.6/arch/x86/kernel/cpu/mtrr/mtrr.h @@ -92,3 +92,7 @@ int centaur_init_mtrr(void); extern int changed_by_mtrr_cleanup; extern int mtrr_cleanup(unsigned address_bits); + +#if CONFIG_X86_PAT +extern int debugpat; +#endif Index: linux-2.6/arch/x86/mm/pat.c =================================================================== --- linux-2.6.orig/arch/x86/mm/pat.c +++ linux-2.6/arch/x86/mm/pat.c @@ -51,17 +51,17 @@ static inline void pat_disable(const cha #endif -static int debug_enable; +int debugpat; static int __init pat_debug_setup(char *str) { - debug_enable = 1; + debugpat = 1; return 0; } __setup("debugpat", pat_debug_setup); #define dprintk(fmt, arg...) \ - do { if (debug_enable) printk(KERN_INFO fmt, ##arg); } while (0) + do { if (debugpat) printk(KERN_INFO fmt, ##arg); } while (0) static u64 __read_mostly boot_pat_state; ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-03 22:35 ` [PATCH] x86: make mtrr code could use debugpat Yinghai Lu @ 2009-04-04 0:37 ` Linus Torvalds 2009-04-04 0:48 ` Yinghai Lu ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Linus Torvalds @ 2009-04-04 0:37 UTC (permalink / raw) To: Yinghai Lu Cc: Ingo Molnar, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org On Fri, 3 Apr 2009, Yinghai Lu wrote: > > only print out get_mtrr when debugpat Is that get_mtrr message really so interesting that it needs to be printed out at all? Even with debugpat? Linus ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 0:37 ` Linus Torvalds @ 2009-04-04 0:48 ` Yinghai Lu 2009-04-04 0:49 ` Yinghai Lu 2009-04-04 1:18 ` Ingo Molnar 2 siblings, 0 replies; 9+ messages in thread From: Yinghai Lu @ 2009-04-04 0:48 UTC (permalink / raw) To: Linus Torvalds Cc: Ingo Molnar, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org Linus Torvalds wrote: > > On Fri, 3 Apr 2009, Yinghai Lu wrote: >> only print out get_mtrr when debugpat > > Is that get_mtrr message really so interesting that it needs to be printed > out at all? Even with debugpat? > it seems some new X server try to touch MTRR at the first, and then try to use pci_mmap_page_range(). YH ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 0:37 ` Linus Torvalds 2009-04-04 0:48 ` Yinghai Lu @ 2009-04-04 0:49 ` Yinghai Lu 2009-04-04 0:50 ` Yinghai Lu 2009-04-04 1:18 ` Ingo Molnar 2 siblings, 1 reply; 9+ messages in thread From: Yinghai Lu @ 2009-04-04 0:49 UTC (permalink / raw) To: Linus Torvalds Cc: Ingo Molnar, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org Linus Torvalds wrote: > > On Fri, 3 Apr 2009, Yinghai Lu wrote: >> only print out get_mtrr when debugpat > > Is that get_mtrr message really so interesting that it needs to be printed > out at all? Even with debugpat? or you pick the one in tip/master that remove those line. YH ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 0:49 ` Yinghai Lu @ 2009-04-04 0:50 ` Yinghai Lu 0 siblings, 0 replies; 9+ messages in thread From: Yinghai Lu @ 2009-04-04 0:50 UTC (permalink / raw) To: Linus Torvalds Cc: Ingo Molnar, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org Yinghai Lu wrote: > Linus Torvalds wrote: >> On Fri, 3 Apr 2009, Yinghai Lu wrote: >>> only print out get_mtrr when debugpat >> Is that get_mtrr message really so interesting that it needs to be printed >> out at all? Even with debugpat? > > or you pick the one in tip/master that remove those line. > should be in tip/x86/urgent YH ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 0:37 ` Linus Torvalds 2009-04-04 0:48 ` Yinghai Lu 2009-04-04 0:49 ` Yinghai Lu @ 2009-04-04 1:18 ` Ingo Molnar 2009-04-04 6:39 ` Jaswinder Singh Rajput 2009-04-04 6:52 ` Jaswinder Singh Rajput 2 siblings, 2 replies; 9+ messages in thread From: Ingo Molnar @ 2009-04-04 1:18 UTC (permalink / raw) To: Linus Torvalds Cc: Yinghai Lu, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org * Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Fri, 3 Apr 2009, Yinghai Lu wrote: > > > > only print out get_mtrr when debugpat > > Is that get_mtrr message really so interesting that it needs to be > printed out at all? Even with debugpat? With debugpat it's probably interesting - i think only a very small fraction of users will enable it, and if they do we really want to track all MTRR state. Since old MTRR state gets destroyed by new settings we better have a clear idea how the BIOS set it, that might give us clues about quirks, etc. Based on MTRR bugreport patterns i was the one who asked Yinghai during the development cycle to add more debugging there - so i'm to blame for those printouts. We had several cases where it would have been useful had we known the precise history of MTRR settings. I was under the impression that KERN_DEBUG would only show up on the console if 'debug' is passed in on the boot command line - but your bootlog didnt have 'debug' in it and i guess having it so frequently in the dmesg is confusing as well. It might even be there for every Xorg startup. Anyway ... the x86/urgent pull request i sent removes the printk altogether. Ingo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 1:18 ` Ingo Molnar @ 2009-04-04 6:39 ` Jaswinder Singh Rajput 2009-04-04 6:52 ` Jaswinder Singh Rajput 1 sibling, 0 replies; 9+ messages in thread From: Jaswinder Singh Rajput @ 2009-04-04 6:39 UTC (permalink / raw) To: Ingo Molnar Cc: Linus Torvalds, Yinghai Lu, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org On Sat, 2009-04-04 at 03:18 +0200, Ingo Molnar wrote: > * Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > On Fri, 3 Apr 2009, Yinghai Lu wrote: > > > > > > only print out get_mtrr when debugpat > > > > Is that get_mtrr message really so interesting that it needs to be > > printed out at all? Even with debugpat? > > With debugpat it's probably interesting - i think only a very small > fraction of users will enable it, and if they do we really want to > track all MTRR state. > > Since old MTRR state gets destroyed by new settings we better have a > clear idea how the BIOS set it, that might give us clues about > quirks, etc. > > Based on MTRR bugreport patterns i was the one who asked Yinghai > during the development cycle to add more debugging there - so i'm to > blame for those printouts. We had several cases where it would have > been useful had we known the precise history of MTRR settings. > > I was under the impression that KERN_DEBUG would only show up on the > console if 'debug' is passed in on the boot command line - but your > bootlog didnt have 'debug' in it and i guess having it so frequently > in the dmesg is confusing as well. It might even be there for every > Xorg startup. > > Anyway ... the x86/urgent pull request i sent removes the printk > altogether. > Thanks for removing those annoying lines. -- JSR ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 1:18 ` Ingo Molnar 2009-04-04 6:39 ` Jaswinder Singh Rajput @ 2009-04-04 6:52 ` Jaswinder Singh Rajput 2009-04-04 7:09 ` Jaswinder Singh Rajput 1 sibling, 1 reply; 9+ messages in thread From: Jaswinder Singh Rajput @ 2009-04-04 6:52 UTC (permalink / raw) To: Ingo Molnar Cc: Linus Torvalds, Yinghai Lu, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org, Andrew Morton On Sat, 2009-04-04 at 03:18 +0200, Ingo Molnar wrote: > * Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > On Fri, 3 Apr 2009, Yinghai Lu wrote: > > > > > > only print out get_mtrr when debugpat > > > > Is that get_mtrr message really so interesting that it needs to be > > printed out at all? Even with debugpat? > > With debugpat it's probably interesting - i think only a very small > fraction of users will enable it, and if they do we really want to > track all MTRR state. > > Since old MTRR state gets destroyed by new settings we better have a > clear idea how the BIOS set it, that might give us clues about > quirks, etc. > > Based on MTRR bugreport patterns i was the one who asked Yinghai > during the development cycle to add more debugging there - so i'm to > blame for those printouts. We had several cases where it would have > been useful had we known the precise history of MTRR settings. > > I was under the impression that KERN_DEBUG would only show up on the > console if 'debug' is passed in on the boot command line - but your > bootlog didnt have 'debug' in it and i guess having it so frequently > in the dmesg is confusing as well. It might even be there for every > Xorg startup. > If you still want to debug it, use some special parameters at command line to avoid annoyance to others. These debug messages really screwed up my life from last month. -- JSR ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] x86: make mtrr code could use debugpat 2009-04-04 6:52 ` Jaswinder Singh Rajput @ 2009-04-04 7:09 ` Jaswinder Singh Rajput 0 siblings, 0 replies; 9+ messages in thread From: Jaswinder Singh Rajput @ 2009-04-04 7:09 UTC (permalink / raw) To: Ingo Molnar Cc: Linus Torvalds, Yinghai Lu, Pallipadi, Venkatesh, Siddha, Suresh B, Arjan van de Ven, Thomas Gleixner, H. Peter Anvin, linux-kernel@vger.kernel.org, Andrew Morton On Sat, 2009-04-04 at 12:22 +0530, Jaswinder Singh Rajput wrote: > On Sat, 2009-04-04 at 03:18 +0200, Ingo Molnar wrote: > > * Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > > > On Fri, 3 Apr 2009, Yinghai Lu wrote: > > > > > > > > only print out get_mtrr when debugpat > > > > > > Is that get_mtrr message really so interesting that it needs to be > > > printed out at all? Even with debugpat? > > > > With debugpat it's probably interesting - i think only a very small > > fraction of users will enable it, and if they do we really want to > > track all MTRR state. > > > > Since old MTRR state gets destroyed by new settings we better have a > > clear idea how the BIOS set it, that might give us clues about > > quirks, etc. > > > > Based on MTRR bugreport patterns i was the one who asked Yinghai > > during the development cycle to add more debugging there - so i'm to > > blame for those printouts. We had several cases where it would have > > been useful had we known the precise history of MTRR settings. > > > > I was under the impression that KERN_DEBUG would only show up on the > > console if 'debug' is passed in on the boot command line - but your > > bootlog didnt have 'debug' in it and i guess having it so frequently > > in the dmesg is confusing as well. It might even be there for every > > Xorg startup. > > > > If you still want to debug it, use some special parameters at command > line to avoid annoyance to others. > > These debug messages really screwed up my life from last month. > If you surprise how these debug messages screwed up my life, so here is some clues: 1. I pointed to remove or suppress these messages and Ingo, Andrew and then later on Thomas become upset with me. 2. And because of their upset, I need to delete more than 100 of my patches and delete many development trees in last few weeks. -- JSR ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-04-04 7:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090329205805.GA24693@elte.hu>
[not found] ` <20090329210103.GA24901@elte.hu>
[not found] ` <49CFF517.30001@kernel.org>
[not found] ` <alpine.LFD.2.00.0903291553210.3948@localhost.localdomain>
[not found] ` <1238434120.4529.783.camel@localhost.localdomain>
[not found] ` <20090403175555.GH6295@elte.hu>
[not found] ` <alpine.LFD.2.00.0904031203400.4015@localhost.localdomain>
[not found] ` <20090403212152.GA3493@linux-os.sc.intel.com>
[not found] ` <alpine.LFD.2.00.0904031443340.7007@localhost.localdomain>
[not found] ` <alpine.LFD.2.00.0904031521460.3915@localhost.localdomain>
[not found] ` <20090403222928.GA6446@elte.hu>
2009-04-03 22:35 ` [PATCH] x86: make mtrr code could use debugpat Yinghai Lu
2009-04-04 0:37 ` Linus Torvalds
2009-04-04 0:48 ` Yinghai Lu
2009-04-04 0:49 ` Yinghai Lu
2009-04-04 0:50 ` Yinghai Lu
2009-04-04 1:18 ` Ingo Molnar
2009-04-04 6:39 ` Jaswinder Singh Rajput
2009-04-04 6:52 ` Jaswinder Singh Rajput
2009-04-04 7:09 ` Jaswinder Singh Rajput
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox