lkml.org 
[lkml]   [2016]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] locking/osq: Drop the overload of osq lock
On Sun, Jun 26, 2016 at 01:27:56AM +0800, panxinhui wrote:
> >> Would that not have issues where the owner cpu is kept running but the
> >> spinner (ie. _this_ vcpu) gets preempted? I would think that in that
> >> case we too want to stop spinning.
> >>
> >
> do you mean that the spinner detect itself had yield out during the
> big spin loop?
>
> It is very possible to happen. BUT if spinner(on this vcpu) yield
> out, the next spinner would break the spin loop. AND if spinner
> detect itself yield out once, it’s very possible to get the osq lock
> soon as long as the ower vcpu is running.
>
> SO I think we need just check the owner vcpu’s yield_count.

I had a quick look at KVM and it looks like it only has
kvm_cpu::preempted, which would suggest the interface boqun proposed.

We'll have to look at many of the other virt platforms as well to see
what they can do.

We could also provide _both_ interfaces and a platform can implement
whichever variant (or both) it can.

\
 
 \ /
  Last update: 2016-06-25 22:01    [W:2.217 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site