Re: [rfc][patch] driverfs multi-node(board) patch [2/2]

Matthew Dobson
2002-10-01T18:17:08Z

Greg KH wrote:
> Can you show an example output of what the directory structure now looks
> like with this patch?
>
> Curious,
>
> greg k-h
Surely, Greg! Something I definitely should have put in the original
post... here's the before:

*****************BEFORE****************************
[root@elm3b79 devices]# tree -d bus/system/devices/
bus/system/devices/
|-- cpu0 -> ../../../root/sys/cpu0
|-- cpu1 -> ../../../root/sys/cpu1
|-- cpu2 -> ../../../root/sys/cpu2
|-- cpu3 -> ../../../root/sys/cpu3
|-- cpu4 -> ../../../root/sys/cpu4
|-- cpu5 -> ../../../root/sys/cpu5
|-- cpu6 -> ../../../root/sys/cpu6
|-- cpu7 -> ../../../root/sys/cpu7
|-- pic0 -> ../../../root/sys/pic0
`-- rtc0 -> ../../../root/sys/rtc0

10 directories
[root@elm3b79 devices]# tree -d class/
class/
|-- cpu
| |-- devices
| | |-- 0 -> ../../../root/sys/cpu0
| | |-- 1 -> ../../../root/sys/cpu1
| | |-- 2 -> ../../../root/sys/cpu2
| | |-- 3 -> ../../../root/sys/cpu3
| | |-- 4 -> ../../../root/sys/cpu4
| | |-- 5 -> ../../../root/sys/cpu5
| | |-- 6 -> ../../../root/sys/cpu6
| | `-- 7 -> ../../../root/sys/cpu7
| `-- drivers
|-- disk
| |-- devices
| `-- drivers
`-- input
|-- devices
`-- drivers

17 directories
[root@elm3b79 devices]# tree -d root/sys/
root/sys/
|-- cpu0
|-- cpu1
|-- cpu2
|-- cpu3
|-- cpu4
|-- cpu5
|-- cpu6
|-- cpu7
|-- pic0
`-- rtc0

10 directories
*****************BEFORE****************************

And here is the output after my changes:
******************AFTER****************************
[root@elm3b79 devices]# tree -d bus/system/devices/
bus/system/devices/
|-- cpu0 -> ../../../root/sys/node0/sys/cpu0
|-- cpu1 -> ../../../root/sys/node0/sys/cpu1
|-- cpu2 -> ../../../root/sys/node0/sys/cpu2
|-- cpu3 -> ../../../root/sys/node0/sys/cpu3
|-- cpu4 -> ../../../root/sys/node1/sys/cpu4
|-- cpu5 -> ../../../root/sys/node1/sys/cpu5
|-- cpu6 -> ../../../root/sys/node1/sys/cpu6
|-- cpu7 -> ../../../root/sys/node1/sys/cpu7
|-- memblk0 -> ../../../root/sys/node0/sys/memblk0
|-- memblk1 -> ../../../root/sys/node1/sys/memblk1
|-- node0 -> ../../../root/sys/node0
|-- node1 -> ../../../root/sys/node1
|-- pic0 -> ../../../root/sys/pic0
`-- rtc0 -> ../../../root/sys/rtc0

14 directories
[root@elm3b79 devices]# tree -d class/
class/
|-- cpu
| |-- devices
| | |-- 0 -> ../../../root/sys/node0/sys/cpu0
| | |-- 1 -> ../../../root/sys/node0/sys/cpu1
| | |-- 2 -> ../../../root/sys/node0/sys/cpu2
| | |-- 3 -> ../../../root/sys/node0/sys/cpu3
| | |-- 4 -> ../../../root/sys/node1/sys/cpu4
| | |-- 5 -> ../../../root/sys/node1/sys/cpu5
| | |-- 6 -> ../../../root/sys/node1/sys/cpu6
| | `-- 7 -> ../../../root/sys/node1/sys/cpu7
| `-- drivers
|-- disk
| |-- devices
| `-- drivers
|-- input
| |-- devices
| `-- drivers
|-- memblk
| |-- devices
| | |-- 0 -> ../../../root/sys/node0/sys/memblk0
| | `-- 1 -> ../../../root/sys/node1/sys/memblk1
| `-- drivers
`-- node
|-- devices
| |-- 0 -> ../../../root/sys/node0
| `-- 1 -> ../../../root/sys/node1
`-- drivers

27 directories
[root@elm3b79 devices]# tree -d root/sys/
root/sys/
|-- node0
| `-- sys
| |-- cpu0
| |-- cpu1
| |-- cpu2
| |-- cpu3
| `-- memblk0
|-- node1
| `-- sys
| |-- cpu4
| |-- cpu5
| |-- cpu6
| |-- cpu7
| `-- memblk1
|-- pic0
`-- rtc0

16 directories
******************AFTER****************************

Basically, the patch just adds nodes and memblks to the topology and
nests the cpus/memblks under the nodes. I'd like to add more
information to these directories (node-node distances, cpu speeds,
memory block sizes/physical page ranges, etc, etc, etc), but this is
just a first-pass.

Cheers!

-Matt