Re: [RFD] resctrl: reassigning a running container's CTRL_MON group

From: Peter Newman
Date: Thu Oct 27 2022 - 03:56:56 EST


Hi Reinette,

On Wed, Oct 26, 2022 at 11:12 PM Reinette Chatre
<reinette.chatre@xxxxxxxxx> wrote:
> The original concern is "the stores to t->closid and t->rmid could be
> reordered with the task_curr(t) and task_cpu(t) reads which follow". I can see
> that issue. Have you considered using the compiler barrier, barrier(), instead?
> From what I understand it will prevent the compiler from moving the memory accesses.
> This is what is currently done in __rdtgroup_move_task() and could be done here also?

A memory system (including those on x86) is allowed to reorder a store with a
later load, in addition to the compiler.

Also because the locations in question can be concurrently accessed by another
CPU, a compiler barrier would not be sufficient.

-Peter