Commit a8c87e34 authored by Zeng Heng's avatar Zeng Heng
Browse files

arm64/mpam: Expand the monitor number of the resctrl root

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



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

Expand the monitor number of the resctrl root to 1023, instead of 255.

Fixes: 0b16164d ("arm64/mpam: Remap reqpartid,pmg to rmid and intpartid to closid")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 2ad5d68f
Loading
Loading
Loading
Loading
+14 −18
Original line number Diff line number Diff line
@@ -666,11 +666,7 @@ static int find_rdtgrp_allocable_rmid(struct resctrl_group *rdtgrp)
	struct list_head *head;

	prgrp = rdtgrp->mon.parent;
	if (prgrp == &resctrl_group_default) {
		rmid = rmid_alloc(-1);
		if (rmid < 0)
			return rmid;
	} else {

	do {
		rmid = rmid_alloc(prgrp->closid.reqpartid);
		if (rmid >= 0)
@@ -680,12 +676,12 @@ static int find_rdtgrp_allocable_rmid(struct resctrl_group *rdtgrp)
		list_for_each_entry(entry, head, mon.crdtgrp_list) {
			if (entry == rdtgrp)
				continue;

			rmid = rmid_alloc(entry->closid.reqpartid);
			if (rmid >= 0)
				break;
		}
	} while (0);
	}

	if (rmid < 0)
		rmid = rmid_alloc(-1);