[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.19 90/90] x86/resctrl: Dont stop walking closids when a locksetup group is found
From: James Morse <>

commit 87d3aa28f345bea77c396855fa5d5fec4c24461f upstream.

When a new control group is created __init_one_rdt_domain() walks all
the other closids to calculate the sets of used and unused bits.

If it discovers a pseudo_locksetup group, it breaks out of the loop. This
means any later closid doesn't get its used bits added to used_b. These
bits will then get set in unused_b, and added to the new control group's
configuration, even if they were marked as exclusive for a later closid.

When encountering a pseudo_locksetup group, we should continue. This is
because "a resource group enters 'pseudo-locked' mode after the schemata is
written while the resource group is in 'pseudo-locksetup' mode." When we
find a pseudo_locksetup group, its configuration is expected to be
overwritten, we can skip it.

Fixes: dfe9674b04ff6 ("x86/intel_rdt: Enable entering of pseudo-locksetup mode")
Signed-off-by: James Morse <>
Signed-off-by: Thomas Gleixner <>
Acked-by: Reinette Chatre <>
Cc: Fenghua Yu <>
Cc: Borislav Petkov <>
Cc: H Peter Avin <>
Cc: <>
[Dropped comment due to lack of space]
Signed-off-by: James Morse <>
Signed-off-by: Greg Kroah-Hartman <>

arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -2379,7 +2379,7 @@ static int rdtgroup_init_alloc(struct rd
if (closid_allocated(i) && i != closid) {
mode = rdtgroup_mode_by_closid(i);
- break;
+ continue;
used_b |= *ctrl;
d->new_ctrl |= *ctrl;

 \ /
  Last update: 2019-06-24 12:07    [W:0.275 / U:38.560 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site