I have a linux (3.12) system (x86-64) with multiple devices connected to the PCI bus (PCI-e). I would like to measure the PCI bus load in the current situation and again when I connect another device to the bus to see the difference, but I have no idea how. Is there a way to do this?
Peripheral Component Interconnect (PCI) is a local computer bus for attaching hardware devices in a computer and is part of the PCI Local Bus standard. The PCI bus supports the functions found on a processor bus but in a standardized format that is independent of any given processor's native bus.
PCI Bus number in hexadecimal, often padded using a leading zeros to two or four digits. A colon (:) PCI Device number in hexadecimal, often padded using a leading zero to two digits . Sometimes this is also referred to as the slot number.
PCI bus overview In particular PCI provides a mechanism where each card or device specifies both its identity and the resources needed (memory-mapped or I/O space, interrupts) and the BIOS and/or OS can discover all devices in the system and allocate interrupts, physical memory space, and I/O space to each device.
pci_map_single() is prototyped as follows: dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t size, int direction); The first three arguments respectively hold the PCI device structure, the kernel virtual address of a preallocated DMA buffer, and the size of the supplied buffer.
I've been able to do this using Intel Performance Counter Monitor V2.7. I was lucky that since v2.5 an PCI-e bus monitor was added for x86 processors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With