From: weiming Subject: why each process needs a separate page for kernel's pgd table in PV x86_64? Date: Mon, 24 Mar 2008 00:07:39 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2087220285==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --===============2087220285== Content-Type: multipart/alternative; boundary="----=_Part_7680_30017121.1206331659605" ------=_Part_7680_30017121.1206331659605 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I notice that in the paravirtualized linux for x86_64, each process allocates 2 pages for mm->pgd: one for kernel's page table, the other for user's page table. Why not let all processes share the kernel's page table? i.e., add a field in mm struct (like mm->kernel_pgd, ) and let it point to a page, which will be referenced by all process. This can save some 4K for each process forked. Please correct me if I'm wrong. Thanks, Weiming ------=_Part_7680_30017121.1206331659605 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I notice that in the paravirtualized linux for x86_64, each process allocates 2 pages for mm->pgd: one for kernel's page table, the other for user's page table.

Why not let all processes share the kernel's page table? i.e., add a field in mm struct (like mm->kernel_pgd, ) and let it point to a page, which will be referenced by all process. This can save some 4K for each process forked.

Please correct me if I'm wrong.

Thanks,
Weiming
------=_Part_7680_30017121.1206331659605-- --===============2087220285== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============2087220285==--