lkml.org 
[lkml]   [2011]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] VFS: Add VFS event counter infrastructure
On Fri, May 13, 2011 at 05:14:12PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> The recently discovered problem with RCU walks not working for absolute path
> motivated me to add some counters for these events to the VFS. Networking
> and VM has had such counters for a long time and they were always useful
> to diagnose performance problems. An advantage of counters over tracepoints
> is that they are always collected and are low enough overhead that
> they can be always enabled (unlike tracing)
>
> This patch implements a simple per CPU counter framework for the VFS.
> The counters are per CPU and are very little overhead. The counters
> are output in debugfs (/sys/kernel/fs/vfsstat)

WTF? Since when had debugfs become mandatory?

> + fs = debugfs_create_dir("fs", NULL);
> + if (fs)
> + debugfs_create_file("vfsstat", 0444, fs, NULL, &vfsstat_fops);
> + return 0;

Note that if that FPOS is configured away debugfs_create_dir() does _NOT_
return NULL - you get ERR_PTR(-ENODEV).


\
 
 \ /
  Last update: 2011-05-22 04:25    [W:0.028 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site