xl: insufficient ballooning when starting certain guests
Tools maintainers,
it looks as if changes in the memory requirements of the hypervisor have pushed things over the border of not working anymore when passing through a device and not sharing page tables (between VT-d and EPT, or unconditionally on AMD). Since this has always been a latent issue (as it's quite obvious that two sets of page tables require more memory than a single set) it should imo be fixed. The main issue (afaics) here is that the information about whether sharing is in use is not currently available to the tools (ignoring the awkward option of parsing the hypervisor log). Therefore the question is - should we extend XEN_SYSCTL_physinfo accordingly, or are there other suitable means to communicate such information which I'm not (immediately) aware of?
Thanks, Jan
Sorry for the late reply. This fell through the crack.
Quoted 6 lines · Jan Beulich
Tools maintainers,
it looks as if changes in the memory requirements of the hypervisor have pushed things over the border of not working anymore when passing through a device and not sharing page tables (between VT-d and EPT, or unconditionally on AMD). Since this has always been a
I think this is referring to a system-wide option, which presumably can be tuned by setting "sharept" command line option?
Quoted 9 lines
latent issue (as it's quite obvious that two sets of page tables require more memory than a single set) it should imo be fixed. The main issue (afaics) here is that the information about whether sharing is in use is not currently available to the tools (ignoring the awkward option of parsing the hypervisor log). Therefore the question is - should we extend
XEN_SYSCTL_physinfoaccordingly, or are there other suitable means to communicate such information which I'm not (immediately) aware of?
I'm not aware of other channel at the moment but I don't think physinfo is the right place.
Furthermore, with the understanding that you hope toolstack to set the limit properly (with SHADOW_OP_SET_ALLOCATION), passing back one bit of information doesn't help toolstack determine how much extra memory it needs. We might as well blindly increase the slack value in libxl (which is a bad idea IMHO).
Is there a way to pre-determine how much extra memory is needed for the non-shared case? If so, can it be done in toolstack alone?
What does the hypervisor do when PTs are shared but it still hits the boundary? I presume the current default value never triggers such situation?
Wei.
Quoted 1 line
Thanks, Jan
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 29.10.15 at 16:36, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich
it looks as if changes in the memory requirements of the hypervisor have pushed things over the border of not working anymore when passing through a device and not sharing page tables (between VT-d and EPT, or unconditionally on AMD). Since this has always been a
I think this is referring to a system-wide option, which presumably can be tuned by setting "sharept" command line option?
Yes. Hence the consideration to pass that information back via sysctl.
Quoted 12 lines
Quoted 8 lines
latent issue (as it's quite obvious that two sets of page tables require more memory than a single set) it should imo be fixed. The main issue (afaics) here is that the information about whether sharing is in use is not currently available to the tools (ignoring the awkward option of parsing the hypervisor log). Therefore the question is - should we extend
XEN_SYSCTL_physinfoaccordingly, or are there other suitable means to communicate such information which I'm not (immediately) aware of?I'm not aware of other channel at the moment but I don't think physinfo is the right place.
Quoted 8 lines
Furthermore, with the understanding that you hope toolstack to set the limit properly (with
SHADOW_OP_SET_ALLOCATION), passing back one bit of information doesn't help toolstack determine how much extra memory it needs. We might as well blindly increase the slack value in libxl (which is a bad idea IMHO).Is there a way to pre-determine how much extra memory is needed for the non-shared case? If so, can it be done in toolstack alone?
Doesn't the tool stack already estimate the amount of memory needed for shadow/hap page tables? In the non-shared case, and with a device assigned, it would just need to double the value.
Quoted 3 lines
What does the hypervisor do when PTs are shared but it still hits the boundary? I presume the current default value never triggers such situation?
Not sure what you mean here - we're talking about creating the guest, and the failure thereof due to not enough memory getting made available. If the tool stack estimate is appropriate, then we shouldn't run into an oom situation in the shared case (which is identical to the no-device-assigned one, i.e. it being wrong should be noticed reasonably quickly).
Jan
Quoted 30 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 29.10.15 at 16:36, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich
it looks as if changes in the memory requirements of the hypervisor have pushed things over the border of not working anymore when passing through a device and not sharing page tables (between VT-d and EPT, or unconditionally on AMD). Since this has always been a
I think this is referring to a system-wide option, which presumably can be tuned by setting "sharept" command line option?
Yes. Hence the consideration to pass that information back via sysctl.
Quoted 18 lines
Quoted 8 lines
latent issue (as it's quite obvious that two sets of page tables require more memory than a single set) it should imo be fixed. The main issue (afaics) here is that the information about whether sharing is in use is not currently available to the tools (ignoring the awkward option of parsing the hypervisor log). Therefore the question is - should we extend
XEN_SYSCTL_physinfoaccordingly, or are there other suitable means to communicate such information which I'm not (immediately) aware of?I'm not aware of other channel at the moment but I don't think physinfo is the right place.
Furthermore, with the understanding that you hope toolstack to set the limit properly (with
SHADOW_OP_SET_ALLOCATION), passing back one bit of information doesn't help toolstack determine how much extra memory it needs. We might as well blindly increase the slack value in libxl (which is a bad idea IMHO).
Quoted 5 lines
Quoted 2 lines
Is there a way to pre-determine how much extra memory is needed for the non-shared case? If so, can it be done in toolstack alone?
Doesn't the tool stack already estimate the amount of memory needed for shadow/hap page tables? In the non-shared case, and
Yes -- if admin doesn't specify a value.
Quoted 2 lines
with a device assigned, it would just need to double the value.
If it is as simple as doubling the estimated amount, one bit of information is enough.
Quoted 7 lines
Quoted 3 lines
What does the hypervisor do when PTs are shared but it still hits the boundary? I presume the current default value never triggers such situation?
Not sure what you mean here - we're talking about creating the guest, and the failure thereof due to not enough memory getting made available. If the tool stack estimate is appropriate, then we
Just to make sure we're one the same page, by "memory" you mean hap pool, right?
Quoted 4 lines
shouldn't run into an oom situation in the shared case (which is identical to the no-device-assigned one, i.e. it being wrong should be noticed reasonably quickly).
Right. I misunderstood. Ignore that question.
As for the channel for passing that bit of information to toolstack, I'm not sure about what to do. If sysctl needs to be stable we need to think a bit more about that. If not, I don't think we need to support stable interface for sysctl so I won't care too much how it's done actually.
Wei.
Quoted 1 line
Jan
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 29.10.15 at 18:01, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 29.10.15 at 16:36, <[email protected]> wrote:
What does the hypervisor do when PTs are shared but it still hits the boundary? I presume the current default value never triggers such situation?
Quoted 6 lines
Quoted 3 lines
Not sure what you mean here - we're talking about creating the guest, and the failure thereof due to not enough memory getting made available. If the tool stack estimate is appropriate, then we
Just to make sure we're one the same page, by "memory" you mean hap pool, right?
The IOMMU code doesn't actually allocate from that pool, i.e. the memory just needs to be available, but not added to the hap pool.
Quoted 4 lines
As for the channel for passing that bit of information to toolstack, I'm not sure about what to do. If sysctl needs to be stable we need to think a bit more about that. If not, I don't think we need to support stable interface for sysctl so I won't care too much how it's done actually.
No, sysctl (just like domctl) doesn't need to be stable.
Jan