Re: [PATCH 3/6] 2.6.16-rc1 perfmon2 patch for review

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

 



Bryan,

On Fri, Jan 20, 2006 at 08:47:24AM -0800, Bryan O'Sullivan wrote:
> On Fri, 2006-01-20 at 07:20 -0800, Stephane Eranian wrote:
> 
> > +static struct pfm_smpl_fmt dfl_fmt={
> > + 	.fmt_name = "default_format2",
> > + 	.fmt_uuid = PFM_DFL_SMPL_UUID,
> 
> What's the point of using a UUID here?
> 

Every sampling buffer format, even the default, needs a name. 
Not all measurements need a kernel level sampling buffer. In that
case they pass the NULL uuid (uuid = all zeroes).

> > +static struct file_system_type pfm_fs_type = {
> > +	.name     = "pfmfs",
> > +	.get_sb   = pfmfs_get_sb,
> > +	.kill_sb  = kill_anon_super,
> > +};
> 
> A comment that describes what pfmfs is for would be useful here, and
> perhaps a warning to hold one's nose, if the code that follows is
> anything to go by :-)
> 
Yes, this is sort of obscure. But any file descriptor must be associated
with a filesystem (and super block). This creates the minimum skeleton
for such filesystem. The same technique is used for pipes, tmpfs,...


> > +static ctl_table pfm_ctl_table[]={
> 
> Why are you using sysctls, and not sysfs?  Why is this in a file that
> claims to be procfs-related?
> 
Because I tried regrouping all the /proc AND related interface into a single
C file.

> Also, it looks like much of the procfs goo is actually not related to
> individual processes, really doesn't belong in /proc at all, and should
> move to some place in sysfs somewhere.
> 
Well, it is not clear to me what criteria is used for /sys vs /proc. Yours
is based on whether the information is process or system-wide based. That 
looks reasonable, yet I can see evidence of just the opposite in /proc
today, such as /proc/meminfo. Is this maintained because of backward compatibility?

-- 

-Stephane
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux