Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Running linux on x86.
I am looking at the function free_pgd_range. It walks through the radix tree page table and "free" the page table at each level. For example, at pte level, free_pte_range calls pte_free_tlb which update the tlb stats and call page destructor. I am confused because I don't know where the linux kernel actually free a page allocated for a page table when destroy a process and exit from its associated mm_struct.
I also look into pgd_free and zap_page_range functions; they are critical while exiting from a mm_struct, but I don't think they free any pages used for page tables.
Any insight/pointer would be helpful! Thanks in advance!
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303
Rep:
This defers between 32 bit and 64 bit address(virtual).
if you go through this structure, you will find page table address. Out of this address, lower 12 bits used to refer address of particular page(Assuming that you have page size 4K), rest of the bits are used for multilevel-page table indexing.
This defers between 32 bit and 64 bit address(virtual).
if you go through this structure, you will find page table address. Out of this address, lower 12 bits used to refer address of particular page(Assuming that you have page size 4K), rest of the bits are used for multilevel-page table indexing.
Sorry I should have specified the arch well enough. I am running on x86-64. I know how those page tables are designed, but I guess my question in one sentence is that when and where do those page tables get freed?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.