<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><pre>At 2014-05-13 04:02:28,Valdis.Kletnieks@vt.edu wrote:
>On Mon, 12 May 2014 15:14:11 +0800, RS said:
>>So, how can I get the ZONE_DMA real size ? Is there any kernel functions or configuration files ? I want to get the accurate number.
>
>What question are you trying to answer with that number? There's a good</pre><pre>>chance that you're looking for something else entirely...
</pre><pre>I have writed a module to print a process's pgd(task_struct->mm->pdg).</pre><pre>here is output sample:</pre><pre>-------------------------</pre><pre>task bash, pid 1654</pre><pre><span style="line-height: 1.7;">pde_index value</span></pre><pre>NO.0 00000000</pre><pre>NO.1 3ae9d067</pre><pre>NO.2 3af55067</pre><pre>NO.3 00000000</pre><pre>...</pre><pre>NO.767 3af<span style="line-height: 1.7;">57067</span></pre><pre><span style="line-height: 1.7;">NO.768 00b41067</span></pre><pre>NO.769 36064063</pre><pre>NO.770 36065063</pre><pre>NO.771 00c001e3</pre><pre>NO.772 010001e3</pre><pre>NO.773 014001e3</pre><pre>...</pre><pre>from the index 0 to 767, is pde represent for the user mode memory space, the kernel space start with the index 768. <span style="line-height: 1.7;">So the ZONE_DMA start with the same place. The NO.771 pde value </span><span style="line-height: 1.7;">00c001e3 </span><span style="line-height: 1.7;">determine the entry is use for a 4M size page, and the physical address of the page frame has a 0x</span>c0000000 offset with the virtual address. So I think this place is the entry of ZONE_NORMAL. So only the three pde NO.768, 769, 770 is use for ZONE_DMA, one pde can indicate a 4M size page, no mater the pde is use for a page table or a large page frame, the ZONE_DMA size is 3 * 4M = 12M in my machine.</pre><pre>is that right ? ZONE_DMA is not the 16M .</pre><pre><br></pre><pre>Thanks,</pre><pre><span style="line-height: 1.7;">HeChuan</span></pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>