Re: [PATCH 0/6] tagged sysfs support

Previous thread: [RELEASE] LTTng 0.205, 0.206, ltt-control 0.82 for Linux 2.6.33.2 by Mathieu Desnoyers on Friday, April 2, 2010 - 5:44 pm. (2 messages)

Next thread: [PATCH 0/4] AMD IOMMU kdump fix plus cleanups (v2) by Chris Wright on Friday, April 2, 2010 - 6:27 pm. (27 messages)
From: Ben Hutchings
Date: Friday, April 2, 2010 - 5:58 pm

[...]

block vs class/block is arguable, but as for abstracting the difference
between bus and class... why?

Each bus defines a device interface covering enumeration,
identification, power management and various aspects of their connection
to the host.  This interface is implemented by the bus driver.

Each class defines a device interface covering functionality provided to
user-space or higher level kernel components (block interface to
filesystems, net driver interface to the networking core, etc).  This
interface is implemented by multiple device-specific drivers.

So while buses and classes both define device interfaces, they are
fundamentally different types of interface.  And there are 'subsystems'
that don't have devices at all (time, RCU, perf, ...).  If you're going
to expose the set of subsystems, don't they belong in there?  But then,
what would you put in their directories?

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
From: Kay Sievers
Date: Saturday, April 3, 2010 - 1:35 am

There is absolutely no need to needlessly export two versions of the
same thing. These directories serve no other purpose than to collect
all devices of the same subsystem. There is no useful information that
belongs to the type class or bus, they are both the same. Like
"inputX" is implemented as a class, but is much more like a bus. And
"usb" are devices, which are more a class of devices, and the
interfaces and contollers belong to a bus.

There is really no point to make userspace needlessly complicated to
distinguish the both.

We also have already a buch of subsystems which moved from class to
bus because they needed to express hierarchy between the same devices.
So the goal is to have only one type of subsystem to solve these

Sure, but that does not mean that class is a useful layout, or that

That's absolutely wrong. Classes are just too simple uses of the same
thing. We have many class devices which are not "interfaces", and we

No, they are not. They are just "devices". There is no useful
difference these two different types expose. And the class layout is
fundamentally broken, and not extendable. Peole mix lists of devices
with custom subsystem-wide attributes, which we need to stop from
doing this. The bus layout can carry custom directories, which is why

We are talking about the current users in /sys, and the difference in

We are not talking about anything not in /sys currently.

Kay
--

From: Ben Hutchings
Date: Saturday, April 3, 2010 - 9:05 am

That's interesting.  Which were those?

[...]

I understand that you want to clean up a mess, but how do you know
you're not going to break user-space that depends on some of this mess?

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
Previous thread: [RELEASE] LTTng 0.205, 0.206, ltt-control 0.82 for Linux 2.6.33.2 by Mathieu Desnoyers on Friday, April 2, 2010 - 5:44 pm. (2 messages)

Next thread: [PATCH 0/4] AMD IOMMU kdump fix plus cleanups (v2) by Chris Wright on Friday, April 2, 2010 - 6:27 pm. (27 messages)