<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Sharyathi Nagesh wrote:
<blockquote TYPE=CITE>Dave
<br>        Please go through my observation.
<p>>
<br>> That makes the most sense at this point.  This is what I was
<br>> planning for vm_init():
<br>>
<br>>
<br>> @@ -694,7 +708,8 @@ vm_init(void)
<br>>                        
vt->PG_slab = 10;
<br>>                
else if (THIS_KERNEL_VERSION >= LINUX(2,6,0))
<br>>                        
vt->PG_slab = 7;
<br>> -       }
<br>> +       } else if (THIS_KERNEL_VERSION
>= LINUX(2,6,0))
<br>> +              
vt->PG_slab = 7;
<br>>  }
<br>here for the dump I was looking into vt->PG_slab needs to be set to
10
<br>and not 7. as slab value was 1024 in dump_mem_map() function.</blockquote>
<tt>What kernel version are you testing with?</tt>
<blockquote TYPE=CITE> 
<br>>  /*
<br>>
<br>> >
<br>> >
<br>> >
<br>> > o The output is breaking as  totalhigh_pages is coming out
zero,
<br>> > So part of code in function dump_kmeminfo()
<br>> > pct = freehighmem_pages ?
<br>> >                        
(freehighmem_pages * 100)/totalhigh_pages :
<br>> > 0;
<br>> > Cause Arithmetic calculation error.
<br>> >
<br>> > Still looking into the problem.
<br>> >
<br>> I can't reproduce this one.  In your case though, with
<br>> about 500MB, both "freehighmem_pages" and "totalhigh_pages"
<br>> should both be zero, leading to a "pct" setting of 0.
<br>> Are you showing "freehighmem_pages" as non-zero?
<br>>
<br>> Dave
<br>I could see totalhigh_pages coming out zero which was the right thing
<br>(As it was x86_64 machine) but freehighmem_pages came out as a non
zero
<br>quantity.
<br>In function :dump_free_pages_zones_v2(). I could see vt->nr_zones as
4
<br>which I feel is incorrect and hence it entered the block
<br>        if (i == ZONE_HIGHMEM) {
<br>                               
readmem(node_zones+
<br>                                      
OFFSET(zone_free_pages),
<br>                                            
KVADDR, &value,
<br>sizeof(ulong),
<br>                                            
"node_zones free_pages",
<br>                                            
FAULT_ON_ERROR);
<br>                                     
sum += value;
<br>                               
}
<br>and sum was updated with a value and hence freehighmem_pages causing
<br>Arithmetic exception</blockquote>
<tt>Ah -- the value of ZONE_HIGHMEM can no longer be fixed since</tt>
<br><tt>it's been changed from 3 to 4.  It should be based upon</tt>
<br><tt>the array size of the pglist_data.node_zones[] minus 1.</tt>
<br><tt>Since we already save this array index at init-time,</tt>
<br><tt>I'll make ZONE_HIGHMEM a variable in the vm_table.</tt>
<br><tt>The other two definitions (ZONE_DMA and ZONE_LOW) aren't</tt>
<br><tt>used).</tt><tt></tt>
<p><tt>Thanks,</tt>
<br><tt>  Dave</tt>
<br> 
<br> </html>