Commit 2ab89c89 authored by James Morse's avatar James Morse Committed by Yang Yingliang
Browse files

arm64/mpam: resctrl: Re-synchronise resctrl's view of online CPUs



hulk inclusion
category: feature
bugzilla: 34278
CVE: NA

-------------------------------------------------

So far we probe devices as they become accessible. Each time we probe
a new device, we eagerly schedule mpam_enable(). Once all the
devices have been probed mpam_enable() will poke resctrl.

At this point, resctrl has an inconcistent view of which CPUs are online,
as we only update the the classes that we picked, and we only
did that after there were enough CPUs online to have probed all
the devices.

Instead of having some complicated re-sync logic, unregister
the cpuhp callbacks, register resctrl, then re-register them.
As we know all the devices have been probed, no-one can find a new
one to cause mpam_enable() to be re-scheduled.

[Wang ShaoBo: many version adaptation changes]

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Link: http://www.linux-arm.org/git?p=linux-jm.git;a=patch;h=e81ea2f3ca64d8e46a05195cb126a03f4ca846ef


Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent a453ee05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment