From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tian, Kevin" Subject: Re: [PATCH v10 11/20] x86/VPMU: Interface for setting PMU mode and flags Date: Mon, 22 Sep 2014 22:29:12 +0000 Message-ID: References: <1409802080-6160-1-git-send-email-boris.ostrovsky@oracle.com> <1409802080-6160-12-git-send-email-boris.ostrovsky@oracle.com> <541B53BE.4000909@oracle.com> <541BEE9202000078000366AE@mail.emea.novell.com> <541C24C0.9070002@oracle.com> <541C4B99020000780003685A@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <541C4B99020000780003685A@mail.emea.novell.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Boris Ostrovsky Cc: "tim@xen.org" , "keir@xen.org" , "suravee.suthikulpanit@amd.com" , "andrew.cooper3@citrix.com" , "Dong, Eddie" , "xen-devel@lists.xen.org" , "Aravind.Gopalakrishnan@amd.com" , "Nakajima, Jun" List-Id: xen-devel@lists.xenproject.org > From: Jan Beulich [mailto:JBeulich@suse.com] > Sent: Friday, September 19, 2014 6:28 AM > > >>> On 19.09.14 at 14:42, wrote: > > On 09/19/2014 02:51 AM, Jan Beulich wrote: > >>>>> On 18.09.14 at 23:50, wrote: > >>> On 09/18/2014 12:11 AM, Tian, Kevin wrote: > >>>>> From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com] > >>>>> +{ > >>>>> + unsigned i, j, allbutself_num, tasknum, mycpu; > >>>>> + static s_time_t start; > >>>>> + static struct tasklet **sync_task; > >>>>> + struct vcpu *curr_vcpu = current; > >>>>> + static struct vcpu *sync_vcpu; > >>>>> + int ret = 0; > >>>>> + > >>>>> + tasknum = allbutself_num = num_online_cpus() - 1; > >>>>> + > >>>>> + if ( sync_task ) /* if set, we are in hypercall continuation */ > >>>>> + { > >>>>> + if ( (sync_vcpu != NULL) && (sync_vcpu != curr_vcpu) ) > >>>>> + /* We are not the original caller */ > >>>>> + return -EAGAIN; > >>>> I assume hypercall continuation will happen on original vcpu context. > Under > >>>> which situation the hypercall will be continued on a different vcpu? If > yes, > >>>> would it be an unbounded situation where you may wait unexpected time > >>>> to have sync_vcpu==curr_vcpu? > >>> The continuation call is gone in v11. If we are stuck waiting for more > >>> than 5 seconds we'll simply return -EAGAIN and have the caller retry. > >> That reads wrong, but I'd of course have to see whether the just > >> wording above is incorrectly reflecting the code changes you did. > > > > The only thing that I can think of that I didn't mention is > > hypercall_preempt_check() to bail out earlier than 5 seconds. Is that > > what you are missing in my reply? Otherwise I don't know what else is > > wrong. > > Yes, that indeed was the missing piece. > Is v11 out or not? I didn't find it in my inbox. Thanks Kevin