Function report |
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 activity | Download SCCT | Chinese |
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) |
1580 | If distance > curr_distance && ( distance < next_distance || next_distance == curr_distance ) Then next_distance = distance |
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 |
1597 | sched_domains_numa_distance[level++] = next_distance |
1598 | sched_domains_numa_levels = level |
1599 | curr_distance = next_distance |
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 |
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 |
1643 | mask = 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). |
1644 | If Not mask Then Return |
1647 | sched_domains_numa_masks[i][j] = mask |
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 |
1675 | tl[i++] = (struct sched_domain_topology_level){tl[i++] = sd_numa_mask, tl[i++] = 0, SD_INIT_NAME(NODE)} |
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] |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |