函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dtgroup_pseudo_lock_create - Create a pseudo-locked region*@rdtgrp: resource group to which pseudo-lock region belongs* Called when a resource group in the pseudo-locksetup mode receives a* valid schemata that should be pseudo-locked

函数原型:int rdtgroup_pseudo_lock_create(struct rdtgroup *rdtgrp)

返回类型:int

参数:

类型参数名称
struct rdtgroup *rdtgrp
1273  plr等于plr
1279  ret等于pseudo_lock_region_alloc - Allocate kernel memory that will be pseudo-locked*@plr: pseudo-lock region* Initialize the details required to set up the pseudo-locked region and* allocate the contiguous memory that will be pseudo-locked to the cache.
1280  如果ret小于0则返回:ret
1283  ret等于pseudo_lock_cstates_constrain - Restrict cores from entering C6* To prevent the cache from being affected by power management entering* C6 has to be avoided
1284  如果ret小于0则
1285  ret等于负EINVAL
1286  转到:out_region
1289  thread_done等于0
1291  thread等于kthread_create_on_node(pseudo_lock_fn - Load kernel memory into cache*@_rdtgrp: resource group to which pseudo-lock region belongs* This is the core pseudo-locking flow, rdtgrp, cpu_to_node(cpu), "pseudo_lock/%u", cpu)
1294  如果是错误
1295  ret等于错误
1296  rdt_last_cmd_printf("Locking thread returned error %d\n", ret)
1297  转到:out_cstates
1300  kthread_bind(thread, cpu)
1301  唤醒中断线程
1303  ret等于wait_event_interruptible - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(lock_thread_wq, thread_done == 1)
1305  如果ret小于0则
1314  rdt_last_cmd_puts("Locking thread interrupted\n")
1315  转到:out_cstates
1318  ret等于pseudo_lock_minor_get - Obtain available minor number*@minor: Pointer to where new minor number will be stored* A bitmask is used to track available minor numbers. Here the next free* minor number is marked as unavailable and returned.
1319  如果ret小于0则
1320  rdt_last_cmd_puts("Unable to obtain a new minor number\n")
1321  转到:out_cstates
1333  mutex_unlock( & Mutex to protect rdtgroup access. )
1335  如果非是错误或空
1336  debugfs_dir等于debugfs_create_dir(name, debugfs_resctrl)
1338  如果非是错误或空debugfs_create_file("pseudo_lock_measure", 0200, debugfs_dir, rdtgrp, & pseudo_measure_fops)
1344  dev等于device_create(pseudo_lock_class, NULL, MKDEV(Major number assigned to and shared by all devices exposing* pseudo-locked regions., new_minor), rdtgrp, "%s", name)
1348  mutex_lock( & Mutex to protect rdtgroup access. )
1350  如果是错误
1351  ret等于错误
1352  rdt_last_cmd_printf("Failed to create character device: %d\n", ret)
1354  转到:out_debugfs
1358  如果flags按位与dtgroup.flags
1359  ret等于负ENODEV
1360  转到:out_device
1363  minor等于new_minor
1365  mode等于RDT_MODE_PSEUDO_LOCKED
1366  closid_free(closid)
1367  dtgroup_kn_mode_restore - Restore user access to named resctrl file*@r: The resource group with which the file is associated.*@name: Name of the file*@mask: Mask of permissions that should be restored* Restore the permissions of the named file
1368  dtgroup_kn_mode_restore - Restore user access to named resctrl file*@r: The resource group with which the file is associated.*@name: Name of the file*@mask: Mask of permissions that should be restored* Restore the permissions of the named file
1370  ret等于0
1371  转到:out
1373  out_device :
1374  device_destroy(pseudo_lock_class, MKDEV(Major number assigned to and shared by all devices exposing* pseudo-locked regions., new_minor))
1375  out_debugfs :
1376  debugfs_remove_recursive(debugfs_dir)
1377  pseudo_lock_minor_release - Return minor number to available*@minor: The minor number made available
1378  out_cstates :
1379  pseudo_lock_cstates_relax(plr)
1380  out_region :
1381  pseudo_lock_region_clear - Reset pseudo-lock region data*@plr: pseudo-lock region* All content of the pseudo-locked region is reset - any memory allocated* freed.* Return: void
1382  out :
1383  返回:ret
调用者
名称描述
rdtgroup_schemata_write