mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/platform/amd: better handle scheduling delays in hsmp_send_message
@ 2025-05-30 16:15 Jake Hillion via B4 Relay
  2025-05-30 16:15 ` [PATCH 1/2] x86/platform/amd: move final timeout check to after final sleep Jake Hillion via B4 Relay
  2025-05-30 16:15 ` [PATCH 2/2] x86/platform/amd: replace down_timeout with down_interruptible Jake Hillion via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Jake Hillion via B4 Relay @ 2025-05-30 16:15 UTC (permalink / raw)
  To: Naveen Krishna Chatradhi, Carlos Bilbao, Hans de Goede,
	Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, sched-ext, Jake Hillion,
	Blaise Sanouillet

hsmp_send_message currently relies in 2 places on the assumption that
usleep_range will complete in well under 100ms. This is not guaranteed,
and is prevalent when running sched_ext schedulers or possible under
other high load conditions.

These patches alter the behaviour in two ways:
1. Checks the result of `mbox_status` a final time if the sleep took us
   past the timeout. This gives a useful result under test when there
   are significant scheduling delays, rather than -ETIMEDOUT.
2. Removes the 100ms limit on awaiting the semaphore. This allows a
   second thread to compete even when the other suffers large scheduling
   delays.

Signed-off-by: Jake Hillion <jake@hillion.co.uk>
---
Jake Hillion (2):
      x86/platform/amd: move final timeout check to after final sleep
      x86/platform/amd: replace down_timeout with down_interruptible

 drivers/platform/x86/amd/hsmp/hsmp.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
---
base-commit: 44ed0f35df343d00b8d38006854f96e333104a66
change-id: 20250527-amd-hsmp-8c358985b4fb

Best regards,
-- 
Jake Hillion <jake@hillion.co.uk>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-04 11:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-30 16:15 [PATCH 0/2] x86/platform/amd: better handle scheduling delays in hsmp_send_message Jake Hillion via B4 Relay
2025-05-30 16:15 ` [PATCH 1/2] x86/platform/amd: move final timeout check to after final sleep Jake Hillion via B4 Relay
2025-06-04 11:22   ` Suma Hegde
2025-05-30 16:15 ` [PATCH 2/2] x86/platform/amd: replace down_timeout with down_interruptible Jake Hillion via B4 Relay
2025-06-04 11:25   ` Suma Hegde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®