how can I get the ZONE_DMA size ??
RS
tinyshrimp at 163.com
Mon May 12 23:35:26 EDT 2014
At 2014-05-13 04:02:28,Valdis.Kletnieks at 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>chance that you're looking for something else entirely...
I have writed a module to print a process's pgd(task_struct->mm->pdg).here is output sample:-------------------------task bash, pid 1654pde_index valueNO.0 00000000NO.1 3ae9d067NO.2 3af55067NO.3 00000000...NO.767 3af57067NO.768 00b41067NO.769 36064063NO.770 36065063NO.771 00c001e3NO.772 010001e3NO.773 014001e3...from the index 0 to 767, is pde represent for the user mode memory space, the kernel space start with the index 768. So the ZONE_DMA start with the same place. The NO.771 pde value 00c001e3 determine the entry is use for a 4M size page, and the physical address of the page frame has a 0xc0000000 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.is that right ? ZONE_DMA is not the 16M .
Thanks,
HeChuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140513/3c5f714a/attachment.html
More information about the Kernelnewbies
mailing list