Re: [PATCH v4 0/3] qspinlock: Introducing a 4-byte queue spinlock

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

 



On 02/18/2014 04:28 PM, Peter Zijlstra wrote:
On Tue, Feb 18, 2014 at 02:30:12PM -0500, Waiman Long wrote:
I will start looking at how to make it work with paravirt. Hopefully, it
won't take too long.
The cheap way out is to simply switch to the test-and-set spinlock on
whatever X86_FEATURE_ indicates a guest I suppose.

I don't think there is X86_FEATURE flag that indicates running in a guest. In fact, a guest should never find out if it is running virtualized.

After reading the current PV ticketlock implementation, I have a rough idea of what I need to do to implement PV support in qspinlock. A large portion of PV ticketlock code is find out the CPU number of the next one to get the lock. The current qspinlock implementation has already included CPU number of the previous member in the queue and it should be pretty easy to store CPU number of the next one in the queue node structure. These CPU numbers can then be supplied to the kick_cpu() function to schedule in the require the CPU to make sure that progress can be made.

I will try to implement this idea to see how thing work out.

-Longman
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux