Messages in this thread | | | Date | Thu, 12 Jan 2006 09:38:16 -0800 | From | Greg KH <> | Subject | Re: [RFC] [PATCH] sysfs support for Xen attributes |
| |
On Thu, Jan 12, 2006 at 01:54:46PM +0100, Gerd Hoffmann wrote: > Hi, > > >>Huh? You can't just throw a "MODULE_VERSION()", and a module_init() > >>somewhere into the xen code to get this to happen? Then all of your > >>configurable paramaters show up automagically. > > > >No, I can't. Xen does not have modules. Xen loads and runs linux. > > You can. Just look at a recent drivers/xen/blkback/blkback.c, the > module parameters specified there show up in > /sys/module/blkback/parameters, no matter whenever the code was built > statically into the kernel or as module (which curently doesn't work for > blkback anyway ...). > > Any read-only attributes can trivially be implemented that way. Simple > writable stuff (balloon driver?) probably too, I don't know whenever a > notify callback on parameter changes is possible though.
Yes it is.
> The current /proc files which are not simple attributes such as > /proc/xen/{privcmd,xenbus} are a bit more tricky, not sure what the best > approach for these is. privcmd returns a filehandle which is then used > for ioctls (misc char dev maybe?). xenbus can be opened and (I think) > read(2) on to listen for any xenbus activity, much like /proc/kmsg. > Suggestions what to use here instead of procfs? Or just leave it there?
Your own filesystem? You can do that in about 200 lines of code these days :)
And no, it does not belong in procfs.
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |