函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\rdtgroup.c Create Date:2022-07-27 09:12:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Initialize cache resources per RDT domain* Set the RDT domain up to start off with all usable allocations. That is,* all shareable and unused bits. All-zero CBM is invalid.

函数原型:static int __init_one_rdt_domain(struct rdt_domain *d, struct rdt_resource *r, unsigned int closid)

返回类型:int

参数:

类型参数名称
struct rdt_domain *d
struct rdt_resource *r
unsigned intclosid
2522  struct rdt_resource * r_cdp = NULL
2523  struct rdt_domain * d_cdp = NULL
2524  used_b等于0, unused_b等于0
2530  dt_cdp_peer_get - Retrieve CDP peer if it exists*@r: RDT resource to which RDT domain @d belongs*@d: Cache instance for which a CDP peer is requested*@r_cdp: RDT resource that shares hardware with @r (RDT resource peer)* Used to return the result
2531  have_new_ctrl = false
2532  new_ctrl等于shareable_bits
2533  used_b等于shareable_bits
2534  ctrl等于ctrl_val
2535 i小于closids_supported()循环
2538  如果mode恒等于RDT_MODE_PSEUDO_LOCKSETUP则继续下一循环
2550  如果d_cdppeer_ctl等于ctrl_val[i]
2552  否则peer_ctl等于0
2554  used_b或等于ctrl按位或peer_ctl
2555  如果mode恒等于RDT_MODE_SHAREABLEnew_ctrl或等于ctrl按位或peer_ctl
2559  如果plrcbm大于0则used_b或等于cbm
2561  unused_b等于used_b按位异或BIT_MASK(cbm_len)减1
2562  unused_b与等于BIT_MASK(cbm_len)减1
2563  new_ctrl或等于unused_b
2568  new_ctrl等于bm_ensure_valid - Enforce validity on provided CBM*@_val: Candidate CBM*@r: RDT resource to which the CBM belongs* The provided CBM represents all cache portions available for use
2573  tmp_cbm等于new_ctrl
2574  如果bitmap_weight( & tmp_cbm, cbm_len)小于min_cbm_bits
2575  rdt_last_cmd_printf("No space on %s:%d\n", name, id)
2576  返回:负ENOSPC
2578  have_new_ctrl = true
2580  返回:0
调用者
名称描述
rdtgroup_init_catInitialize cache resources with default values