WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>