[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 11:41, Jan Beulich wrote:
>>>> On 18.11.15 at 12:23, <malcolm.crossley@xxxxxxxxxx> wrote:
>> On 18/11/15 10:54, Jan Beulich wrote:
>>> That's not how I understood it, the rwlock isn't per-pCPU (at least not
>>> in what this patch does - it remains a per-domain one). The per-pCPU
>>> object is a pointer to an rwlock, which gets made point to whatever
>>> domain's rwlock the pCPU wants to own.
>>
>> This description is correct but it's important to note that the rwlock
>> is only used by the writers and could be effectively replaced with a 
>> spinlock.
> 
> While such replacement may indeed be possible (whether desirable
> is another question), I'm pretty sure I saw readers taking the read
> lock on the slow path.
> 

You are right, the core code currently relies upon rw locks. Conceptually it
may not need to but that's a different question as you state. Sorry for that
mistake.

Maybe it would be clearer if we created a percpu_rwlock_t which is really a
rwlock_t. This would prevent accidental usage of the underlying rwlock_t by
new grant table code.

Malcolm

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