Commit e1535134 authored by James Morse's avatar James Morse Committed by Zeng Heng
Browse files

x86/resctrl: Describe resctrl's bitmap size assumptions

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T2RT

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/log/?h=mpam/snapshot/v6.7-rc2



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

resctrl stores the bitmaps and has a closid bitmap stored in u32.

MPAM supports bitmaps and partids bigger than this.

Add some preprocessor values that make it clear why MPAM clamps
some of these values.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent c054efea
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,17 @@ int proc_resctrl_show(struct seq_file *m,
/* max value for struct rdt_domain's mbps_val */
#define MBA_MAX_MBPS   U32_MAX

/*
 * Resctrl uses a u32 as a closid bitmap. The maximum closid is 32.
 */
#define RESCTRL_MAX_CLOSID		32

/*
 * Resctrl uses u32 to hold the user-space config. The maximum bitmap size is
 * 32.
 */
#define RESCTRL_MAX_CBM			32

/**
 * struct pseudo_lock_region - pseudo-lock region information
 * @s:			Resctrl schema for the resource to which this