From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V4 4/5] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor Date: Mon, 16 Jan 2012 19:43:54 +0530 Message-ID: <4F1430A2.1080401@linux.vnet.ibm.com> References: <20120114182501.8604.68416.sendpatchset@oc5400248562.ibm.com> <20120114182645.8604.68884.sendpatchset@oc5400248562.ibm.com> <4F13E84C.3010808@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F13E84C.3010808@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Avi Kivity Cc: Jeremy Fitzhardinge , Greg Kroah-Hartman , linux-doc@vger.kernel.org, Peter Zijlstra , Jan Kiszka , Virtualization , Paul Mackerras , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , KVM , Glauber Costa , X86 , Ingo Molnar , Rik van Riel , Konrad Rzeszutek Wilk , Srivatsa Vaddagiri , Sasha Levin , Sedat Dilek , Thomas Gleixner , LKML , Dave Hansen , Suzuki List-Id: virtualization@lists.linuxfoundation.org On 01/16/2012 02:35 PM, Avi Kivity wrote: > On 01/14/2012 08:26 PM, Raghavendra K T wrote: >> Extends Linux guest running on KVM hypervisor to support pv-ticketlocks. >> >> During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has >> required feature (KVM_FEATURE_PVLOCK_KICK) to support pv-ticketlocks. If so, >> support for pv-ticketlocks is registered via pv_lock_ops. >> >> Use KVM_HC_KICK_CPU hypercall to wakeup waiting/halted vcpu. >> + >> + debugfs_create_u8("zero_stats", 0644, d_spin_debug,&zero_stats); >> + >> + debugfs_create_u32("taken_slow", 0444, d_spin_debug, >> + &spinlock_stats.contention_stats[TAKEN_SLOW]); >> + debugfs_create_u32("taken_slow_pickup", 0444, d_spin_debug, >> + &spinlock_stats.contention_stats[TAKEN_SLOW_PICKUP]); >> + >> + debugfs_create_u32("released_slow", 0444, d_spin_debug, >> + &spinlock_stats.contention_stats[RELEASED_SLOW]); >> + debugfs_create_u32("released_slow_kicked", 0444, d_spin_debug, >> + &spinlock_stats.contention_stats[RELEASED_SLOW_KICKED]); >> + >> + debugfs_create_u64("time_blocked", 0444, d_spin_debug, >> + &spinlock_stats.time_blocked); >> + >> + debugfs_create_u32_array("histo_blocked", 0444, d_spin_debug, >> + spinlock_stats.histo_spin_blocked, HISTO_BUCKETS + 1); >> + >> > > Please drop all of these and replace with tracepoints in the appropriate > spots. Everything else (including the historgram) can be reconstructed > the tracepoints in userspace. > I think Jeremy pointed that tracepoints use spinlocks and hence debugfs is the option.. no ?