From: Anthony Liguori <aliguori@us.ibm.com>
To: "Mike D. Day" <ncmike@us.ibm.com>
Cc: Greg KH <greg@kroah.com>,
xen-devel@lists.xensource.com,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] Re: [RFC] [PATCH] sysfs support for Xen attributes
Date: Thu, 12 Jan 2006 09:57:50 -0600 [thread overview]
Message-ID: <43C67C7E.3070909@us.ibm.com> (raw)
In-Reply-To: <43C66B56.8030801@us.ibm.com>
Mike D. Day wrote:
> Greg KH wrote:
>
>> What other, specific sysfs files are you going to want to create?
>> What is the hierarchy going to look like?
>> What is the contents of the file going to look like?
>
>
> You make a very good point. We have not agreed on the heirarchy and
> file contents, and we need to do so before continuing.
> Some _very rough_ ideas include
>
> /sys/xen/version/{major minor extra version build}
> /sys/xen/domain/{dom0 dom1 ... domn} (each domain could be a dir. with
> attributes)
I don't think we want to expose domain specific information in sysfs.
Right now, domain lifecycle events are managed in userspace so
maintaining the kobject hierarchy here would be awkward at best.
> /sys/xen/hypervisor/{scheduler cpu memory}
> /sys/xen/migrate/{hosts_to, hosts_from}
Same thing as above with migration. Let's try to focus on the minimum
set of things we need to expose that we cannot expose else where. There
are other options (like FUSE) for providing a general filesystem
management interface that we can do entirely in userspace.
I think Gerd mentioned earlier that ballooning can be exposed via the
module interface--that's probably a good idea. The ioctl() interfaces
should probably be misc char drivers (especially since /dev/evtchn is
already).
Here's a list of the remaining things we current expose in /proc/xen
that have no obvious place:
1) capabilities (is the domain a management domain)
2) xsd_mfn (a frame number for our bus so that userspace can connect to it)
3) xsd_evtchn (a virtual IRQ for xen bus for userspace)
I would think these would most obviously go under something like:
/sys/hypervisor/xen/
That would introduce a hypervisor subsystem. There are at least a few
hypervisors out there already so this isn't that bad of an idea
(although perhaps it may belong somewhere else in the hierarchy). Greg?
Regards,
Anthony Liguori
> These will be text files with simple attrributes. Most will be
> read-only. It is kind of fun to think about creating a domain by doing
> something like
>
> cat $domain_config > /sys/xen/domain/new
>
> but there are some ugly aspects of doing so. Likewise it would be good
> to add a potential migration host by writing an ip address to
> /sys/xen/migrate/hosts_to
>
> Again, we need to get this solidified before going further.
>
>>
>> I think this is happening as you are trying to port your code that
>> currently uses /proc (and file names there) to use sysfs instead, right?
>> To do this correctly, you need to stop thinking about file names and
>> paths, and start thinking about the hierarchy and relationship between
>> the files, which will allow you to create a tree of kobjects easier.
>
>
> yes
>
>> If you answer the questions above, I think we can work to figure this
>> out.
>
>
> Excellent, we will work on doing so.
>
>> I should be happy you didn't try to post them using Notes :)
>
>
> Make that two of us :)
next prev parent reply other threads:[~2006-01-12 15:57 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-11 17:17 [RFC] [PATCH] sysfs support for Xen attributes 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 [this message]
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
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=43C67C7E.3070909@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=greg@kroah.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