Comments (5)
Only a little complicated way to figure out which cxl device is really a CGZIP one:
haver@tul2eth3:~/genwqe/genwqe-user$ lspci | grep accel
0002:01:00.0 Processing accelerators: IBM Device 0477 (rev 01)
0004:01:00.0 Processing accelerators: IBM Device 0477 (rev 01)
0007:00:00.0 Processing accelerators: IBM Device 0602 (rev 01)
0008:00:00.0 Processing accelerators: IBM Device 0602 (rev 01)
The 0602 is a CGZIP device, but that belongs to the "mother" device with the cxl device id 0744.
So which 0602 belongs now to which 0744 device to solve the question which "device" number to take?
One way:
haver@tul2eth3:/sys/bus/pci/devices**/0002:01:00.0**$ ls
broken_parity_status dma_mask_bits enable numa_node resource subsystem_device
class driver iommu_group of_node resource0 subsystem_vendor
config driver_override irq pci0007:00 resource0_wc uevent
consistent_dma_mask_bits eeh_config_addr local_cpulist power resource2 vendor
cxl eeh_mode local_cpus remove resource2_wc vpd
device eeh_pe_config_addr modalias rescan resource4
devspec eeh_pe_state msi_bus reset subsystem
So pci0007:00 belongs to the 0002:01:00.0 device. A way back from the 0007 device to the 02:01:00 device I was unable to find.
haver@tul2eth3:/sys/bus/pci/devices/0004:01:00.0$ ll cxl/
total 0
drwxr-xr-x 3 root root 0 Apr 5 15:19 ./
drwxr-xr-x 5 root root 0 Apr 5 15:18 ../
drwxr-xr-x 4 root root 0 Mar 22 16:01 card1/
haver@tul2eth3:/sys/bus/pci/devices/0004:01:00.0$
And here the link from the 4:01:00 device to card1. Also not so easily to be found.
But now the tricky thing: We need to consider that there are multiple non CGZIP cards in the system, so not every 0477 device has really a 0602 device. There could be 0477 devices with none or different virtual devices.
from genwqe-user.
I wonder ... if we can have udev wait for general capi cards to appear
and if those have a pciXXXX link in their sysfs tree, we follow that link
and if we see the subdevice being a 0603 we know it is a CGZIP and we can start the daemon.
maybe that works.
Any better ideas are welcome.
from genwqe-user.
Manish found a good way:
haver@tul2eth3:$ cat /sys/class/cxl/afu1.0s/device/cr0/device$ cat /sys/class/cxl/afu0.0s/device/cr0/device
0x0602
haver@tul2eth3:
0x0602
haver@tul2eth3:~$
Gabriel, can we use that? If we see the 0602 in this sysfs entry, the associated afu is a CGZIP one and we could start the maintenance daemon for this card.
from genwqe-user.
@ibm-genwqe Can we close that? Will we ever fix this?
from genwqe-user.
I think we might not fix that. Please reopen if there is demand for this.
from genwqe-user.
Related Issues (20)
- Make Z_STREAM_END detection circumvention configurable HOT 1
- User's Guide: Improve documentation about correct udev setup for cxl devices HOT 1
- Z_STREAM_END Circumvention: Run MongoDB testcase
- genwqe-user doesn't build on i686 platform HOT 2
- Change lib files location and usage of pthread HOT 1
- FTBFS on any 32-bit arches HOT 4
- Static analysis results by Coverity Scan HOT 2
- Ubuntu 16.04: LD_PRELOAD needed when using genwqe_gzip/gunzip HOT 2
- bug 155158 HOT 2
- deflateSetDictionary: Returned adler32 was wrong HOT 3
- zlib inflate error on git log and git status (HW version) HOT 8
- Potential arbitrary code execution bug found by Coverity scan HOT 5
- inflate() returns Z_OK instead of Z_STREAM_END in TokuDB HOT 3
- Software fallback to SAP libz fails with compression error HOT 4
- Try out new zlib 1.2.11 HOT 3
- Test: Kernel update for our test-machine
- Hardware version of compressBound() missing HOT 2
- genese_cksum: Produces ugly kernel warning for s390 Linux
- naming conflict in genwqe-user with glibc >=2.30
- hw_defs.h:36:21: error: static declaration of 'gettid' follows non-static declaration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genwqe-user.