Page MenuHomeFreeBSD

D57940.id180920.diff
No OneTemporary

D57940.id180920.diff

Index: sys/dev/intelhfi/intelhfi.c
===================================================================
--- sys/dev/intelhfi/intelhfi.c
+++ sys/dev/intelhfi/intelhfi.c
@@ -177,7 +177,7 @@
struct hmp_pcpu *hp;
uint64_t msrval;
uint8_t *highperf;
- uint8_t maxperf;
+ uint8_t minperf = 255;
int cpu;
int ret = 0;
@@ -198,16 +198,16 @@
/* Read CPU each core high perf. value from IA32_HWP_CAPABILITIES msr */
smp_rendezvous(NULL, intelhfi_hmp_capacity_read_highperf, NULL, highperf);
- /* Search MAX capacity core */
+ /* Search MIN capacity core */
for (int c=0; c<mp_ncpus; c++) {
- if (*(highperf+c)>maxperf)
- maxperf = *(highperf+c);
+ if (*(highperf+c)<minperf)
+ minperf = *(highperf+c);
}
/* Set CPU core capacity for HMP */
CPU_FOREACH(cpu) {
hp = DPCPU_ID_PTR(cpu, hmp_pcpu);
- hp->capacity = HMP_CAPACITY_NORMAL_FROM(*(highperf+cpu), maxperf);
+ hp->capacity = HMP_CAPACITY_NORMAL_FROM(*(highperf+cpu), minperf);
}
free(highperf, M_INTELHFI);
@@ -263,10 +263,10 @@
KASSERT(hp != NULL, ("DPCPU area is NULL."));
if (*(capflags+0) & INTELHFI_GH_FLAG_REPORT)
- hmp_set_score(hp, HMP_SCORE_PERF, (hmp_score_t)(*(entry+0)));
+ hmp_set_score(hp, HMP_SCORE_PERF, (((hmp_score_t)(*(entry+0)))<<2));
if (*(capflags+1) & INTELHFI_GH_FLAG_REPORT)
- hmp_set_score(hp, HMP_SCORE_EFF, (hmp_score_t)(*(entry+1)));
+ hmp_set_score(hp, HMP_SCORE_EFF, (((hmp_score_t)(*(entry+1)))<<2));
}
}
}

File Metadata

Mime Type
text/plain
Expires
Mon, Jul 6, 8:01 PM (5 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34692321
Default Alt Text
D57940.id180920.diff (1 KB)

Event Timeline