Skip to content

Commit

Permalink
x86/resctrl: Don't stop walking closids when a locksetup group is found
Browse files Browse the repository at this point in the history
commit 87d3aa2 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: dfe9674 ("x86/intel_rdt: Enable entering of pseudo-locksetup mode")
Signed-off-by: James Morse <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Reinette Chatre <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: H Peter Avin <[email protected]>
Cc: <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
[Dropped comment due to lack of space]
Signed-off-by: James Morse <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
James Morse authored and gregkh committed Jun 25, 2019
1 parent 7a66388 commit d0dcce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/resctrl/rdtgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp)
if (closid_allocated(i) && i != closid) {
mode = rdtgroup_mode_by_closid(i);
if (mode == RDT_MODE_PSEUDO_LOCKSETUP)
break;
continue;
/*
* If CDP is active include peer
* domain's usage to ensure there
Expand Down

0 comments on commit d0dcce7

Please sign in to comment.