Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\rdtgroup.c Create Date:2022-07-28 08:12:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static int __init_one_rdt_domain(struct rdt_domain *d, struct rdt_resource *r, unsigned int closid)

Type:int

Parameter:

TypeParameterName
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  When i < closids_supported() cycle
2538  If mode == RDT_MODE_PSEUDO_LOCKSETUP Then Continue
2550  If d_cdp Then peer_ctl = ctrl_val[i]
2552  Else peer_ctl = 0
2554  used_b |= ctrl | peer_ctl
2555  If mode == RDT_MODE_SHAREABLE Then new_ctrl |= ctrl | peer_ctl
2559  If plr && cbm > 0 Then 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  If bitmap_weight( & tmp_cbm, cbm_len) < min_cbm_bits Then
2575  rdt_last_cmd_printf("No space on %s:%d\n", name, id)
2576  Return -ENOSPC
2578  have_new_ctrl = true
2580  Return 0
Caller
NameDescribe
rdtgroup_init_catInitialize cache resources with default values