Ian Pratt
2006-Apr-26 18:04 UTC
RE: [Xen-devel] Regarding page table management changes from Xen v1to Xen v2 (and v3)
> In another example, mmapped access to a file, the new > approach will incur these two extra faults for every page > fault required to bring a file page to page cache, right?No, these singleton updates on the Linux demand fault path are issued with the update_va_mapping hypercall. This is possible because the virtual address that the pte maps is known, so its possible for Xen to use a linear pagetable to do the update rather than creating an on-demand mapping to the domain''s pagetable page. This is an important optimization on 32b where Xen address space is tight. Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-26 18:13 UTC
Re: [Xen-devel] Regarding page table management changes from Xen v1to Xen v2 (and v3)
On 26 Apr 2006, at 19:15, Anthony Liguori wrote:>> No, these singleton updates on the Linux demand fault path are issued >> with the update_va_mapping hypercall. This is possible because the >> virtual address that the pte maps is known, so its possible for Xen to >> use a linear pagetable to do the update rather than creating an >> on-demand mapping to the domain''s pagetable page. This is an important >> optimization on 32b where Xen address space is tight. >> > > Just to make sure I understand, we do the linear mapping for > performance (so we don''t have to keep remapping) but not necessarily > to save VA space since the linear mapping uses a fixed amount of > space. > > Is there any reason that we would strictly require a linear mapping > (other than it being convenient)?On 64b we could use the 1:1 mapping of all physmem that Xen has. Obviously that is infeasible on 32b. In fact the interface (passing a virtual address) pretty much means we have to use a linear mapping in both cases. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anthony Liguori
2006-Apr-26 18:15 UTC
Re: [Xen-devel] Regarding page table management changes from Xen v1to Xen v2 (and v3)
Ian Pratt wrote:>> In another example, mmapped access to a file, the new >> approach will incur these two extra faults for every page >> fault required to bring a file page to page cache, right? >> > > No, these singleton updates on the Linux demand fault path are issued > with the update_va_mapping hypercall. This is possible because the > virtual address that the pte maps is known, so its possible for Xen to > use a linear pagetable to do the update rather than creating an > on-demand mapping to the domain''s pagetable page. This is an important > optimization on 32b where Xen address space is tight. >Just to make sure I understand, we do the linear mapping for performance (so we don''t have to keep remapping) but not necessarily to save VA space since the linear mapping uses a fixed amount of space. Is there any reason that we would strictly require a linear mapping (other than it being convenient)? Thanks, Anthony Liguori> Ian > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anthony Liguori
2006-Apr-26 18:19 UTC
Re: [Xen-devel] Regarding page table management changes from Xen v1to Xen v2 (and v3)
Keir Fraser wrote:> > On 26 Apr 2006, at 19:15, Anthony Liguori wrote: > >>> No, these singleton updates on the Linux demand fault path are issued >>> with the update_va_mapping hypercall. This is possible because the >>> virtual address that the pte maps is known, so its possible for Xen to >>> use a linear pagetable to do the update rather than creating an >>> on-demand mapping to the domain''s pagetable page. This is an important >>> optimization on 32b where Xen address space is tight. >>> >> >> Just to make sure I understand, we do the linear mapping for >> performance (so we don''t have to keep remapping) but not necessarily >> to save VA space since the linear mapping uses a fixed amount of space. >> >> Is there any reason that we would strictly require a linear mapping >> (other than it being convenient)? > > On 64b we could use the 1:1 mapping of all physmem that Xen has. > Obviously that is infeasible on 32b. In fact the interface (passing a > virtual address) pretty much means we have to use a linear mapping in > both cases.Couldn''t we temporarily map the page table page? Not that we would actually want to do that. Just trying to confirm my understand. Regards, Anthony Liguori> -- Keir >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel