Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161672300
D57940.id180920.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57940.id180920.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 6, 8:04 PM (5 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34692321
Default Alt Text
D57940.id180920.diff (1 KB)
Attached To
Mode
D57940: intelhfi - Intel TD/HFI driver - Part4b: Modifications due to hmp(4) interface change
Attached
Detach File
Event Timeline
Log In to Comment