Function report |
Source Code:kernel\sched\topology.c |
Create Date:2022-07-28 09:42:27 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sd_init
Proto:static struct sched_domain *sd_init(struct sched_domain_topology_level *tl, const struct cpumask *cpu_map, struct sched_domain *child, int dflags, int cpu)
Type:struct sched_domain
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct sched_domain_topology_level * | tl | |
| const struct cpumask * | cpu_map | |
| struct sched_domain * | child | |
| int | dflags | |
| int | cpu |
| 1317 | sd = per_cpu_ptr(sd, cpu) |
| 1318 | sd_flags = 0 |
| 1327 | sd_weight = pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in. |
| 1331 | If WARN_ONCE(sd_flags & ~SD_flags allowed in topology descriptions, "wrong sd_flags in topology description\n") Then sd_flags &= ~SD_flags allowed in topology descriptions |
| 1338 | * sd = (struct sched_domain){sd = sd_weight, sd = 2 * sd_weight, sd = 32, sd = 125, sd = 0, sd = 1 * SD_LOAD_BALANCE | 1 * SD_BALANCE_NEWIDLE | 1 * SD_BALANCE_EXEC | 1 * SD_BALANCE_FORK | 0 * SD_BALANCE_WAKE | 1 * SD_WAKE_AFFINE | 0 * SD_SHARE_CPUCAPACITY | 0 * SD_SHARE_PKG_RESOURCES | 0 * SD_SERIALIZE | 1 * SD_PREFER_SIBLING | 0 * SD_NUMA | sd_flags, sd = jiffies, sd = sd_weight, sd = 0, sd = jiffies, sd = child, } |
| 1377 | If flags & SD_ASYM_CPUCAPACITY Then |
| 1383 | If child Then flags &= ~SD_PREFER_SIBLING |
| 1386 | for_each_lower_domain(t) flags |= SD_BALANCE_WAKE |
| 1390 | If flags & SD_SHARE_CPUCAPACITY Then |
| 1391 | imbalance_pct = 110 |
| 1393 | Else if flags & SD_SHARE_PKG_RESOURCES Then |
| 1394 | imbalance_pct = 117 |
| 1395 | cache_nice_tries = 1 |
| 1399 | cache_nice_tries = 2 |
| 1401 | flags &= ~SD_PREFER_SIBLING |
| 1402 | flags |= SD_SERIALIZE |
| 1403 | If sched_domains_numa_distance[numa_level] > node_reclaim_distance Then |
| 1404 | flags &= ~( SD_BALANCE_EXEC | SD_BALANCE_FORK | SD_WAKE_AFFINE) |
| 1410 | Else |
| 1411 | cache_nice_tries = 1 |
| 1418 | If flags & SD_SHARE_PKG_RESOURCES Then |
| 1419 | shared = per_cpu_ptr(sds, sd_id) |
| 1420 | atomic_inc( & ref) |
| 1421 | atomic_set( & nr_busy_cpus, sd_weight) |
| 1426 | Return sd |
| Name | Describe |
|---|---|
| build_sched_domain |
| 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 |