diff options
author | Jake Hillion <jake@hillion.co.uk> | 2025-06-05 19:09:27 +0100 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-06-09 10:50:42 +0300 |
commit | 784e48a82976ee0b645788750343cd1b28a372f3 (patch) | |
tree | 8ff7337d33824a96388846976910a9a75dfa921e /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | f8afb12a2d7503de6558c23cacd7acbf6e9fe678 (diff) |
x86/platform/amd: replace down_timeout() with down_interruptible()
Currently hsmp_send_message() uses down_timeout() with a 100ms timeout
to take the semaphore. However __hsmp_send_message(), the content of the
critical section, has a sleep in it. On systems with significantly
delayed scheduling behaviour this may take over 100ms.
Convert this method to down_interruptible(). Leave the error handling
the same as the documentation currently is not specific about what error
is returned.
Previous behaviour: a caller who competes with another caller stuck in
the critical section due to scheduler delays would receive -ETIME.
New behaviour: a caller who competes with another caller stuck in the
critical section due to scheduler delays will complete successfully.
Reviewed-by: Suma Hegde <suma.hegde@amd.com>
Tested-by: Suma Hegde <suma.hegde@amd.com>
Signed-off-by: Jake Hillion <jake@hillion.co.uk>
Link: https://lore.kernel.org/r/20250605-amd-hsmp-v2-2-a811bc3dd74a@hillion.co.uk
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions