[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables
> -----Original Message----- > From: Jan Beulich <jbeulich@xxxxxxxx> > Sent: 27 August 2019 08:49 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx> > Cc: 'JulienGrall' <julien.grall@xxxxxxx>; 'Alexandru Isaila' > <aisaila@xxxxxxxxxxxxxxx>; 'Petre > Pircalabu' <ppircalabu@xxxxxxxxxxxxxxx>; 'Razvan Cojocaru' > <rcojocaru@xxxxxxxxxxxxxxx>; Andrew Cooper > <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap <George.Dunlap@xxxxxxxxxx>; Ian > Jackson > <Ian.Jackson@xxxxxxxxxx>; Roger Pau Monne <roger.pau@xxxxxxxxxx>; > 'VolodymyrBabchuk' > <Volodymyr_Babchuk@xxxxxxxx>; 'Stefano Stabellini' <sstabellini@xxxxxxxxxx>; > 'xen- > devel@xxxxxxxxxxxxxxxxxxxx' <xen-devel@xxxxxxxxxxxxxxxxxxxx>; 'Konrad > Rzeszutek Wilk' > <konrad.wilk@xxxxxxxxxx>; 'Tamas K Lengyel' <tamas@xxxxxxxxxxxxx>; Tim > (Xen.org) <tim@xxxxxxx>; 'Wei > Liu' <wl@xxxxxxx> > Subject: Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of > IOMMU page tables > > On 14.08.2019 11:39, Paul Durrant wrote: > >> -----Original Message----- > >> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Paul > >> Durrant > >> Sent: 12 August 2019 17:26 > >> To: 'Jan Beulich' <jbeulich@xxxxxxxx> > >> Cc: 'Petre Pircalabu' <ppircalabu@xxxxxxxxxxxxxxx>; 'Stefano Stabellini' > >> <sstabellini@xxxxxxxxxx>; > >> 'Wei Liu' <wl@xxxxxxx>; 'Razvan Cojocaru' <rcojocaru@xxxxxxxxxxxxxxx>; > >> 'Konrad Rzeszutek Wilk' > >> <konrad.wilk@xxxxxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Tim > >> (Xen.org) <tim@xxxxxxx>; > >> George Dunlap <George.Dunlap@xxxxxxxxxx>; 'Julien Grall' > >> <julien.grall@xxxxxxx>; 'Tamas K Lengyel' > >> <tamas@xxxxxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; 'Alexandru > >> Isaila' > >> <aisaila@xxxxxxxxxxxxxxx>; 'xen-devel@xxxxxxxxxxxxxxxxxxxx' > >> <xen-devel@xxxxxxxxxxxxxxxxxxxx>; > >> 'VolodymyrBabchuk' <Volodymyr_Babchuk@xxxxxxxx>; Roger Pau Monne > >> <roger.pau@xxxxxxxxxx> > >> Subject: Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction > >> of IOMMU page tables > >> > >>> -----Original Message----- > >> [snip] > >>>> > >>>> On 30.07.2019 15:44, Paul Durrant wrote: > >>>>> NOTE: This patch will cause a small amount of extra resource to be used > >>>>> to accommodate IOMMU page tables that may never be used, since > >>>>> the > >>>>> per-domain IOMMU flag enable flag is currently set to the value > >>>>> of the global iommu_enable flag. A subsequent patch will add an > >>>>> option to the toolstack to allow it to be turned off if there is > >>>>> no intention to assign passthrough hardware to the domain. > >>>> > >>>> In particular if the default of this is going to be "true" (I > >>>> didn't look at that patch yet, but the wording above makes me > >>>> assume so), in auto-ballooning mode without shared page tables > >>>> more memory should imo be ballooned out of Dom0 now. It has > >>>> always been a bug that IOMMU page tables weren't accounted for, > >>>> but it would become even more prominent then. > >>> > >>> Ultimately, once the whole series is applied, then nothing much should > >>> change for those specifying > >>> passthrough h/w in an xl.cfg. The main difference will be that h/w cannot > >>> be passed through to a > >>> domain that was not originally created with IOMMU pagetables. > >>> With patches applied up to this point then, yes, every domain will get > >>> IOMMU page tables. I guess > >> I'll > >>> take a look at the auto-ballooning code and see what needs to be done. > >>> > >> > >> Ok, I've had a look... > >> > >> I could make a rough calculation in libxl_domain_need_memory() based on > >> the domain's max_memkb and > an > >> assumption of a 4 level translation with 512 PTEs per level, or would > >> prefer such guestimation to > be > >> overridable using an xl.cfg parameter in a broadly similar way to > >> shadow_memkb? > >> > > > > I think I'm going to say no to this anyway since, as you say, the overhead > > as never been accounted > for and having to make assumptions about the IOMMU table structure is not > very attractive. Given that > any issue is going to be transient (i.e. until patch #6 is committed) I don't > think fixing auto- > ballooning ought to be in scope for this series. > > I'm afraid I disagree: The series extends a pre-existing problem > affecting some guests to all ones (at least by default). TBH I've seen sufficient numbers of domain create failures when using auto-ballooning that I stopped using it some time ago (besides the fact that it's slow). If you're happy with the simplistic double-the-page-table-reservation calculation then I can add that but IMO it would be better to add another patch to just remove auto-ballooning. Paul > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |