[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 04/11] grant_table: avoid unnecessary work during grant table unmapping



On April 19, 2016 2:46pm, Tian, Kevin <kevin.tian@xxxxxxxxx> wrote:
> > From: Quan Xu
> > Sent: Monday, April 18, 2016 10:00 PM
> >
> > While grant table is unmapping, the domain (with the exception of the
> 
> unmapping -> unmapped.
> 

A slightly different take, IMO the hypercall is not returned, so it is DOING.


> > hardware domain) may be crashed due to IOMMU mapping and unmapping
> > failures, and then it is unnecessary to flush specified CPUs' TLBs.
> 
> Above description is not complete. You said "with the exception of the
> hardware domain". Then people will ask whether 'unnecessary'
> is also true for hardware domain (if not restriction for hardware domain to
> invoke those interfaces).
> 

Make sense.
Could I only drop '(with the exception of the hardware domain)'?

> >
> > Signed-off-by: Quan Xu <quan.xu@xxxxxxxxx>
> >
> > CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> > CC: Jan Beulich <jbeulich@xxxxxxxx>
> > CC: Keir Fraser <keir@xxxxxxx>
> > CC: Tim Deegan <tim@xxxxxxx>
> > ---
> >  xen/common/grant_table.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index
> > 8b22299..1801fe9 100644
> > --- a/xen/common/grant_table.c
> > +++ b/xen/common/grant_table.c
> > @@ -1366,8 +1366,9 @@ gnttab_unmap_grant_ref(
> >
> >      return 0;
> >
> > -fault:
> > -    gnttab_flush_tlb(current->domain);
> > + fault:
> > +    if ( current->domain->is_shut_down )
> > +        gnttab_flush_tlb(current->domain);
> >
> >      for ( i = 0; i < partial_done; i++ )
> >          __gnttab_unmap_common_complete(&(common[i]));
> > @@ -1429,8 +1430,9 @@ gnttab_unmap_and_replace(
> >
> >      return 0;
> >
> > -fault:
> > -    gnttab_flush_tlb(current->domain);
> > + fault:
> > +    if ( current->domain->is_shut_down )
> > +        gnttab_flush_tlb(current->domain);
> >
> >      for ( i = 0; i < partial_done; i++ )
> >          __gnttab_unmap_common_complete(&(common[i]));
> > --
> > 1.9.1
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.