accel-config: Fix idxd_mdev modprobe on specific silicon stepping
Tony Zhu
PATCH 1/1 accel-config: Fix idxd_mdev modprobe on specific silicon stepping
When reset the module, on specific silicon steppings, need the delay to make sure devices and wqs are ready. Otherwise, it will fail to get the available wqs.
--- test/common | 1 + 1 file changed, 1 insertion(+)
test/common +1 -0
@@ -108,6 +108,7 @@ _cleanup() sleep 1 } modprobe idxd + sleep 1 } # json2var
Signature · 1 line
2.17.1
Luck
test/common _cleanup() · line 111
Quoted 2 lines
modprobe idxd
test/common +1
-0+ sleep 1
Dave - this seems weird. Does the idxd start up some async work during module initialization? I'd normally expect "modprobe" to complete synchronously.
"sleep 1" seems a fragile fix. If the system is heavily loaded would you need a longer sleep?
-Tony
Thomas
Quoted 8 lines · Tony Luck
test/common _cleanup() · line 111
Quoted 2 lines
modprobe idxd
test/common +1
-0+ sleep 1Dave - this seems weird. Does the idxd start up some async work during module initialization? I'd normally expect "modprobe" to complete synchronously.
"sleep 1" seems a fragile fix. If the system is heavily loaded would you need a longer sleep?
Tony Zhu mentioned he saw different behavior across hw steppings so the timing may be an issue.
Quoted 5 lines
-Tony
_______________________________________________
Accel-config mailing list -- accel-config(a)lists.01.org To unsubscribe send an email to accel-config-leave(a)lists.01.org
Dave Jiang
Quoted 9 lines · Tony
test/common _cleanup() · line 111
Quoted 2 lines
modprobe idxd
test/common +1
-0+ sleep 1Dave - this seems weird. Does the idxd start up some async work during module initialization? I'd normally expect "modprobe" to complete synchronously.
"sleep 1" seems a fragile fix. If the system is heavily loaded would you need a longer sleep?
-Tony
I don't think so. Although it does do a bunch of 'struct device' registration and attempt to probe all of them with registered drivers on the dsa_bus. I'm not sure if those are done in async manner.
Thomas
This will not work because now idxd_uacce also depends on idxd module. Also I find the module dependency order between idxd_uacce and idxd_mdev is not fixed. You may need to do something like -
1. Check and unload idxd_mdev. (This can fail depending on module order)
2. Check and unload idxd_uacce.
3. Check and unload idxd_mdev again. (Will succeed for any module order)
4. Check and unload idxd
5. Load idxd
sleep 1 may be required between steps
-Ramesh
Quoted 23 lines · Tony Zhu
When reset the module, on specific silicon steppings, need the delay to make sure devices and wqs are ready. Otherwise, it will fail to get the available wqs.
Signed-off-by Tony Zhu <tony.zhu(a)intel.com>--- test/common | 1 + 1 file changed, 1 insertion(+)test/common +1
-0@@ -108,6 +108,7 @@ _cleanup() sleep 1 } modprobe idxd + sleep 1 } # json2varSignature · 1 line
2.17.1
Thomas
I have reworked this patch and sent for review
https://lists.01.org/hyperkitty/list/accel-config(a)lists.01.org/thread/MEIPOQZLTTV4PCBVRLFFMYL3G3CIIASH/
Quoted 39 lines · Ramesh Thomas
This will not work because now
idxd_uaccealso depends on idxd module. Also I find the module dependency order betweenidxd_uacceandidxd_mdevis not fixed. You may need to do something like -1. Check and unload
idxd_mdev. (This can fail depending on module order)
2. Check and unloadidxd_uacce.
3. Check and unloadidxd_mdevagain. (Will succeed for any module order)
4. Check and unload idxd
5. Load idxdsleep 1 may be required between steps
-Ramesh
Quoted 23 lines · Tony Zhu
When reset the module, on specific silicon steppings, need the delay to make sure devices and wqs are ready. Otherwise, it will fail to get the available wqs.
Signed-off-by Tony Zhu <tony.zhu(a)intel.com>--- test/common | 1 + 1 file changed, 1 insertion(+)test/common +1
-1@@ -108,6 +108,7 @@ _cleanup() sleep 1 } modprobe idxd + sleep 1 } # json2var --2.17.1