Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:domain_add_cpu - Add a cpu to a resource's domain list.* If an existing domain in the resource r's domain list matches the cpu's* resource id, add the cpu in the domain.* Otherwise, a new domain is allocated and inserted into the right position

Proto:static void domain_add_cpu(int cpu, struct rdt_resource *r)

Type:void

Parameter:

TypeParameterName
intcpu
struct rdt_resource *r
559  id = get_cache_id(cpu, cache_level)
560  struct list_head * add_pos = NULL
563  d = dt_find_domain - Find a domain in a resource that matches input resource id* Search resource r's domain list to find the resource id. If the resource* id is found in a domain, return the domain. Otherwise, if requested by
564  If IS_ERR(d) Then
565  pr_warn("Could't find cache id for cpu %d\n", cpu)
566  Return
569  If d Then
570  pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer
571  Return
574  d = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
575  If Not d Then Return
578  id = id
579  pumask_set_cpu - set a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@dstp: the cpumask pointer
581  If alloc_capable && domain_setup_ctrlval(r, d) Then
582  free previously allocated memory
583  Return
586  If mon_capable && domain_setup_mon_state(r, d) Then
587  free previously allocated memory
588  Return
591  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
597  If static_branch_unlikely( & rdt_mon_enable_key) Then mkdir_mondata_subdir_allrdtgrp(r, d)
Caller
NameDescribe
resctrl_online_cpu