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:11:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dt_bit_usage_show - Display current usage of resources* A domain is a shared resource that can now be allocated differently

Proto:static int rdt_bit_usage_show(struct kernfs_open_file *of, struct seq_file *seq, void *v)

Type:int

Parameter:

TypeParameterName
struct kernfs_open_file *of
struct seq_file *seq
void *v
796  r = priv
801  sw_shareable = 0 , hw_shareable = 0
802  exclusive = 0 , pseudo_locked = 0
806  bool sep = false
809  mutex_lock( & Mutex to protect rdtgroup access. )
810  hw_shareable = shareable_bits
812  If sep Then seq_putc(seq, ';')
814  ctrl = ctrl_val
815  sw_shareable = 0
816  exclusive = 0
817  seq_printf(seq, "%d=", id)
818  When i < closids_supported() cycle
819  If Not losid_allocated - test if provided closid is in use*@closid: closid to be tested* Return: true if @closid is currently associated with a resource group,* false if @closid is free Then Continue
821  mode = dtgroup_mode_by_closid - Return mode of resource group with closid*@closid: closid if the resource group* Each resource group is associated with a @closid
823  Case mode == RDT_MODE_SHAREABLE
824  sw_shareable |= ctrl
825  Break
826  Case mode == RDT_MODE_EXCLUSIVE
827  exclusive |= ctrl
828  Break
837  Break
838  Case mode == RDT_MODE_PSEUDO_LOCKED
839  Case mode == RDT_NUM_MODES
840  WARN(1, "invalid mode for closid %d\n", i)
842  Break
845  When i >= 0 cycle
846  pseudo_locked = If plr Then cbm Else 0
847  hwb = st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
848  swb = st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
849  excl = st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
850  psl = st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
851  If hwb && swb Then seq_putc(seq, 'X')
853  Else if hwb && Not swb Then seq_putc(seq, 'H')
855  Else if Not hwb && swb Then seq_putc(seq, 'S')
857  Else if excl Then seq_putc(seq, 'E')
859  Else if psl Then seq_putc(seq, 'P')
861  Else seq_putc(seq, '0')
864  sep = true
866  seq_putc(seq, '\n')
867  mutex_unlock( & Mutex to protect rdtgroup access. )
868  Return 0