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

Re: [Xen-devel] [PATCH v6 for Xen 4.7 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler



>>> On 09.03.16 at 17:10, <dario.faggioli@xxxxxxxxxx> 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.