2014-11-10 10:40 GMT-05:00 George Dunlap <george.dun...@eu.citrix.com>:
> 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.dun...@eu.citrix.com>: > >> 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@lists.xen.org http://lists.xen.org/xen-devel