Re:Re: how can I get the ZONE_DMA size ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2014-05-13 04:02:28,Valdis.Kletnieks@xxxxxx 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 1654
pde_index value
NO.0      00000000
NO.1      3ae9d067
NO.2      3af55067
NO.3      00000000
...
NO.767 3af57067
NO.768 00b41067
NO.769 36064063
NO.770 36065063
NO.771 00c001e3
NO.772 010001e3
NO.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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux