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

Re: [Xen-devel] [PATCH] xen/mm.h: add helper function to test-and-clear _PGC_allocated



> -----Original Message-----
> From: Jan Beulich <JBeulich@xxxxxxxx>
> Sent: 15 July 2019 10:18
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: JulienGrall <julien.grall@xxxxxxx>; Andrew Cooper 
> <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap
> <George.Dunlap@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Roger Pau 
> Monne
> <roger.pau@xxxxxxxxxx>; Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>; 
> Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; 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] xen/mm.h: add helper function to 
> test-and-clear _PGC_allocated
> 
> On 15.07.2019 10:45, Paul Durrant wrote:
> >> From: Jan Beulich <JBeulich@xxxxxxxx>
> >> Sent: 10 July 2019 23:53
> >>
> >> On 10.07.2019 18:17, Paul Durrant wrote:
> >>> @@ -418,13 +417,7 @@ static void hvm_free_ioreq_mfn(struct 
> >>> hvm_ioreq_server *s, bool buf)
> >>>        unmap_domain_page_global(iorp->va);
> >>>        iorp->va = NULL;
> >>>
> >>> -    /*
> >>> -     * Check whether we need to clear the allocation reference before
> >>> -     * dropping the explicit references taken by get_page_and_type().
> >>> -     */
> >>> -    if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
> >>> -        put_page(page);
> >>> -
> >>> +    clear_assignment_reference(page);
> >>>        put_page_and_type(page);
> >>>    }
> >>
> >> Is there a specific reason you drop the comment? It doesn't become
> >> less relevant than when it was added, does it?
> >
> > Not sure, since what's actually going on is now internal to the function.
> > If I change the function name to clear_allocation_reference() then I
> > think the comment probably becomes extraneous.
> 
> Well, the perspective I'm taking is that the ordering constraint
> wrt put_page_and_type() doesn't go away and is a relevant part of
> what the comment talks about.

Ok. Would you be happy fixing the comment to your taste on commit then, as I'm 
not sure exactly what you want to say?

  Paul

> 
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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