Repository navigation
Conversation
|
@plbossart IDK what's there on BYT and if you want to actually add arch timers (if there are any) - who's responsible for BYT support? |
|
IMO cpu_timer implementation in sof struct is broken - all non-cavs platforms return external timer instead of one in cpu. @paulstelian97 @dbaluta |
As far as I could remember, there is only one timer which is used for the timestamps in traces and for DMA trace flushing. It's already defined for this purpose. Need to check though. |
|
@jajanusz see picture below there is again no trace on BYT/CHT. the successful test is a false positive, it's broken again. |
Yea there are not traces, I know it, CI shows good, I just wrote that problem is not with scheduler, but with timers. All nonCAVS platform return external timer for call that should give internal timer (cpu timer), but I know nothing about BYT and I don't know if I should expect it to have it. Should we expect other platform to have it? It's in the core functionality, so either should be moved out of it (guarded with Kconfig etc) or supported correctly by all platforms. |
@lgirdwood @keyonjie need you to chime in here, I don't think we can rely on internal timers on Baytrail, where the core can run at 6 or 7 different speeds, adjusted depending on load. It's different to cAVS platforms where the goal was run to completion and power-gate. |
@jajanusz What I don't get is that the rest of the functionality seems unafffected, it's only the traces that are disabled? if indeed we used the wrong timer then shouldn't everything just go South? How does it impact the trace only? |
Because you return same timer in all calls (when there should be different timers) when I set timer handler for budgeting I overwrite probably some other handler that is already on wallclock. If we cannot rely on internal timers, then our god struct |
|
Blocked by #3274 |
bee1604 to
dd9c573
Compare
|
Cut budgeting with #ifdefs to not block this feature by waiting for blocking issue. |
c130c20 to
eb5c389
Compare
lgirdwood
left a comment
There was a problem hiding this comment.
Btw, do we have any accompanying documentation on how this will work in sof-docs given these new updates ?
There was a problem hiding this comment.
Are we basing the budget on 8000 timer_ticks ? If so, I think this would be better as a per platform CONFIG_ variable (given that non CAVS platforms will have a different timer).
There was a problem hiding this comment.
It's just an example. This is defined as CONFIG and defaults to 8k.
There was a problem hiding this comment.
ok, it's probably good to explain this in the Kconfig "help" for the option. I guess 8k is based on a % of total budget (based on max clock rate?). Just looking for detail so that the option can be easily tuned based on teh help.
There was a problem hiding this comment.
Well it's already in help in kconfig - that it's within 1 systick IDK if we need to add more there.
It's not really % because when you switch from HPRO to LPRO you have 120k cycles in systick instead of 400k and budget for IPCs stays the same. It's just value enough to handle IPCs without stalling other tasks.
eb5c389 to
dd9c573
Compare
Add possibility to set budget for EDF tasks. It's needed to ensure that some long running task will not stall other tasks. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
IPC task may be time consuming and has high priority, what may make other tasks stall. To prevent this it should have limited cycles budget per systick. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
IDC task may be time consuming and has high priority, what may make other tasks stall. To prevent this it should have limited cycles budget per systick. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
dd9c573 to
980163e
Compare
Restored old implementation, cos @lyakh fixed clocks for BYT and it makes code simpler. |
|
@jajanusz as we are near to v1.6 cut off here, are you happy for this in v1.6 or would you prefer to wait for v1,7 ? |
plbossart
left a comment
There was a problem hiding this comment.
Comments below, mainly to clarify some points that aren't clear to me - no change needed in the code itself.
|
|
||
| struct edf_task_pdata { | ||
| void *ctx; | ||
| uint32_t budget; /**< cycles per systick */ |
There was a problem hiding this comment.
I am pretty sure in the past we defined variable ticks for EDF. Would this scale here if the tick duration is changed dynamically. And I read in a comment below that we use '120k cycles in systick instead of 400k', so shouldn't there be multiple budget definitions, one per systick value?
| { | ||
| struct edf_task_pdata *edf_pdata = edf_sch_get_pdata(task); | ||
|
|
||
| if (!edf_pdata->budget) |
There was a problem hiding this comment.
maybe clarify with a comment in the structure definition that a budget of zero will result in a specific behavior. It's also not clear to me if this is a feature or an error condition.
|
|
||
| struct edf_task_pdata { | ||
| void *ctx; | ||
| uint32_t budget; /**< cycles per systick */ |
There was a problem hiding this comment.
also explain that bugdet can be zero, and the difference in behavior between zero and non-zero values.
We can leave it for 1.7, better to let it mature in repo, maybe some other issues will come out like with BYT, it touched a few things that were not used a lot so far (so are not stable). |
|
Feature is not needed ATM and may impose too many sideffects without extensive long-term testing, if someone will need it in the feature than it can be continued from this PR. |

PLEASE test it on BYT this time.
2nd attempt to #3057
Reverted by #3245