Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_cache_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 resource control updates from Borislav Petkov:

- Add return value descriptions to several internal functions,
addressing kernel-doc complaints

- Add the x86 maintainer mailing list to the resctrl section so they
are automatically included in patch submissions, and reference the
applicable contribution rules document

- Allow users to apply a single Capacity Bitmask to all cache domains
at once using '*' as a shorthand, instead of having to specify each
domain individually. This is particularly user-friendly on high
core-count systems with many cache clusters

- When a user provides a non-existent domain ID while configuring cache
allocation, ensure the failure reason is properly reported to the
user rather than silently returning an error with a misleading "ok"
status

* tag 'x86_cache_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
fs/resctrl: Add missing return value descriptions
MAINTAINERS: Update resctrl entry
fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains
fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm

+36 -4
+8
Documentation/filesystems/resctrl.rst
··· 215 215 # cat /sys/fs/resctrl/info/L3/io_alloc_cbm 216 216 0=00ff;1=000f 217 217 218 + An ID of "*" configures all domains with the provided CBM. 219 + 220 + Example on a system that does not require a minimum number of consecutive bits in the mask:: 221 + 222 + # echo "*=0" > /sys/fs/resctrl/info/L3/io_alloc_cbm 223 + # cat /sys/fs/resctrl/info/L3/io_alloc_cbm 224 + 0=0;1=0 225 + 218 226 When CDP is enabled "io_alloc_cbm" associated with the CDP_DATA and CDP_CODE 219 227 resources may reflect the same values. For example, values read from and 220 228 written to /sys/fs/resctrl/info/L3DATA/io_alloc_cbm may be reflected by
+2
MAINTAINERS
··· 22178 22178 RDT - RESOURCE ALLOCATION 22179 22179 M: Tony Luck <tony.luck@intel.com> 22180 22180 M: Reinette Chatre <reinette.chatre@intel.com> 22181 + M: x86@kernel.org 22181 22182 R: Dave Martin <Dave.Martin@arm.com> 22182 22183 R: James Morse <james.morse@arm.com> 22183 22184 R: Babu Moger <babu.moger@amd.com> 22184 22185 L: linux-kernel@vger.kernel.org 22185 22186 S: Supported 22187 + P: Documentation/process/maintainer-tip.rst 22186 22188 F: Documentation/filesystems/resctrl.rst 22187 22189 F: arch/x86/include/asm/resctrl.h 22188 22190 F: arch/x86/kernel/cpu/resctrl/
+18 -4
fs/resctrl/ctrlmondata.c
··· 954 954 struct resctrl_schema *s, u32 closid) 955 955 { 956 956 enum resctrl_conf_type peer_type; 957 + unsigned long dom_id = ULONG_MAX; 957 958 struct rdt_parse_data data; 958 959 struct rdt_ctrl_domain *d; 960 + bool update_all = false; 959 961 char *dom = NULL, *id; 960 - unsigned long dom_id; 961 962 962 963 next: 963 964 if (!line || line[0] == '\0') 964 965 return 0; 965 966 967 + if (update_all) { 968 + rdt_last_cmd_puts("Configurations after global '*'\n"); 969 + return -EINVAL; 970 + } 971 + 966 972 dom = strsep(&line, ";"); 967 973 id = strsep(&dom, "="); 968 - if (!dom || kstrtoul(id, 10, &dom_id)) { 974 + 975 + if (dom && !strcmp(id, "*")) { 976 + update_all = true; 977 + } else if (!dom || kstrtoul(id, 10, &dom_id)) { 969 978 rdt_last_cmd_puts("Missing '=' or non-numeric domain\n"); 970 979 return -EINVAL; 971 980 } 972 981 973 982 dom = strim(dom); 974 983 list_for_each_entry(d, &r->ctrl_domains, hdr.list) { 975 - if (d->hdr.id == dom_id) { 984 + if (update_all || d->hdr.id == dom_id) { 976 985 data.buf = dom; 977 986 data.mode = RDT_MODE_SHAREABLE; 978 987 data.closid = closid; ··· 997 988 &d->staged_config[s->conf_type], 998 989 sizeof(d->staged_config[0])); 999 990 } 1000 - goto next; 991 + if (!update_all) 992 + goto next; 1001 993 } 1002 994 } 1003 995 996 + if (update_all) 997 + goto next; 998 + 999 + rdt_last_cmd_printf("Invalid domain %lu\n", dom_id); 1004 1000 return -EINVAL; 1005 1001 } 1006 1002
+2
fs/resctrl/monitor.c
··· 234 234 * 235 235 * When the CLOSID and RMID are independent numbers, the first free CLOSID will 236 236 * be returned. 237 + * 238 + * Return: Free CLOSID on success, < 0 on failure. 237 239 */ 238 240 int resctrl_find_cleanest_closid(void) 239 241 {
+6
fs/resctrl/rdtgroup.c
··· 1519 1519 * 1520 1520 * @cbm is unsigned long, even if only 32 bits are used to make the 1521 1521 * bitmap functions work correctly. 1522 + * 1523 + * Return: Size (in bytes) of cache portion represented by CBM, 0 on failure. 1522 1524 */ 1523 1525 unsigned int rdtgroup_cbm_to_size(struct rdt_resource *r, 1524 1526 struct rdt_ctrl_domain *d, unsigned long cbm) ··· 3104 3102 * @mevt: The type of event file being created. 3105 3103 * @do_sum: Whether SNC summing monitors are being created. Only set 3106 3104 * when @rid == RDT_RESOURCE_L3. 3105 + * 3106 + * Return: Pointer to mon_data private data of the event, NULL on failure. 3107 3107 */ 3108 3108 static struct mon_data *mon_get_kn_priv(enum resctrl_res_level rid, int domid, 3109 3109 struct mon_evt *mevt, ··· 3500 3496 * resource group is initialized. The user can follow this with a 3501 3497 * modification to the CBM if the default does not satisfy the 3502 3498 * requirements. 3499 + * 3500 + * Return: A CBM that is valid for resource @r. 3503 3501 */ 3504 3502 static u32 cbm_ensure_valid(u32 _val, struct rdt_resource *r) 3505 3503 {