Re: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Andi Kleen
Adrian Bunk wrote:
> On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
>> On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
>>> dump_pagetable() can now become static.
>>>
>>> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
>>>
>> I believe Andi Kleen wanted this kept global to make it easy to use when
>> adding debugging code elsewhere.
> 
> That's not a reason as long as his code isn't in the tree (and he anyway 
> has to patch the kernel for using it).

It was originally needed for the old cpa patchkit which dumped
the page tables when it detected an internal inconsistency
with the reference counts.

I think something like this would still make sense in a few
cases, although there are no reference counts to check anymore
currently.

-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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Ingo Molnar

* Adrian Bunk <[EMAIL PROTECTED]> wrote:

> On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
> > On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
> > > dump_pagetable() can now become static.
> > > 
> > > Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

thanks, applied.

> > I believe Andi Kleen wanted this kept global to make it easy to use 
> > when adding debugging code elsewhere.
> 
> That's not a reason as long as his code isn't in the tree (and he 
> anyway has to patch the kernel for using it).

correct. There's also a new CONFIG_X86_PTDUMP=y pagetable dumping debug 
feature now in x86.git#mm that produces much nicer output.

Arjan: i it might be nice to make the new pagetable dumper triggerable 
from a SysRq - could you try the kernel/time/timer_list.c's SEQ_printf() 
trick to make the dumping dual-purpose? [so that it printk()'s if it 
should dump to the console and seq_printf()'s if it should dump via 
/proc]

Ingo
--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Adrian Bunk
On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
> On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
> > dump_pagetable() can now become static.
> > 
> > Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
> > 
> 
> I believe Andi Kleen wanted this kept global to make it easy to use when
> adding debugging code elsewhere.

That's not a reason as long as his code isn't in the tree (and he anyway 
has to patch the kernel for using it).

> Cheers,
> 
> Harvey

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Arjan van de Ven
On Wed, 13 Feb 2008 23:31:31 +0200
Adrian Bunk <[EMAIL PROTECTED]> wrote:

> dump_pagetable() can now become static.
> 
> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>


Acked-by: Arjan van de Ven <[EMAIL PROTECTED]>



-- 
If you want to reach me at my work email, use [EMAIL PROTECTED]
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Harvey Harrison
On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
> dump_pagetable() can now become static.
> 
> Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
> 

I believe Andi Kleen wanted this kept global to make it easy to use when
adding debugging code elsewhere.

Cheers,

Harvey

--
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/


[2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Adrian Bunk
dump_pagetable() can now become static.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 arch/x86/mm/fault.c  |2 +-
 include/asm-x86/kdebug.h |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

fe111b005768f97b9f83af7ad4014a77e7adc249 diff --git a/arch/x86/mm/fault.c 
b/arch/x86/mm/fault.c
index 621afb6..fdc6674 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -186,7 +186,7 @@ static int bad_address(void *p)
 }
 #endif
 
-void dump_pagetable(unsigned long address)
+static void dump_pagetable(unsigned long address)
 {
 #ifdef CONFIG_X86_32
__typeof__(pte_val(__pte(0))) page;
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index dd442a1..99dcbaf 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -31,7 +31,6 @@ extern void show_trace(struct task_struct *t, struct pt_regs 
*regs,
unsigned long *sp, unsigned long bp);
 extern void __show_regs(struct pt_regs *regs);
 extern void show_regs(struct pt_regs *regs);
-extern void dump_pagetable(unsigned long);
 extern unsigned long oops_begin(void);
 extern void oops_end(unsigned long, struct pt_regs *, int signr);
 

--
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/


[2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Adrian Bunk
dump_pagetable() can now become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 arch/x86/mm/fault.c  |2 +-
 include/asm-x86/kdebug.h |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

fe111b005768f97b9f83af7ad4014a77e7adc249 diff --git a/arch/x86/mm/fault.c 
b/arch/x86/mm/fault.c
index 621afb6..fdc6674 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -186,7 +186,7 @@ static int bad_address(void *p)
 }
 #endif
 
-void dump_pagetable(unsigned long address)
+static void dump_pagetable(unsigned long address)
 {
 #ifdef CONFIG_X86_32
__typeof__(pte_val(__pte(0))) page;
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index dd442a1..99dcbaf 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -31,7 +31,6 @@ extern void show_trace(struct task_struct *t, struct pt_regs 
*regs,
unsigned long *sp, unsigned long bp);
 extern void __show_regs(struct pt_regs *regs);
 extern void show_regs(struct pt_regs *regs);
-extern void dump_pagetable(unsigned long);
 extern unsigned long oops_begin(void);
 extern void oops_end(unsigned long, struct pt_regs *, int signr);
 

--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Harvey Harrison
On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
 dump_pagetable() can now become static.
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 

I believe Andi Kleen wanted this kept global to make it easy to use when
adding debugging code elsewhere.

Cheers,

Harvey

--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Arjan van de Ven
On Wed, 13 Feb 2008 23:31:31 +0200
Adrian Bunk [EMAIL PROTECTED] wrote:

 dump_pagetable() can now become static.
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]


Acked-by: Arjan van de Ven [EMAIL PROTECTED]



-- 
If you want to reach me at my work email, use [EMAIL PROTECTED]
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Adrian Bunk
On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
 On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
  dump_pagetable() can now become static.
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
  
 
 I believe Andi Kleen wanted this kept global to make it easy to use when
 adding debugging code elsewhere.

That's not a reason as long as his code isn't in the tree (and he anyway 
has to patch the kernel for using it).

 Cheers,
 
 Harvey

cu
Adrian

-- 

   Is there not promise of rain? Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   Only a promise, Lao Er said.
   Pearl S. Buck - Dragon Seed

--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Ingo Molnar

* Adrian Bunk [EMAIL PROTECTED] wrote:

 On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
  On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
   dump_pagetable() can now become static.
   
   Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

thanks, applied.

  I believe Andi Kleen wanted this kept global to make it easy to use 
  when adding debugging code elsewhere.
 
 That's not a reason as long as his code isn't in the tree (and he 
 anyway has to patch the kernel for using it).

correct. There's also a new CONFIG_X86_PTDUMP=y pagetable dumping debug 
feature now in x86.git#mm that produces much nicer output.

Arjan: i it might be nice to make the new pagetable dumper triggerable 
from a SysRq - could you try the kernel/time/timer_list.c's SEQ_printf() 
trick to make the dumping dual-purpose? [so that it printk()'s if it 
should dump to the console and seq_printf()'s if it should dump via 
/proc]

Ingo
--
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: [2.6 patch] x86: make dump_pagetable() static

2008-02-13 Thread Andi Kleen
Adrian Bunk wrote:
 On Wed, Feb 13, 2008 at 02:27:47PM -0800, Harvey Harrison wrote:
 On Wed, 2008-02-13 at 23:31 +0200, Adrian Bunk wrote:
 dump_pagetable() can now become static.

 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

 I believe Andi Kleen wanted this kept global to make it easy to use when
 adding debugging code elsewhere.
 
 That's not a reason as long as his code isn't in the tree (and he anyway 
 has to patch the kernel for using it).

It was originally needed for the old cpa patchkit which dumped
the page tables when it detected an internal inconsistency
with the reference counts.

I think something like this would still make sense in a few
cases, although there are no reference counts to check anymore
currently.

-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/