From: "Jan Beulich" Subject: Re: [PATCH v13 for-xen-4.5 11/21] x86/VPMU: Interface for setting PMU mode and flags Date: Tue, 14 Oct 2014 11:09:11 +0100 Message-ID: <543D1267020000780003EA51@mail.emea.novell.com> References: <1412372423-1182-1-git-send-email-boris.ostrovsky@oracle.com> <1412372423-1182-12-git-send-email-boris.ostrovsky@oracle.com> <543BF4F7020000780003E53F@mail.emea.novell.com> <543C20B6.9000103@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <543C20B6.9000103@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: kevin.tian@intel.com, keir@xen.org, suravee.suthikulpanit@amd.com, andrew.cooper3@citrix.com, tim@xen.org, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, jun.nakajima@intel.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 13.10.14 at 20:57, wrote: > On 10/13/2014 09:51 AM, Jan Beulich wrote: >> So this time round you don't retain any state between retries at all. >> How is this process expected to ever complete on a large and loaded >> enough system? > > Since we now leave completion of the mode change request to user we > can't guarantee that it will ever happen. So what is all this good for if there's no guarantee it would ever complete? > So if we were to keep the > state of who has passed through the context switch we'd have to prevent > VPMUs on those CPUs from being loaded again. We don't have such > mechanism now (unless we introduce a per-CPU VPMU mode which is not a > good idea imo). Or have a global "vPMU unusable" or "vPMU being turned off" state. > With continuations we could leave VPMU mode in new state and revert it > to old if continuations failed but with things left to user we can't do > this. > > This has been the case for the last few versions btw. You mean the user space invoked continuations? Yes, but v12 still had the retaining of some global state, so what you do now is yet another variant. Anyway - I don't think this can be left as is, and it's not really clear why you thought this would be better than the earlier variants. Jan