>>> On 09.03.16 at 17:10, <dario.faggi...@citrix.com> wrote:
> On Tue, 2016-03-08 at 19:09 +0000, Wei Liu wrote:
>> On Sun, Mar 06, 2016 at 11:55:55AM -0600, Chong Li wrote:
>> 
>> > +            spin_lock_irqsave(&prv->lock, flags);
>> > +            svc = rt_vcpu(d->vcpu[local_sched.vcpuid]);
>> > +            svc->period = period;
>> > +            svc->budget = budget;
>> > +            spin_unlock_irqrestore(&prv->lock, flags);
>> > +
>> And this locking pattern seems sub-optimal. You might be able to move
>> the lock and unlock outside the while loop?
>> 
> Yes, unless I'm missing something, that looks possible to me, and would
> save a lot of acquire/release ping pong on the lock.

Well, there are guest memory accesses (which may fault) in the
loop body. While this may work right now, I don't think doing so
is a good idea.

> And yet, I'm not sure doing (for large guests) batches of 64 iterations
> with (as of now) interrupts disabled.

This I'd be much less worried about as long as what's inside the
loop body was a reasonably short code sequence.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to