linux/arch/powerpc/platforms
Haren Myneni 43ac9f5cd4 powerpc/pseries/vas: Use usleep_range() to support HCALL delay
VAS allocate, modify and deallocate HCALLs returns
H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy
delay and expects OS to reissue HCALL after that delay. But using
msleep() will often sleep at least 20 msecs even though the
hypervisor suggests OS reissue these HCALLs after 1 or 10msecs.

The open and close VAS window functions hold mutex and then issue
these HCALLs. So these operations can take longer than the
necessary when multiple threads issue open or close window APIs
simultaneously, especially might affect the performance in the
case of repeat open/close APIs for each compression request.

Multiple tasks can open / close VAS windows at the same time
which depends on the available VAS credits. For example, 240
cores system provides 4800 VAS credits. It means 4800 tasks can
execute open VAS windows HCALLs with the mutex. Since each
msleep() will often sleep more than 20 msecs, some tasks are
waiting more than 120 secs to acquire mutex. It can cause hung
traces for these tasks in dmesg due to mutex contention around
open/close HCALLs.

Instead of msleep(), use usleep_range() to ensure sleep with
the expected value before issuing HCALL again. So since each
task sleep 10 msecs maximum, this patch allow more tasks can
issue open/close VAS calls without any hung traces in the
dmesg.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Suggested-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240116055910.421605-1-haren@linux.ibm.com
2024-06-04 17:13:56 +10:00
..
4xx powerpc: Use NULL instead of 0 for null pointers 2023-10-19 17:12:47 +11:00
8xx powerpc: Untangle fixmap.h and pgtable.h and mmu.h 2023-10-19 17:12:44 +11:00
40x powerpc/machdep: Define 'compatibles' property in ppc_md and use it 2024-03-03 22:20:29 +11:00
44x powerpc/4xx: Fix warp_gpio_leds build failure 2024-03-07 00:13:28 +11:00
52xx powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX 2024-05-08 00:25:00 +10:00
82xx powerpc/82xx: Select FSL_SOC 2023-09-18 12:23:48 +10:00
83xx powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX 2024-05-08 00:25:00 +10:00
85xx powerpc/85xx: fix compile error without CONFIG_CRASH_DUMP 2024-05-10 22:36:05 +10:00
86xx powerpc/86xx: Drop unused CONFIG_MPC8610 2023-12-29 15:23:00 +11:00
512x powerpc: Fix typos 2024-05-08 00:21:30 +10:00
amigaone powerpc/amigaone: Make several functions static 2024-03-07 00:13:28 +11:00
book3s powerpc/vas: Limit open window failure messages in log bufffer 2023-10-20 17:10:03 +11:00
cell powerpc: Fix typos 2024-05-08 00:21:30 +10:00
chrp powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
embedded6xx powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc. 2024-03-07 00:13:28 +11:00
maple powerpc: Fix typos 2024-05-08 00:21:30 +10:00
microwatt powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
pasemi powerpc: Stop using of_root 2024-03-03 22:20:29 +11:00
powermac powerpc: Fix typos 2024-05-08 00:21:30 +10:00
powernv Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
ps3 The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
pseries powerpc/pseries/vas: Use usleep_range() to support HCALL delay 2024-06-04 17:13:56 +10:00
fsl_uli1575.c powerpc/fsl_uli1575: Mark uli_exclude_device() as static 2023-04-20 10:20:50 +10:00
Kconfig powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272 2023-08-18 17:03:14 +10:00
Kconfig.cputype powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00