Li, Xin B
2007-Aug-07 07:54 UTC
[Xen-devel] Why p2m allocation is from hap or shadow preallocated memory?
And can we make p2m memory allocation from domain heap directly? -Xin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2007-Aug-07 08:28 UTC
[Xen-devel] Re: Why p2m allocation is from hap or shadow preallocated memory?
Hi Xin, At 15:54 +0800 on 07 Aug (1186502042), Li, Xin B wrote:> And can we make p2m memory allocation from domain heap directly?We shouldn''t pull from the domheap directly because it''s not accounted for. This was a problem with the old shadow code, which just kept pulling un-owned pages from the domheap until it (or sometimes Xen) fell over. The shadow memory allocation is explicitly separate and can be accounted to the guest that''s using it and tracked by the tools. There are still a number of places, particularly in the HVM platform code, where unaccounted domheap memory is used for per-domain or per-vcpu structures, but at least they''re usually small (~1 page) and static (no need to allocate more at run-time and have domains blow up unpredictably, and reasonable confidence that domheap won''t drain away when we''re not looking). Tim. -- Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Li, Xin B
2007-Aug-07 08:43 UTC
[Xen-devel] RE: Why p2m allocation is from hap or shadow preallocated memory?
>Hi Xin, > >At 15:54 +0800 on 07 Aug (1186502042), Li, Xin B wrote: >> And can we make p2m memory allocation from domain heap directly? > >We shouldn''t pull from the domheap directly because it''s not accounted >for. This was a problem with the old shadow code, which just kept >pulling un-owned pages from the domheap until it (or sometimes >Xen) fell >over. The shadow memory allocation is explicitly separate and can be >accounted to the guest that''s using it and tracked by the tools.Then how about having a p2m preallocation pool seperately? -Xin> >There are still a number of places, particularly in the HVM platform >code, where unaccounted domheap memory is used for per-domain or >per-vcpu structures, but at least they''re usually small (~1 page) and >static (no need to allocate more at run-time and have domains blow up >unpredictably, and reasonable confidence that domheap won''t drain away >when we''re not looking). > >Tim. > >-- >Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited >Registered office c/o EC2Y 5EB, UK; company number 05334508 >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tim Deegan
2007-Aug-07 08:48 UTC
[Xen-devel] Re: Why p2m allocation is from hap or shadow preallocated memory?
At 16:43 +0800 on 07 Aug (1186505036), Li, Xin B wrote:> Then how about having a p2m preallocation pool seperately?Maybe, if that would help. What''s the problem you''re trying to solve? At the moment the only domains that have p2m maps managed for them are translated-mode ones, which already have a shadow or HAP pool for memory translation things; that seems like a reasonable place to draw p2m pages from. Tim. -- Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel