On Thu, Nov 05, 2015 at 11:29:29AM -0500, Waiman Long wrote:
On 11/02/2015 11:40 AM, Peter Zijlstra wrote:Yep.
On Fri, Oct 30, 2015 at 07:26:35PM -0400, Waiman Long wrote:I was not aware of that capability. So you mean using debugfs_create_file()
This patch enables the accumulation of kicking and waiting relatedWhy did you switch to sysfs? You can create custom debugfs files too.
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.
using custom file_operations. Right?
That doesn't seem to be easier thanMostly I just wanted to point out that it was possible; you need not
using sysfs. However, I can use that if you think it is better to use
debugfs.
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?