From: Greg KH <greg@kroah.com>
To: "Mike D. Day" <ncmike@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>, xen-devel@lists.xensource.com
Subject: Re: [RFC] [PATCH] sysfs support for Xen attributes
Date: Wed, 11 Jan 2006 16:57:10 -0800 [thread overview]
Message-ID: <20060112005710.GA2936@kroah.com> (raw)
In-Reply-To: <43C5A199.1080708@us.ibm.com>
On Wed, Jan 11, 2006 at 07:23:53PM -0500, Mike D. Day wrote:
> Greg KH wrote:
>
> >Why is xen special from the rest of the kernel in regards to adding
> >files to sysfs? What does your infrastructure add that is not currently
> >already present for everyone to use today?
>
> I think it comes down to simplification for non-driver code, which is
> admittedly not the mainstream use model for sysfs.
/sys/module/ is a pretty "mainstream use model for sysfs", right?
> >Why is the xen version any different from any other module or driver
> >version in the kernel? (hint, use the interface that is availble for
> >this already...)
>
> The module version? Xen is not a module nor a driver, so that interface
> doesn't quite serve the purpose.
Then it doesn't need a separate version, as it is the same as the main
kernel version, right? Just because your code is out-of-the-tree right
now, doesn't mean it will be that way forever (although based on the
lack of patches to alieve this, it might be...)
> True, one could create a "Xen module" that talks to Xen the
> hypervisor, but then the version interface would provide the version
> of the xen module, not the version of the xen hypervisor.
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.
> /sys/xen/version may not be the best example for this discussion. What
> is important is that this attribute is obtained from Xen using a
> hypercall. Sysfs works great to prove the xen version and other
> similar xen attributes to userspace.
Like what? Specifics please.
> >You have access to the current tree as well as we do to be able to
> >answer this question :)
>
> Right. Dumb question.
>
> >You don't have to create a driver subsystem to be able to add stuff to
> >sysfs, what makes you think that?
>
> Sorry, you are right. But you do need to have s struct dev or use
> kobjects. What I want is an interface to create sysfs files using a path
> as a parameter, rather than a struct kobject.
So you want to divorce the relationship in sysfs between directories and
kobjects? That's a valid proposal, but just don't do it as a xen
specific thing please, that's being selfish.
> >did you look at debugfs?
>
> yes
And what is wrong with it?
> >configfs?
>
> no. configfs may be a better choice. I would still want a higher-level
> kernel interface similar to what is in the patch, as explained below.
> But I think sysfs may be more appropriate because attributes show up
> automatically without a user-space action being taken.
Fair enough.
> >What is wrong with the current kobject/sysfs/driver model interface that
> >made you want to create this extra code?
>
> Nothing is wrong, but I want a higher-level interface, to be able to
> create files and directories using a path, and to allow a code that is
> not associated with a device to create sysfs files by specifying a path.
> e.g., create(path, mode, ...).
See my comment above about this.
But I think you will fail in this, as we want to keep a very strict
heirachy in sysfs, as userspace relies on this. See the previous
proposal from Pat Mochel to try to do this (in the lkml archives) for
the problems when he tried to do so.
> Currently in xeno-linux there are several files under /proc/xen. These
> are created by different areas of the xeno-linux kernel. In xeno-linux
> today there is a single higher-level routine that each of these
> different areas uses to create its own file under /proc/xen. In other
> words, I think there should be a unifying element to the interface
> because the callers are not organized within a single module.
Ok, but again, that's no different than anything else in the kernel,
right?
> Mike (hoping he doesn't end up on linux kernel monkey log)
Well, you posted a patch in the wrong coding style, in a format that can
not be applied due to a broken email client setup, tried to do all of
the work in your own subsection of an external kernel tree that seems to
strongly avoid getting merged into mainline, ignored the existing kernel
interfaces, and didn't cc: the subsystem maintainer. Sounds like it
might be worth mentioning, don't you think? :)
thanks,
greg k-h
next prev parent reply other threads:[~2006-01-12 0: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 [this message]
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
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=20060112005710.GA2936@kroah.com \
--to=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