Commit 35a5c37
committed
cpumask: Cache num_possible_cpus()
Reevaluating num_possible_cpus() over and over does not make sense. That
becomes a constant after init as cpu_possible_mask is marked ro_after_init.
Cache the value during initialization and provide that for consumption.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Link: https://patch.msgid.link/20251119172549.578653738@linutronix.de1 parent 79c11fb commit 35a5c37
2 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
1152 | 1153 | | |
1153 | 1154 | | |
1154 | 1155 | | |
1155 | | - | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
| 1162 | + | |
1162 | 1163 | | |
1163 | 1164 | | |
1164 | 1165 | | |
| |||
1211 | 1212 | | |
1212 | 1213 | | |
1213 | 1214 | | |
1214 | | - | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
1215 | 1221 | | |
1216 | 1222 | | |
1217 | 1223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3085 | 3085 | | |
3086 | 3086 | | |
3087 | 3087 | | |
| 3088 | + | |
3088 | 3089 | | |
3089 | 3090 | | |
| 3091 | + | |
3090 | 3092 | | |
3091 | 3093 | | |
| 3094 | + | |
3092 | 3095 | | |
3093 | 3096 | | |
3094 | 3097 | | |
| |||
3116 | 3119 | | |
3117 | 3120 | | |
3118 | 3121 | | |
| 3122 | + | |
3119 | 3123 | | |
3120 | 3124 | | |
3121 | 3125 | | |
| |||
3139 | 3143 | | |
3140 | 3144 | | |
3141 | 3145 | | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
3142 | 3161 | | |
3143 | 3162 | | |
3144 | 3163 | | |
| |||
0 commit comments