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/
Home Products Support Community News


Re: [Xen-devel] Re: [RFC] [PATCH] sysfs support for Xen attributes

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: [RFC] [PATCH] sysfs support for Xen attributes
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Thu, 12 Jan 2006 15:06:33 +0000
Cc: Greg KH <greg@xxxxxxxxx>, Dave Hansen <haveblue@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "Mike D. Day" <ncmike@xxxxxxxxxx>
Delivery-date: Thu, 12 Jan 2006 15:25:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1137078863.5397.15.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <43C53DA0.60704@xxxxxxxxxx> <00466d4b0eb7fe1603cd7f54448d37ff@xxxxxxxxxxxx> <1137078863.5397.15.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
> > This is a good set of questions. We have about half dozen files in
> > /proc/xen right now. One is an obvious canididate to stick in /dev, as
> > it has primarily an ioctl() interface.
> Actually, anything with an ioctl interface is probably a good cantidate
> for a writable sysfs file.  The basic idea is that we prefer something
> in sysfs with a discrete, unique name.  It also makes it a lot easier to
> develop with because you can look at the values from scripts, and you
> don't have to worry about synchronizing any headers.
> So, what kind of ioctls are we talking about?

The privcmd ioctl()s are used for userspace to invoke the Xen hypercalls for 
management operations, they generally pass through an mlock'ed struct 
describing the operation, for inspection by the hypervisor's management code.  
I'd describe it as more like a "hypercall device" than anything else.


> > The remainder are static, are
> > read-only or read-write with ascii text, and we don't want hotplug
> > events and other baggage.
> There really isn't much "baggage" that a static file carries around.
> All you have to do is omit filling in a function pointer.  Hotplug
> events are one of those "for free" things that you get.
> > Maybe making these attributes of a Xen system device makes sense. Are
> > there examples in the kernel of other subsystems/modules with a similar
> > miscellaneous set of files?
> drivers/base/memory.c has a couple of little things.  A writable probe
> file, and a somewhat miscellaneous file for representing the units that
> are being dealt with.  Might be a place to start.  I can certainly
> answer questions about it.  I would also suggest just doing a "find" or
> "tree" on a few of your systems and looking for people that do similar
> things to what you want.
> I know I struggled to get the memory hotplug sysfs code to work at
> first, but the code has been very, very low maintenance.
> -- Dave
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

Xen-devel mailing list

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