Skip to contentSkip to conversation

Is it a correct place for VBD information?

DISCUSSION Satoshi Uchida 3 participants 6 messages Jun 23, 2006 – Jun 27, 2006

lore
Share & tools
lore
#0 lore raw

A little while ago, I send modified VBD information patch.

However, I does not sit well with location.
I does not find statistical information under 'device' directory, and see them under 'class' directory for vif. (/sys/class/net) But, there are not appropriate location. (/sys/class/vbd or /sys/class/block)

Is it a correct place for such type of information? Is it necessary to make symbolic links to other places? Where is appropriate place?
Please comment.

I think that it is good to handle such information at one partial tree for management. My idea is to take a kind of following structure for store such information.

sys -- class -- xen --+-- domain0 --- balloon ( symlink to /sys/class/mem/balloon ?)

                                 |
                                +-- domain1 --+-- vbd --+-- vbd-x-xxxx(symlink?) 
                                                     |            |
                                                     |            +-- total information file.
                                                     |
                                                    +-- vif -- vif-x-xxxx(symlink) 

Please comment.

Thanks,
Satoshi UCHIDA.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 14 lines · Satoshi Uchida

A little while ago, I send modified VBD information patch.

However, I does not sit well with location.
I does not find statistical information under 'device' directory, and see them under 'class' directory for vif. (/sys/class/net) But, there are not appropriate location. (/sys/class/vbd or /sys/class/block)

Is it a correct place for such type of information? Is it necessary to make symbolic links to other places? Where is appropriate place?
Please comment.

I think that it is good to handle such information at one partial tree for management. My idea is to take a kind of following structure for store such information.

Quoted 8 lines
   sys -- class -- xen --+-- domain0 --- balloon ( symlink to /sys/class/mem/balloon ?)
                                 |
                                +-- domain1 --+-- vbd --+-- vbd-x-xxxx(symlink?) 
                                                     |            |
                                                     |            +-- total information file.
                                                     |
                                                    +-- vif -- vif-x-xxxx(symlink) 

What about /sys/hypervisor/xen/domain/1/vbd

/sys/hypervisor is going into upstream linux, and that leaves /sys/hypervisor/xen/ as our namespace for info.

Mike

#2 lore raw

Thanks for comment, Mike.

Quoted 13 lines
Quoted 4 lines

I think that it is good to handle such information at one partial tree for management. My idea is to take a kind of following structure for store such information.

Quoted 8 lines
   sys -- class -- xen --+-- domain0 --- balloon ( symlink to /sys/class/mem/balloon ?)
                                 |
                                +-- domain1 --+-- vbd --+-- vbd-x-xxxx(symlink?) 
                                                     |            |
                                                     |            +-- total information file.
                                                     |
                                                    +-- vif --  vif-x-xxxx(symlink)
Quoted 1 line

What about /sys/hypervisor/xen/domain/1/vbd

In Xen, devices is not handled with hypervisor but is handled with Domain0 (or the privileged domain). So, Shouldn't these information locate under /sys/hypervisor ?

What does /sys/hypervisor mean?
For example, I feel /sys/firmware means structure in namespace.
If /sys/hypervisor is similar to these information,
these information shouldn't locate under /sys/hypervisor.
If /sys/hypervisor create as new tree which is to handle total information for virtual system, It may be good that these information locate under /sys/hypervisor.

/sys/class means description of a type of device (see Documentation/device-model/class.txt), and each device class defines a set of semantics and programming interface. Xen is not device, so it may be bad that these information locate under /sys/class.

/sys/devices means filesystem representation of the device tree.
So, I feel that these statistical information shouldn't locate under /sys/devices

I can not find reasonable answer.
Please help.

How about making a new tree -- /sys/xen ?

Quoted 1 line

/sys/hypervisor is going into upstream linux, and that leaves /sys/hypervisor/xen/ as our namespace for info.

Good.
But I hesitate by above reason for /sys/hypervisor/xen.

Satoshi UCHIDA

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 6 lines · Satoshi Uchida

/sys/class means description of a type of device (see Documentation/device-model/class.txt), and each device class defines a set of semantics and programming interface. Xen is not device, so it may be bad that these information locate under /sys/class.

/sys/devices means filesystem representation of the device tree.
So, I feel that these statistical information shouldn't locate under /sys/devices

There's all kinds of device-specific metadata under device directories in /sys/devices. So placing statistics under there seems fine to me as it keeps device-specific data together in one place -- the vbd directories can then get symlinked from /sys/class or /sys/hypervisor/xen in future if that is deemed to make sense, and all vbd-specific info is at once available at those new locations.

-- Keir

#4 lore raw
Quoted 15 lines · Satoshi Uchida
Quoted 10 lines

/sys/class means description of a type of device (see Documentation/device-model/class.txt),
and each device class defines a set of semantics and programming interface.
Xen is not device, so it may be bad that these information locate under /sys/class.

/sys/devices means filesystem representation of the device tree. So, I feel that these statistical information shouldn't

locate under

Quoted 1 line

/sys/devices

Quoted 9 lines

There's all kinds of device-specific metadata under device directories in /sys/devices. So placing statistics under there seems fine to me as it keeps device-specific data together in one place -- the vbd directories can then get symlinked from /sys/class or /sys/hypervisor/xen in future if that is deemed to make sense, and all vbd-specific info is at once available at those new locations.

-- Keir

OK.

On the presumption that statistical information is placed in /sys/device, I think that the first stage in output of VBD information is the end at ver. 2 patch. How is it?

Thanks,
Satoshi UCHIDA.

#5 lore raw
Quoted 5 lines · Satoshi Uchida

OK.

On the presumption that statistical information is placed in /sys/device, I think that the first stage in output of VBD information is the end at ver. 2 patch. How is it?

Another version is required:
Formatting is a bit off (e.g., xenvbd_sysfs_delif) -- please make sure you observe Linux coding style everywhere. Also the code would all be better off in xenbus.c -- it's where it gets invoked from and then you won't need to modify the shared header file at all. Get rid of fmt_ulong[] -- the compiler should optimise identical string literals.

-- Keir