Re: [PATCH] VFS: Add VFS event counter infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux