[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Linux spin lock enhancement on xen
Wow, I totally missed this thread. A couple of thoughts; Complicated solutions for the scheduler are a really bad idea. It's hard enough to predict and debug the side-effects of simple mechanisms; a complex mechanism is doomed to failure at the outset. I agree with Jeremy, that the guest shouldn't tell Xen to run a specific VCPU. At most it should be something along the lines of, "If you're going to run any vcpu from this domain, please run vcpu X." Jeremy, do you think that changes to the HV are necessary, or do you think that the existing solution is sufficient? It seems to me like hinting to the HV to do a directed yield makes more sense than making the same thing happen via blocking and event channels. OTOH, that gives the guest a lot more control over when and how things happen. Mukesh, did you see the patch by Xiantao Zhang a few days ago, regarding what to do on an HVM pause instruction? I thought the solution he had was interesting: when yielding due to a spinlock, rather than going to the back of the queue, just go behind one person. I think an impleentation of "yield_to" that might make sense in the credit scheduler is: * Put the yielding vcpu behind one cpu * If the yield-to vcpu is not running, pull it to the front within its priority. (I.e., if it's UNDER, put it at the front so it runs next; if it's OVER, make it the first OVER cpu.) Thoughts? -George On Wed, Aug 18, 2010 at 6:09 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote: > On 18/08/2010 17:37, "Jeremy Fitzhardinge" <jeremy@xxxxxxxx> wrote: > >> I don't see why the guest should micromanage Xen's scheduler decisions. >> If a VCPU is waiting for another VCPU and can put itself to sleep in the >> meantime, then its up to Xen to take advantage of that newly freed PCPU >> to schedule something. It may decide to run something in your domain >> that's runnable, or it may decide to run something else. There's no >> reason why the spinlock holder is the best VCPU to run overall, or even >> the best VCPU in your domain. >> >> My view is you should just put any VCPU which has nothing to do to >> sleep, and let Xen sort out the scheduling of the remainder. > > Yeah, I'm no fan of yield or yield-to type operations. I'd reserve the right > to implement both of them as no-op. > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |