Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162303AbbKEQn1 (ORCPT ); Thu, 5 Nov 2015 11:43:27 -0500 Received: from casper.infradead.org ([85.118.1.10]:59676 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161598AbbKEQnZ (ORCPT ); Thu, 5 Nov 2015 11:43:25 -0500 Date: Thu, 5 Nov 2015 17:43:22 +0100 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Scott J Norton , Douglas Hatch , Davidlohr Bueso Subject: Re: [PATCH tip/locking/core v9 4/6] locking/pvqspinlock: Collect slowpath lock statistics Message-ID: <20151105164322.GH3604@twins.programming.kicks-ass.net> References: <1446247597-61863-1-git-send-email-Waiman.Long@hpe.com> <1446247597-61863-5-git-send-email-Waiman.Long@hpe.com> <20151102164040.GV3604@twins.programming.kicks-ass.net> <563B83E9.60909@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <563B83E9.60909@hpe.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 36 On Thu, Nov 05, 2015 at 11:29:29AM -0500, Waiman Long wrote: > On 11/02/2015 11:40 AM, Peter Zijlstra wrote: > >On Fri, Oct 30, 2015 at 07:26:35PM -0400, Waiman Long wrote: > >>This patch enables the accumulation of kicking and waiting related > >>PV qspinlock statistics when the new QUEUED_LOCK_STAT configuration > >>option is selected. It also enables the collection of data which > >>enable us to calculate the kicking and wakeup latencies which have > >>a heavy dependency on the CPUs being used. > >> > >>The statistical counters are per-cpu variables to minimize the > >>performance overhead in their updates. These counters are exported > >>via the sysfs filesystem under the /sys/kernel/qlockstat directory. > >>When the corresponding sysfs files are read, summation and computing > >>of the required data are then performed. > >Why did you switch to sysfs? You can create custom debugfs files too. > > I was not aware of that capability. So you mean using debugfs_create_file() > using custom file_operations. Right? Yep. > That doesn't seem to be easier than > using sysfs. However, I can use that if you think it is better to use > debugfs. Mostly I just wanted to point out that it was possible; you need not change to sysfs because debugfs lacks the capability. But now that you ask, I think debugfs might be the better place, such statistics (and the proposed CONFIG symbol) are purely for debug purposes, right? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/