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

Re: [Xen-devel] [PATCH for Xen 4.5 v2 2/2] xen: serialize vcpu data in sched_rt.c





2014-11-10 10:40 GMT-05:00 George Dunlap <george.dunlap@xxxxxxxxxxxxx>:
On 11/10/2014 03:29 PM, Meng Xu wrote:
I'm not sure if I should resend the patch just to change the commit log and add the reason of why doing this.Â

I want to first add the reason. If I should resend the patch set, please let me know.Â

2014-11-10 7:53 GMT-05:00 George Dunlap <george.dunlap@xxxxxxxxxxxxx>:
On 10/25/2014 03:16 PM, Meng Xu wrote:
Move call to rt_update_deadline from _alloc to _insert;

The runq queue lock is not grabbed when Âârt_update_deadline is called inÂrt_alloc_vdata function, which may cause race condition.

Can you not grab the lock in rt_alloc_vdata?Â

âYes. Because when we allocate a rt_vcpu, only one cpu will do that. In addition, before the rt_vcpu is inserted into the runq, we won't have more than one cpu operate on this rt_vcpu.â

Â
Or do you think it's just more efficient to do all the work you need all at once?

âI think âthe efficiency should be same. Actually, if we don't insert the rt_vcpu into a runq, we don't need the vcpu's deadline information because the rt_vcpu is not scheduled by the rtds scheduler. So I think updating the deadline info when we insert the rt_vcpu into the runq should make more sense.Â

Thanks,

Meng


(I'm not suggesting a change to the code, I'm just trying to clarify the motivation for moving the code rather than adding a lock.)â

Â


Â-George




--


-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
_______________________________________________
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®.