From: Andi Kleen <andi@firstfloor.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>,
npiggin@kernel.dk, tim.c.chen@intel.com
Subject: Re: [PATCH] VFS: Add VFS event counter infrastructure
Date: Sun, 22 May 2011 04:24:45 +0200 [thread overview]
Message-ID: <20110522022445.GU12317@one.firstfloor.org> (raw)
In-Reply-To: <20110522022126.GJ19987@ZenIV.linux.org.uk>
Any comments on where I placed the counters?
> > 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?
What do you mean? It's not mandatory of course.
I had it originally in /proc, but then moved it to debugfs.
>
> > + 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).
That's fine because debugfs_create_file is a noop then too
and fs isn't used anywhere else.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
prev parent reply other threads:[~2011-05-22 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-14 0:14 [PATCH] VFS: Add VFS event counter infrastructure Andi Kleen
2011-05-22 2:21 ` Al Viro
2011-05-22 2:24 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110522022445.GU12317@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=tim.c.chen@intel.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).