Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pavel Emelianov
Pekka Enberg wrote: > On 4/17/07, Pavel Emelianov <[EMAIL PROTECTED]> wrote: >> The out_of_memory() function and SysRq-M handler call >> show_mem() to show the current memory usage state. > > I am still somewhat unhappy about the spinlock, but I don't really What's wrong with the spinlock? It

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pavel Emelianov
Dave Hansen wrote: > On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: >> +#define SHOW_TOP_SLABS 10 > > Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. "Should > I show the top slabs?" > > This might be a bit more clear: > > #define TOP_NR_SLABS_TO_SHOW 10 > > or >

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pekka Enberg
On 4/17/07, Pavel Emelianov <[EMAIL PROTECTED]> wrote: The out_of_memory() function and SysRq-M handler call show_mem() to show the current memory usage state. I am still somewhat unhappy about the spinlock, but I don't really have a better suggestion either. Other than that, looks good to me.

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pekka J Enberg
On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: > > +#define SHOW_TOP_SLABS 10 On Tue, 17 Apr 2007, Dave Hansen wrote: > Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. "Should > I show the top slabs?" > > This might be a bit more clear: > > #define

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pekka J Enberg
On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: +#define SHOW_TOP_SLABS 10 On Tue, 17 Apr 2007, Dave Hansen wrote: Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. Should I show the top slabs? This might be a bit more clear: #define TOP_NR_SLABS_TO_SHOW 10

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pekka Enberg
On 4/17/07, Pavel Emelianov [EMAIL PROTECTED] wrote: The out_of_memory() function and SysRq-M handler call show_mem() to show the current memory usage state. I am still somewhat unhappy about the spinlock, but I don't really have a better suggestion either. Other than that, looks good to me.

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pavel Emelianov
Dave Hansen wrote: On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: +#define SHOW_TOP_SLABS 10 Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. Should I show the top slabs? This might be a bit more clear: #define TOP_NR_SLABS_TO_SHOW 10 or #define

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-18 Thread Pavel Emelianov
Pekka Enberg wrote: On 4/17/07, Pavel Emelianov [EMAIL PROTECTED] wrote: The out_of_memory() function and SysRq-M handler call show_mem() to show the current memory usage state. I am still somewhat unhappy about the spinlock, but I don't really What's wrong with the spinlock? It exists

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-17 Thread Dave Hansen
On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: > +#define SHOW_TOP_SLABS 10 Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. "Should I show the top slabs?" This might be a bit more clear: #define TOP_NR_SLABS_TO_SHOW 10 or #define NR_SLABS_TO_SHOW 10 -- Dave - To

[PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-17 Thread Pavel Emelianov
The out_of_memory() function and SysRq-M handler call show_mem() to show the current memory usage state. This is also helpful to see which slabs are the largest in the system. Thanks Pekka for good idea of how to make it better. The nr_pages is stored on kmem_list3 because: 1. as Eric pointed

[PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-17 Thread Pavel Emelianov
The out_of_memory() function and SysRq-M handler call show_mem() to show the current memory usage state. This is also helpful to see which slabs are the largest in the system. Thanks Pekka for good idea of how to make it better. The nr_pages is stored on kmem_list3 because: 1. as Eric pointed

Re: [PATCH] Show slab memory usage on OOM and SysRq-M (v2)

2007-04-17 Thread Dave Hansen
On Tue, 2007-04-17 at 19:34 +0400, Pavel Emelianov wrote: +#define SHOW_TOP_SLABS 10 Real minor nit on this one: SHOW_TOP_SLABS sounds like a bool. Should I show the top slabs? This might be a bit more clear: #define TOP_NR_SLABS_TO_SHOW 10 or #define NR_SLABS_TO_SHOW 10 -- Dave - To