函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sched_init_numa

函数原型:void sched_init_numa(void)

返回类型:void

参数:

1554  curr_distance等于node_distance(0, 0)
1556  level等于0
1559  sched_domains_numa_distance等于分配内存并置零
1560  如果非sched_domains_numa_distance则返回
1564  sched_domains_numa_distance[level++]等于curr_distance
1565  sched_domains_numa_levels等于level
1574  next_distance等于curr_distance
1575 i小于nr_node_ids循环
1576 j小于nr_node_ids循环
1577 k小于nr_node_ids循环
1578  distance等于node_distance(i, k)
1590  如果sched_debug()且node_distance(k, i)不等于distancesched_numa_warn("Node-distance not symmetric")
1593  如果sched_debug()且i且非find_numa_distance(distance)则sched_numa_warn("Node-0 not representative")
1596  如果next_distance不等于curr_distance
1600  否则退出
1606  如果非sched_debug()则退出
1626  sched_domains_numa_levels等于0
1628  sched_domains_numa_masks等于分配内存并置零
1629  如果非sched_domains_numa_masks则返回
1636 i小于level循环
1637  sched_domains_numa_masks[i]等于分配内存并置零
1639  如果非sched_domains_numa_masks[i]则返回
1642 j小于nr_node_ids循环
1644  如果非mask则返回
1649  for_each_node(k)
1659 mask循环tl等于分配内存并置零
1663  如果非tl则返回
1669 mask循环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 j小于level循环
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