Re: [PATCH 4/4] vmbus: document numa_node sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 19 Dec 2016 18:44:12 +0000
KY Srinivasan <kys@xxxxxxxxxxxxx> wrote:

> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@xxxxxxxxxxxxxxxxxx]
> > Sent: Monday, December 19, 2016 10:21 AM
> > To: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>; KY Srinivasan
> > <kys@xxxxxxxxxxxxx>; Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
> > Cc: devel@xxxxxxxxxxxxxxxxxxxxxx; Stephen Hemminger
> > <sthemmin@xxxxxxxxxxxxx>
> > Subject: [PATCH 4/4] vmbus: document numa_node sysfs
> > 
> > Update ABI to include numa_node.
> > 
> > Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>
> > ---
> >  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 <sthemmin@xxxxxxxxxxxxx>
> > +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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux