From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
To: xen-devel@lists.xensource.com
Cc: Dave Hansen <haveblue@us.ibm.com>,
Keir Fraser <Keir.Fraser@cl.cam.ac.uk>, Greg KH <greg@kroah.com>,
lkml <linux-kernel@vger.kernel.org>,
"Mike D. Day" <ncmike@us.ibm.com>
Subject: Re: [Xen-devel] Re: [RFC] [PATCH] sysfs support for Xen attributes
Date: Thu, 12 Jan 2006 15:06:33 +0000 [thread overview]
Message-ID: <200601121506.34029.mark.williamson@cl.cam.ac.uk> (raw)
In-Reply-To: <1137078863.5397.15.camel@localhost.localdomain>
> > 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.
Cheers,
Mark
> > 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@lists.xensource.com
> 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!
next prev parent reply other threads:[~2006-01-12 15:19 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-11 17:17 Mike D. Day
2006-01-11 17:19 ` Arjan van de Ven
2006-01-11 17:56 ` Stephen Hemminger
2006-01-11 18:45 ` Dave Hansen
2006-01-11 23:07 ` Greg KH
2006-01-12 0:23 ` Mike D. Day
2006-01-12 0:57 ` Greg KH
2006-01-12 1:49 ` Mike D. Day
2006-01-12 2:17 ` [Xen-devel] " Mark Williamson
2006-01-12 7:10 ` Greg KH
2006-01-12 14:44 ` [Xen-devel] " Mike D. Day
2006-01-12 14:53 ` Mark Williamson
2006-01-12 15:42 ` Anthony Liguori
2006-01-12 15:57 ` Anthony Liguori
2006-01-12 17:34 ` Greg KH
2006-01-12 18:44 ` Anthony Liguori
2006-01-12 17:43 ` Greg KH
2006-01-12 9:10 ` Dave Hansen
2006-01-12 14:52 ` [Xen-devel] " Mike D. Day
2006-01-12 15:28 ` Dave Hansen
2006-01-12 15:50 ` Mike D. Day
2006-01-12 12:54 ` Gerd Hoffmann
2006-01-12 13:21 ` Arjan van de Ven
2006-01-12 14:42 ` Gerd Hoffmann
2006-01-12 17:39 ` Greg KH
2006-01-12 18:53 ` Anthony Liguori
2006-01-12 18:55 ` Arjan van de Ven
2006-01-12 18:59 ` Anthony Liguori
2006-01-12 19:11 ` Mike D. Day
2006-01-12 19:31 ` Greg KH
2006-01-12 19:08 ` Greg KH
2006-01-12 19:18 ` Mike D. Day
2006-01-12 19:30 ` Greg KH
2006-01-12 17:38 ` Greg KH
2006-01-12 1:32 ` Dave Hansen
2006-01-12 10:04 ` [Xen-devel] " Keir Fraser
2006-01-12 15:14 ` Dave Hansen
2006-01-12 15:06 ` Mark Williamson [this message]
2006-01-12 15:26 ` Keir Fraser
2006-01-12 15:37 ` Dave Hansen
2006-01-12 15:49 ` Anthony Liguori
2006-01-11 23:31 ` Pavel Machek
2006-01-12 19:01 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601121506.34029.mark.williamson@cl.cam.ac.uk \
--to=mark.williamson@cl.cam.ac.uk \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=greg@kroah.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncmike@us.ibm.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®