From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH for Xen 4.5 v2 2/2] xen: serialize vcpu data in sched_rt.c Date: Mon, 10 Nov 2014 16:15:22 +0000 Message-ID: <5460E49A.5020000@eu.citrix.com> References: <1414246599-3914-1-git-send-email-mengxu@cis.upenn.edu> <1414246599-3914-3-git-send-email-mengxu@cis.upenn.edu> <5460B550.9000306@eu.citrix.com> <5460DC65.8000909@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4251999889006703399==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Meng Xu Cc: Ian Campbell , Stefano Stabellini , Dario Faggioli , Ian Jackson , "xen-devel@lists.xen.org" , Meng Xu , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============4251999889006703399== Content-Type: multipart/alternative; boundary="------------020706070507000705090901" --------------020706070507000705090901 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Length: 1300 Content-Transfer-Encoding: quoted-printable On 11/10/2014 04:04 PM, Meng Xu wrote: > > > 2014-11-10 10:40 GMT-05:00 George Dunlap >: > > 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 >> >: >> >> 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 =E2=80=8Brt_update_deadline is >> called in rt_alloc_vdata function, which may cause race condition. > > Can you not grab the lock in rt_alloc_vdata=3F > > > =E2=80=8BYes. 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.=E2=80=8B Right, well that's important information to help someone reading the patch understand what's going on. Thanks for being flexible. :-) -George --------------020706070507000705090901 Content-Type: text/html; charset="utf-8" Content-Length: 4598 Content-Transfer-Encoding: quoted-printable
On 11/10/2014 04:04 PM, Meng Xu wrote:


2014-11-10 10:40 GMT-05:00 George Dunlap <george.dunlap@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.=C2=A0

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

2014-11-10 7:53 GMT-05:00 George Dunlap <george.dunlap@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 =C2=A0=E2=80=8Brt_update_deadline is called in=C2=A0rt_alloc_vdata function, which may cause race condition.

Can you not grab the lock in rt_alloc_vdata=3F=C2=A0

=E2=80=8BYes. 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.=E2=80=8B

Right, well that's important information to help someone reading the patch understand what's going on.

Thanks for being flexible. :-)

=C2=A0-George

--------------020706070507000705090901-- --===============4251999889006703399== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4251999889006703399==--