Commit 366a2fd2 authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Yu Liao
Browse files

arm64/mpam: mark partid non-exclusive if self-owned

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7SVKK



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

MPAM manages RMID in a matrix using PARTID as columns and PMG as rows.

 ------------row---------------------->
|
|  RMID  0     1     2     3   ... 255
|        256   257   258   259 ... 511
|        512   513   514   515 ... 767
v        768   769   770   771 ... 1023

Each time mon_groups is created, a new PARTID will be consumed until all
PARTID are exhausted and PMG still has remaining. As a result, RMID
greater than 255 cannot be used. mon_groups in the same resource group
should reuse PARTID to avoid rmid waste.

Fix it by adding 'exclusive' parameter to rmid_remap_bmp_find_step_entry()
  1) Allocate non-exclusive rmid for rmid_alloc()
  2) Allocate exclusive rmid when 'partid = old_reqpartid' for
     resctrl_group_rmid_write(). Otherwise, allocate non-exclusive rmid.

Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
parent 2e7a3cda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment