Skip to contentSkip to conversation

sysfs support for xen linux

RFC PATCH Mike D. Day 4 participants 4 messages Jan 11, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 1 line · Keir Fraser

Well, here's a question, and I really don't know the answer: It of course makes sense that the kernel maintainers want drivers to install themselves under /sys, and fit in with the whole kobject and hotplug infrastructure. But, for a few odds-and-ends special files that don't really relate to a device, is /proc also out of bounds these days? Seems to me that the kernel proc interfaces were designed to have a few random files thrown at them, in a way that the sysfs interfaces aren't. If the argument is really that random special files are a bad idea, that would continue to hold regardless of whether we move e.g., /proc/xen/privcmd to /sys.

I think that /sys is clearly the right place to put information about Xen, including version, domains and domain info, and perhaps info about xenstore. This is according to feedback received when I submitted my first (braindead) patch moving /proc/xen to /proc/sys/xen.

Still I agree that we need input from lkml and am going to cross-post an
RFC so we can move forward.

regards,

Mike

Signature · 4 lines
Mike D. Day
STSM and Architect, Open Virtualization
IBM Linux Technology Center
[email protected]
#1 lore raw

My impression is was that sysfs files are mostly meant to be very simple get/set attributes and not have magic properties like the privcmd file - do any other sysfs files even support ioctls().

Also, for things like privcmd() which are used to perform operations, isn't it cleanest to make them a character device than a proc file?

$0.02,
Mark

Quoted 23 lines · Mike D. Day
Quoted 10 lines · Keir Fraser

Well, here's a question, and I really don't know the answer: It of course makes sense that the kernel maintainers want drivers to install themselves under /sys, and fit in with the whole kobject and hotplug infrastructure. But, for a few odds-and-ends special files that don't really relate to a device, is /proc also out of bounds these days? Seems to me that the kernel proc interfaces were designed to have a few random files thrown at them, in a way that the sysfs interfaces aren't. If the argument is really that random special files are a bad idea, that would continue to hold regardless of whether we move e.g., /proc/xen/privcmd to /sys.

I think that /sys is clearly the right place to put information about Xen, including version, domains and domain info, and perhaps info about xenstore. This is according to feedback received when I submitted my first (braindead) patch moving /proc/xen to /proc/sys/xen.

Still I agree that we need input from lkml and am going to cross-post an
RFC so we can move forward.

regards,

Mike

Quoted 1 line

Just a question. What use is a unicyle with no seat? And no pedals!

Me: To answer a question with a question: What use is a skateboard?

Quoted 1 line

Skateboards have wheels.

Me: My wheel has a wheel!

#2 lore raw
Quoted 7 lines · Mark Williamson

My impression is was that sysfs files are mostly meant to be very simple get/set attributes and not have magic properties like the privcmd file
- do
any other sysfs files even support ioctls().

Also, for things like privcmd() which are used to perform operations, isn't it cleanest to make them a character device than a proc file?

Probably true, but then it's a pain either needing to create device files in /dev, or interface with the devfs/udev du jour. I suppose we already have that issue with /dev/xen/evtchn though, and creating the device node can be hidden in libxc.

-- Keir

#3 lore raw
Quoted 2 lines · Keir Fraser

Probably true, but then it's a pain either needing to create device files in /dev, or interface with the devfs/udev du jour. I suppose we already have that issue with /dev/xen/evtchn though, and creating the device node can be hidden in libxc.

we've observed that as well, one performance toolkit uses a /proc file to avoid the mess of "devfs/udev du jour" (what a great description ...).

So maybe it oughtta be a device, who knows, but the sys file will save a lot of trouble.

ron