[ofa-general] Re: [RFC] [PATCH 2/3] 2.6.22 or 23 ib/sa: add path record caching
Roland Dreier
rdreier at cisco.com
Wed Apr 25 10:16:51 PDT 2007
> > > +static struct miscdevice local_sa_misc = {
> > > + .minor = MISC_DYNAMIC_MINOR,
> > > + .name = "ib_local_sa",
> > > +};
> > I don't understand why you're registering a miscdevice etc. I don't
> > see any implementation of a character device or indeed any userspace
> > interface at all. So what's up here?
>
> The cache creates the following files:
>
> /sys/class/misc/ib_local_sa/paths_per_dest
> /sys/class/misc/ib_local_sa/refresh
> /sys/class/misc/ib_local_sa/lookup_method
That seems like an abuse of the miscdevice stuff, since you don't
actually have a device. Why not just use module parameters? The only
difference would be that the paths start /sys/module/ib_local_sa/parameters
instead. Or if you really wanted to, I guess a sysctl would be
appropriate. But I don't think creating a device you don't use just
to get a sysfs directory is a good idea.
More information about the general
mailing list