In preparation for creating other knobs to tweak values in this register
beyond just the EPP (Efficiency/Performance Preference).
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
LGTM with a comment.
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 407 | Just some preference. Can we move this line into the caller's for loop and inline this function | |
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 407 | Not sure I understand what you mean here, so let me rephrase. You'd like setting the sc field in the caller set_cppc_request() instead of here, is that it? And inlining set_cppc_request_send_one()? If so, then there are two points of view:
If we really want to optimize something here, then we should be looking at sending a single IPI to multiple CPUs. I have already considered doing that, but did not as other things looked more pressing. That would be more efficient, but I'm not sure that would make any practical difference even for hundreds of cores. If we do that, then we could remove set_cppc_request_send_one() as a separate function (as only one use would remain). | |
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 407 | Performace is not a big deal in here. I just want the caller fill all member of the request data. But I am ok without changing this. | |
| sys/x86/cpufreq/hwpstate_amd.c | ||
|---|---|---|
| 407 | Adding a comment at the point of initialization of data about sc being filled by set_cppc_request_send_one(). | |