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

Re: [Xen-devel] [PATCH 2/2] grant_table: convert grant table rwlock to percpu rwlock



>>> On 18.11.15 at 14:08, <malcolm.crossley@xxxxxxxxxx> wrote:
> On 18/11/15 12:07, Ian Campbell wrote:
>> (Maybe I should have said "like a bit lock with 32 or 64 bits, setting any
>> of which corresponds to acquiring the lock" ;-))
>> 
> Not quite, setting the per cpu read area "takes" the read lock for the 
> particular
> resource you passed into the percpu rwlock implementation. Writers of another 
> resource
> ($resource1) will safely ignore readers of ($resource0).
> 
> The global barrier will however make _all_ readers take the per-$resource 
> read lock.
> An optimisation could be to have a barrier variable per-$resource (stored in 
> the
> struct grant_table in this case).

As said before, I don't view this as an optimization, but as a requirement
(to eliminate the nesting restriction).

Jan


_______________________________________________
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®.