Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\topology.c Create Date:2022-07-28 09:42:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sched_init_numa

Proto:void sched_init_numa(void)

Type:void

Parameter:Nothing

1554  curr_distance = node_distance(0, 0)
1556  level = 0
1559  sched_domains_numa_distance = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1560  If Not sched_domains_numa_distance Then Return
1564  sched_domains_numa_distance[level++] = curr_distance
1565  sched_domains_numa_levels = level
1574  next_distance = curr_distance
1575  When i < nr_node_ids cycle
1576  When j < nr_node_ids cycle
1577  When k < nr_node_ids cycle
1578  distance = node_distance(i, k)
1590  If sched_debug() && node_distance(k, i) != distance Then sched_numa_warn("Node-distance not symmetric")
1593  If sched_debug() && i && Not find_numa_distance(distance) Then sched_numa_warn("Node-0 not representative")
1596  If next_distance != curr_distance Then
1600  Else Break
1606  If Not sched_debug() Then Break
1626  sched_domains_numa_levels = 0
1628  sched_domains_numa_masks = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1629  If Not sched_domains_numa_masks Then Return
1636  When i < level cycle
1637  sched_domains_numa_masks[i] = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1639  If Not sched_domains_numa_masks[i] Then Return
1642  When j < nr_node_ids cycle
1644  If Not mask Then Return
1649  for_each_node(k)
1659  When mask cycle tl = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1663  If Not tl Then Return
1669  When mask cycle tl[i] = sched_domain_topology[i]
1675  tl[i++] = (struct sched_domain_topology_level){tl[i++] = sd_numa_mask, tl[i++] = 0, SD_INIT_NAME(NODE)}
1684  When j < level cycle
1685  tl[i] = (struct sched_domain_topology_level){tl[i] = sd_numa_mask, tl[i] = cpu_numa_flags, tl[i] = SDTL_OVERLAP, tl[i] = j, SD_INIT_NAME(NUMA)}
1694  sched_domain_topology = tl
1696  sched_domains_numa_levels = level
1697  sched_max_numa_distance = sched_domains_numa_distance[level - 1]
1699  A system can have three types of NUMA topology:* NUMA_DIRECT: all nodes are directly connected, or not a NUMA system* NUMA_GLUELESS_MESH: some nodes reachable through intermediary nodes* NUMA_BACKPLANE: nodes can reach other nodes through a backplane* The