Changeset 1433ecda in mainline for kernel/arch/sparc64/src/smp/sun4v/smp.c
- Timestamp:
- 2018-04-04T15:42:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
-
kernel/arch/sparc64/src/smp/sun4v/smp.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/smp/sun4v/smp.c
r47b2d7e3 r1433ecda 88 88 * stored to the proposed_nrdy variable of the cpu_arch_t struture. 89 89 */ 90 bool calculate_optimal_nrdy(exec_unit_t *exec_unit) { 90 bool calculate_optimal_nrdy(exec_unit_t *exec_unit) 91 { 91 92 92 93 /* calculate the number of threads the core will steal */ … … 103 104 for (k = 0; k < exec_unit->strand_count; k++) { 104 105 exec_units->cpus[k]->arch.proposed_nrdy = 105 atomic_get(&(exec_unit->cpus[k]->nrdy));106 atomic_get(&(exec_unit->cpus[k]->nrdy)); 106 107 } 107 108 … … 112 113 unsigned int least_busy = 0; 113 114 unsigned int least_busy_nrdy = 114 exec_unit->cpus[0]->arch.proposed_nrdy;115 exec_unit->cpus[0]->arch.proposed_nrdy; 115 116 116 117 /* for each stolen thread, give it to the least busy CPU */ 117 118 for (k = 0; k < exec_unit->strand_count; k++) { 118 if (exec_unit->cpus[k]->arch.proposed_nrdy 119 < least_busy_nrdy) { 119 if (exec_unit->cpus[k]->arch.proposed_nrdy < least_busy_nrdy) { 120 120 least_busy = k; 121 121 least_busy_nrdy = 122 exec_unit->cpus[k]->arch.proposed_nrdy;122 exec_unit->cpus[k]->arch.proposed_nrdy; 123 123 } 124 124 } … … 247 247 exec_units[i].strand_count++; 248 248 max_core_strands = 249 exec_units[i].strand_count > max_core_strands ?250 exec_units[i].strand_count : max_core_strands;249 exec_units[i].strand_count > max_core_strands ? 250 exec_units[i].strand_count : max_core_strands; 251 251 252 252 /* detecting execution unit failed */
Note:
See TracChangeset
for help on using the changeset viewer.
