* [PATCH] dump available order allocations in each zone while dumping heap information
@ 2014-01-05 18:45 Karim Raslan
2014-01-05 20:44 ` Julien Grall
0 siblings, 1 reply; 3+ messages in thread
From: Karim Raslan @ 2014-01-05 18:45 UTC (permalink / raw)
To: xen-devel
Signed-off-by: Karim Raslan <karim.allah.ahmed@gmail.com>
---
xen/common/page_alloc.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 5f484a2..5419b3f 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1673,7 +1673,7 @@ void scrub_one_page(struct page_info *pg)
static void dump_heap(unsigned char key)
{
s_time_t now = NOW();
- int i, j;
+ int i, j, k;
printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
(u32)(now>>32), (u32)now);
@@ -1683,8 +1683,17 @@ static void dump_heap(unsigned char key)
if ( !avail[i] )
continue;
for ( j = 0; j < NR_ZONES; j++ )
+ {
printk("heap[node=%d][zone=%d] -> %lu pages\n",
i, j, avail[i][j]);
+ if(avail[i][j]) {
+ printk("\t(In:\n");
+ for ( k = 0; k < MAX_ORDER; k++)
+ if(!page_list_empty(&heap(i, j, k)))
+ printk(" \t[order=%d]\n",k);
+ printk(")\n");
+ }
+ }
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] dump available order allocations in each zone while dumping heap information
2014-01-05 18:45 [PATCH] dump available order allocations in each zone while dumping heap information Karim Raslan
@ 2014-01-05 20:44 ` Julien Grall
2014-01-05 22:10 ` karim.allah.ahmed
0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2014-01-05 20:44 UTC (permalink / raw)
To: Karim Raslan, xen-devel, Keir Fraser
Hi Karim,
(+ adding maintainers) Don't forget the maintainers, you can use
scripts/get_maintainers.pl.
On 01/05/2014 06:45 PM, Karim Raslan wrote:
> Signed-off-by: Karim Raslan <karim.allah.ahmed@gmail.com>
> ---
> xen/common/page_alloc.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> index 5f484a2..5419b3f 100644
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -1673,7 +1673,7 @@ void scrub_one_page(struct page_info *pg)
> static void dump_heap(unsigned char key)
> {
> s_time_t now = NOW();
> - int i, j;
> + int i, j, k;
>
> printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
> (u32)(now>>32), (u32)now);
> @@ -1683,8 +1683,17 @@ static void dump_heap(unsigned char key)
> if ( !avail[i] )
> continue;
> for ( j = 0; j < NR_ZONES; j++ )
> + {
> printk("heap[node=%d][zone=%d] -> %lu pages\n",
> i, j, avail[i][j]);
> + if(avail[i][j]) {
if ( .. )
{
You are using Linux coding style, not Xen. See CODING_STYLE in the root
of the repository.
> + printk("\t(In:\n");
We don't use tabulations on Xen, please use spaces (same for the next 4
lines).
> + for ( k = 0; k < MAX_ORDER; k++)
> + if(!page_list_empty(&heap(i, j, k)))
if ( .. )
> + printk(" \t[order=%d]\n",k);
> + printk(")\n");
> + }
> + }
> }
> }
>
>
Sincerely yours,
--
Julien Grall
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] dump available order allocations in each zone while dumping heap information
2014-01-05 20:44 ` Julien Grall
@ 2014-01-05 22:10 ` karim.allah.ahmed
0 siblings, 0 replies; 3+ messages in thread
From: karim.allah.ahmed @ 2014-01-05 22:10 UTC (permalink / raw)
To: Julien Grall; +Cc: Keir Fraser, xen-devel
Thanks Julien for your comments, reposting.
On Sun, Jan 5, 2014 at 8:44 PM, Julien Grall <julien.grall@linaro.org> wrote:
> Hi Karim,
>
> (+ adding maintainers) Don't forget the maintainers, you can use
> scripts/get_maintainers.pl.
>
>
> On 01/05/2014 06:45 PM, Karim Raslan wrote:
>>
>> Signed-off-by: Karim Raslan <karim.allah.ahmed@gmail.com>
>> ---
>> xen/common/page_alloc.c | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
>> index 5f484a2..5419b3f 100644
>> --- a/xen/common/page_alloc.c
>> +++ b/xen/common/page_alloc.c
>> @@ -1673,7 +1673,7 @@ void scrub_one_page(struct page_info *pg)
>> static void dump_heap(unsigned char key)
>> {
>> s_time_t now = NOW();
>> - int i, j;
>> + int i, j, k;
>>
>> printk("'%c' pressed -> dumping heap info (now-0x%X:%08X)\n", key,
>> (u32)(now>>32), (u32)now);
>> @@ -1683,8 +1683,17 @@ static void dump_heap(unsigned char key)
>> if ( !avail[i] )
>> continue;
>> for ( j = 0; j < NR_ZONES; j++ )
>> + {
>> printk("heap[node=%d][zone=%d] -> %lu pages\n",
>> i, j, avail[i][j]);
>> + if(avail[i][j]) {
>
>
> if ( .. )
> {
>
> You are using Linux coding style, not Xen. See CODING_STYLE in the root of
> the repository.
>
>
>> + printk("\t(In:\n");
>
>
> We don't use tabulations on Xen, please use spaces (same for the next 4
> lines).
>
>
>> + for ( k = 0; k < MAX_ORDER; k++)
>> + if(!page_list_empty(&heap(i, j,
>> k)))
>
>
> if ( .. )
>
>
>> + printk("
>> \t[order=%d]\n",k);
>> + printk(")\n");
>> + }
>> + }
>> }
>> }
>>
>>
>
> Sincerely yours,
>
> --
> Julien Grall
--
Karim Allah Ahmed.
LinkedIn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-05 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-05 18:45 [PATCH] dump available order allocations in each zone while dumping heap information Karim Raslan
2014-01-05 20:44 ` Julien Grall
2014-01-05 22:10 ` karim.allah.ahmed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.