From: Jake Hillion via B4 Relay <devnull+jake.hillion.co.uk@kernel.org>
To: "Naveen Krishna Chatradhi" <naveenkrishna.chatradhi@amd.com>,
"Carlos Bilbao" <carlos.bilbao@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, sched-ext@meta.com,
Jake Hillion <jake@hillion.co.uk>,
Blaise Sanouillet <linux@blaise.sanouillet.com>,
Suma Hegde <suma.hegde@amd.com>
Subject: [PATCH v2 0/2] x86/platform/amd: better handle scheduling delays in hsmp_send_message
Date: Thu, 05 Jun 2025 19:09:25 +0100 [thread overview]
Message-ID: <20250605-amd-hsmp-v2-0-a811bc3dd74a@hillion.co.uk> (raw)
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>
---
Changes in v2:
- Corrected -ETIMEDOUT to -ETIME in patch 2 as requested by reviewers.
- Link to v1: https://lore.kernel.org/r/20250530-amd-hsmp-v1-0-3222bffa4008@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>
next reply other threads:[~2025-06-05 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 18:09 Jake Hillion via B4 Relay [this message]
2025-06-05 18:09 ` [PATCH v2 1/2] x86/platform/amd: move final timeout check to after final sleep Jake Hillion via B4 Relay
2025-06-05 18:09 ` [PATCH v2 2/2] x86/platform/amd: replace down_timeout with down_interruptible Jake Hillion via B4 Relay
2025-06-09 7:53 ` [PATCH v2 0/2] x86/platform/amd: better handle scheduling delays in hsmp_send_message Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250605-amd-hsmp-v2-0-a811bc3dd74a@hillion.co.uk \
--to=devnull+jake.hillion.co.uk@kernel.org \
--cc=carlos.bilbao@kernel.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jake@hillion.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@blaise.sanouillet.com \
--cc=naveenkrishna.chatradhi@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sched-ext@meta.com \
--cc=suma.hegde@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®