On Mon, 19 Dec 2016 18:44:12 +0000
KY Srinivasan <k...@microsoft.com> wrote:

> > -----Original Message-----
> > From: Stephen Hemminger [mailto:step...@networkplumber.org]
> > Sent: Monday, December 19, 2016 10:21 AM
> > To: Vitaly Kuznetsov <vkuzn...@redhat.com>; KY Srinivasan
> > <k...@microsoft.com>; Haiyang Zhang <haiya...@microsoft.com>
> > Cc: de...@linuxdriverproject.org; Stephen Hemminger
> > <sthem...@microsoft.com>
> > Subject: [PATCH 4/4] vmbus: document numa_node sysfs
> > 
> > Update ABI to include numa_node.
> > 
> > Signed-off-by: Stephen Hemminger <sthem...@microsoft.com>
> > ---
> >  Documentation/ABI/stable/sysfs-bus-vmbus | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/Documentation/ABI/stable/sysfs-bus-vmbus
> > b/Documentation/ABI/stable/sysfs-bus-vmbus
> > index 183d14420152..dfd76b8c36aa 100644
> > --- a/Documentation/ABI/stable/sysfs-bus-vmbus
> > +++ b/Documentation/ABI/stable/sysfs-bus-vmbus
> > @@ -65,3 +65,11 @@ Description:
> >             bindings. The format is UUID format similar to
> >             /sys/bus/vmbus/devices/. For example:
> >             # echo f8615163-df3e-46c5-913f-f2d2f965ed0e >
> > /sys/bus/pci/drivers/foo/unbind
> > +
> > +What:              /sys/bus/vmbus/devices/.../numa_node
> > +Date:              Dec 2016
> > +Contact:   Stephen Hemminger <sthem...@microsoft.com>
> > +Description:
> > +           This file contains the NUMA node to which the VMBUS
> > device is
> > +           attached, or -1 if the node is unknown. The value comes from
> > +           the primary channel CPU mapping.
> > --
> > 2.11.0  
> Why don't you include the do update in the patch that adds the new sysfs 
> field.
> 
> K. Y

The channel_vp_mapping was not designed according to the sysfs design guidelines
of one value per file. It really needs to be more like the net_devices queues 
sysfs.

$ cat /sys/class/net/eth0/device/channel_vp_mapping 
14:0
17:1

versus

$ ls /sys/class/net/eth0/queues
rx-0  rx-1  tx-0  tx-1
$ ls /sys/class/net/eth0/queues/tx-0
byte_queue_limits  tx_maxrate  tx_timeout  xps_cpus
$ cat /sys/class/net/eth0/queues/tx-0/xps_cpus 
00000000,00000000


So if VMBUS sysfs interface followed conventional guidelines:

Channel directory:  /sys/bus/vmbus/devices/XXXX/channels/
        0/
                out_read_bytes_avail
                in_read_bytes_avail
                id
                target_cpu
                numa_node

        1/

Therefore I would not like not to put existing layout into stable ABI.
It was a mistake because it doesn't handle multiple channel devices well,
and it also uses multiple values per file.

Since numa_node is property of target_cpu, maybe better to just redo
the sysfs channel layout and let application keep track of numa itself
based on CPU (it needs to know topology already about CPU's).


_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to