From: Peter Newman <peternewman@google.com>
To: reinette.chatre@intel.com, fenghua.yu@intel.com
Cc: bp@alien8.de, derkling@google.com, eranian@google.com,
hpa@zytor.com, james.morse@arm.com, jannh@google.com,
kpsingh@google.com, linux-kernel@vger.kernel.org,
mingo@redhat.com, tglx@linutronix.de, x86@kernel.org,
Peter Newman <peternewman@google.com>
Subject: [PATCH v5 0/1] Subject: x86/resctrl: Fix task CLOSID update race
Date: Wed, 14 Dec 2022 12:44:46 +0100 [thread overview]
Message-ID: <20221214114447.1935755-1-peternewman@google.com> (raw)
Hi Reinette, Fenghua,
Now that we know there is a full barrier in context switch and that
smp_mb() on every task in a group update isn't nearly as expensive as
task_call_func(), I can present you a much smaller fix.
The diffs are small enough to go down to a single patch. The changelogs
are not much simpler, but hopefully this isn't as big of a concern.
This patch is different enough that I thought it necessary to remove
James's Reviewed-By.
Updates in v5:
- Just put an smp_mb() between CLOSID/RMID stores and task_curr() calls
- Add a diagram detailing the race to the changelog
Updates in v4:
- Reorder the patches so that justification for sending more IPIs can
reference the patch fixing __rdtgroup_move_task().
- Correct tense of wording used in changelog and comments
Updates in v3:
- Split the handling of multi-task and single-task operations into
separate patches, now that they're handled differently.
- Clarify justification in the commit message, including moving some of
it out of inline code comment.
Updates in v2:
- Following Reinette's suggestion: use task_call_func() for single
task, IPI broadcast for group movements.
- Rebased to v6.1-rc4
v1: https://lore.kernel.org/lkml/20221103141641.3055981-1-peternewman@google.com/
v2: https://lore.kernel.org/lkml/20221110135346.2209839-1-peternewman@google.com/
v3: https://lore.kernel.org/lkml/20221115141953.816851-1-peternewman@google.com/
v4: https://lore.kernel.org/lkml/20221129111055.953833-1-peternewman@google.com/
Thank you for your careful reviews and feedback so far.
-Peter
Peter Newman (1):
x86/resctrl: Fix task CLOSID/RMID update race
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
--
2.39.0.rc1.256.g54fd8350bd-goog
next reply other threads:[~2022-12-14 11:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 11:44 Peter Newman [this message]
2022-12-14 11:44 ` [PATCH v5 1/1] x86/resctrl: Fix task CLOSID/RMID update race Peter Newman
2022-12-15 23:51 ` Reinette Chatre
2022-12-16 10:26 ` Peter Newman
2022-12-16 19:36 ` Reinette Chatre
2022-12-19 10:22 ` Peter Newman
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=20221214114447.1935755-1-peternewman@google.com \
--to=peternewman@google.com \
--cc=bp@alien8.de \
--cc=derkling@google.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jannh@google.com \
--cc=kpsingh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).