WARNING - OLD ARCHIVES

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

xen-devel

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

To: "Mike D. Day" <ncmike@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] [RFC] sysfs support for xen linux
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 10:21:15 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 11 Jan 2006 10:21:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43C3AF61.8090102@xxxxxxxxxx>
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: <43C3AF61.8090102@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 10 Jan 2006, at 12:58, Mike D. Day wrote:

No, they don't. Drivers get sysfs attributes by using the driver core (registering a subsystem, defining attributes, etc.).

However, if all you want to do is create and remove files under /sys (without using all the driver core), there is no simple way to do so (at least not that I could find). I am assuming that folks will want something that works like /proc does now.

I wrote xen_sysfs.c to provide simple sysfs interfaces for non-drivers. It seems as though it would be a crime against nature to write a device driver just to create a file under /sys.

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.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel