|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv6 3/5] gnttab: split grant table lock into table and maptrack locks
On 23/04/15 16:04, Jan Beulich wrote:
>
>> --- a/xen/include/xen/grant_table.h
>> +++ b/xen/include/xen/grant_table.h
>> @@ -82,7 +82,12 @@ struct grant_table {
>> struct grant_mapping **maptrack;
>> unsigned int maptrack_head;
>> unsigned int maptrack_limit;
>> - /* Lock protecting updates to active and shared grant tables. */
>> + /* Lock protecting the maptrack page list, head, and limit */
>> + spinlock_t maptrack_lock;
>> + /*
>> + * Lock protecting updates to grant table state (version, active
>> + * entry list, etc.)
>> + */
>> spinlock_t lock;
>
> If the patch still was to be applied, these two locks should be put
> on separate cache lines, to avoid unnecessary bouncing.
I was shuffling the fields around to make this happen and I ended up
shrinking the structure to fit it in a single cache line instead.
Shall I add some explicit padding to get the alignment you want? Note
that with the per-CPU maptrack free lists the maptrack lock isn't
heavily contended.
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |