On Tue, Jan 21, 2020 at 07:15:56PM +0300, Sudarikov, Roman wrote:The term "IIO" (Integrated IO) in that context refers to set of PMUs which are
On 17.01.2020 19:54, Greg KH wrote:Is "IIO" being used here the same way that drivers/iio/ is in the
On Fri, Jan 17, 2020 at 08:23:57AM -0800, Andi Kleen wrote:Hi Greg,
I have yet to figure out what it is you all are trying to express hereI thought I was nice and gentle last time and said that this was aCould you suggest how such a 1:N mapping should be expressed instead in
really bad idea and you would fix it up. That didn't happen, so I am
being explicit here, THIS IS NOT AN ACCEPTABLE FILE OUTPUT FOR A SYSFS
FILE.
sysfs?
given a lack of Documentation/ABI/ file :)
But again, sysfs is ONE VALUE PER FILE. You have a list of items here,
that is bounded only by the number of devices in the system at the
moment. That number will go up in time, as we all know. So this is
just not going to work at all as-is.
greg k-h
Technically, the motivation behind this patch is to enable Linux perf tool
to attribute IO traffic to IO device.
Currently, perf tool provides interface to configure IO PMUs only without
any
context.
Understanding IIO stack concept to find which IIO stack that particular
IO device is connected to, or to identify an IIO PMON block to program
for monitoring specific IIO stack assumes a lot of implicit knowledge
about given Intel server platform architecture.
kernel, or is this some other term? If it is the same, why isn't the
iio developers involved in this? If it is some other term, please
always define it and perhaps pick a different name :)
It's interface to corresponding IIO PMU, should be struct devicePlease consider the following mapping schema:What is uncore_iio_N? A struct device? Or something else?
1. new "mapping" directory is to be added under each uncore_iio_N directory
Just for convenience. I can put it the same level as other attributes (cpumask etc).2. that "mapping" directory is supposed to contain symlinks named "dieN"Where did "pci_bus" come from in there? I don't see under /sys/devices/
which are pointed to corresponding root bus.
Below is how it looks like for 2S machine:
# ll uncore_iio_0/mapping/
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 ->
../../pci0000:00/pci_bus/0000:00
for my pci bridges.
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 ->Why have a subdir here?
../../pci0000:80/pci_bus/0000:80
# ll uncore_iio_1/mapping/
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 ->
../../pci0000:17/pci_bus/0000:17
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 ->
../../pci0000:85/pci_bus/0000:85
# ll uncore_iio_2/mapping/
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 ->
../../pci0000:3a/pci_bus/0000:3a
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 ->
../../pci0000:ae/pci_bus/0000:ae
# ll uncore_iio_3/mapping/
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die0 ->
../../pci0000:5d/pci_bus/0000:5d
lrwxrwxrwx 1 root root 0 Jan 20 23:55 die1 ->
../../pci0000:d7/pci_bus/0000:d7
Anyway, yes, that would make sense, if userspace can actually doSure! The linux perf tool will use it to attribute IO traffic to devices.
something with that, can it?
The IIO PMUs by design monitors traffic crossing integrated pci root ports.
Also, what tears those symlinks down when you remove those pci devices
from the system? Shouldn't you have an entry in the pci device itself
for this type of thing? And if so, isn't this really just a "normal"
class type driver you are writing? That should handle all of the
symlinks and stuff for you automatically, right?
thanks,
greg k-h