diff options
| author | Maxim Sobolev <sobomax@FreeBSD.org> | 2006-09-20 00:10:30 +0000 |
|---|---|---|
| committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2006-09-20 00:10:30 +0000 |
| commit | d645e0e0e5e57ffcfad2dea9a9eaec1710229984 (patch) | |
| tree | ce9ecc7b036cb7d6d4442df7141289d020b02845 | |
| parent | 9a9a590a299a2a271685726272272d8ebcebbbaf (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/local_apic.c | 12 | ||||
| -rw-r--r-- | sys/i386/i386/local_apic.c | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sys/amd64/amd64/local_apic.c b/sys/amd64/amd64/local_apic.c index cee494ac8b28..273e93950220 100644 --- a/sys/amd64/amd64/local_apic.c +++ b/sys/amd64/amd64/local_apic.c @@ -611,6 +611,18 @@ lapic_handle_timer(struct clockframe frame) { struct lapic *la; +#ifdef SMP + /* + * Don't do any accounting for the disabled HTT cores, since it + * will provide misleading numbers for the userland. + * + * No locking is necessary here, since even if we loose the race + * when hlt_cpus_mask changes it is not a big deal, really. + */ + if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0) + return; +#endif + la = &lapics[PCPU_GET(apic_id)]; (*la->la_timer_count)++; critical_enter(); diff --git a/sys/i386/i386/local_apic.c b/sys/i386/i386/local_apic.c index da1fb54ddea5..a961938a2c47 100644 --- a/sys/i386/i386/local_apic.c +++ b/sys/i386/i386/local_apic.c @@ -611,6 +611,18 @@ lapic_handle_timer(struct clockframe frame) { struct lapic *la; +#ifdef SMP + /* + * Don't do any accounting for the disabled HTT cores, since it + * will provide misleading numbers for the userland. + * + * No locking is necessary here, since even if we loose the race + * when hlt_cpus_mask changes it is not a big deal, really. + */ + if ((hlt_cpus_mask & (1 << PCPU_GET(cpuid))) != 0) + return; +#endif + la = &lapics[PCPU_GET(apic_id)]; (*la->la_timer_count)++; critical_enter(); |
