From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Suresh E. Warrier" Date: Tue, 02 Dec 2014 01:19:12 +0000 Subject: Re: [PATCH] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions Message-Id: <547D1390.6010808@linux.vnet.ibm.com> List-Id: References: <54653EBC.2020805@linux.vnet.ibm.com> <87r3wy6tp0.fsf@linux.vnet.ibm.com> <546DDA24.8040604@suse.de> <20141120090131.2d74176a@gandalf.local.home> In-Reply-To: <20141120090131.2d74176a@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Steven Rostedt , Alexander Graf Cc: "Aneesh Kumar K.V" , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Paul Mackerras On 11/20/2014 08:01 AM, Steven Rostedt wrote: > On Thu, 20 Nov 2014 13:10:12 +0100 > Alexander Graf wrote: > >> >> >> On 20.11.14 11:40, Aneesh Kumar K.V wrote: >>> "Suresh E. Warrier" writes: >>> >>>> This patch adds trace points in the guest entry and exit code and also >>>> for exceptions handled by the host in kernel mode - hypercalls and page >>>> faults. The new events are added to /sys/kernel/debug/tracing/events >>>> under a new subsystem called kvm_hv. >>> >>> ........ >>> >>>> /* Set this explicitly in case thread 0 doesn't have a vcpu */ >>>> @@ -1687,6 +1691,9 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc) >>>> >>>> vc->vcore_state = VCORE_RUNNING; >>>> preempt_disable(); >>>> + >>>> + trace_kvmppc_run_core(vc, 0); >>>> + >>>> spin_unlock(&vc->lock); >>> >>> Do we really want to call tracepoint with spin lock held ? Is that a good >>> thing to do ?. >> >> I thought it was safe to call tracepoints inside of spin lock regions? >> Steve? >> > > There's tracepoints in the guts of the scheduler where rq lock is held. > Don't worry about it. The tracing system is lockless. > Thanks for confirming. -suresh > -- Steve > From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Suresh E. Warrier" Subject: Re: [PATCH] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions Date: Mon, 01 Dec 2014 19:19:12 -0600 Message-ID: <547D1390.6010808@linux.vnet.ibm.com> References: <54653EBC.2020805@linux.vnet.ibm.com> <87r3wy6tp0.fsf@linux.vnet.ibm.com> <546DDA24.8040604@suse.de> <20141120090131.2d74176a@gandalf.local.home> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Aneesh Kumar K.V" , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Paul Mackerras To: Steven Rostedt , Alexander Graf Return-path: In-Reply-To: <20141120090131.2d74176a@gandalf.local.home> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 11/20/2014 08:01 AM, Steven Rostedt wrote: > On Thu, 20 Nov 2014 13:10:12 +0100 > Alexander Graf wrote: > >> >> >> On 20.11.14 11:40, Aneesh Kumar K.V wrote: >>> "Suresh E. Warrier" writes: >>> >>>> This patch adds trace points in the guest entry and exit code and also >>>> for exceptions handled by the host in kernel mode - hypercalls and page >>>> faults. The new events are added to /sys/kernel/debug/tracing/events >>>> under a new subsystem called kvm_hv. >>> >>> ........ >>> >>>> /* Set this explicitly in case thread 0 doesn't have a vcpu */ >>>> @@ -1687,6 +1691,9 @@ static void kvmppc_run_core(struct kvmppc_vcore *vc) >>>> >>>> vc->vcore_state = VCORE_RUNNING; >>>> preempt_disable(); >>>> + >>>> + trace_kvmppc_run_core(vc, 0); >>>> + >>>> spin_unlock(&vc->lock); >>> >>> Do we really want to call tracepoint with spin lock held ? Is that a good >>> thing to do ?. >> >> I thought it was safe to call tracepoints inside of spin lock regions? >> Steve? >> > > There's tracepoints in the guts of the scheduler where rq lock is held. > Don't worry about it. The tracing system is lockless. > Thanks for confirming. -suresh > -- Steve >