Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable DMA trace initialization in Zephyr #4452

Closed
wants to merge 3 commits into from

Conversation

marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jul 6, 2021

Just a first part. The DMA trace with the SOF dictionary works in my workspace but I'm still cleaning up the rest.

No one noticed that ll_tr was missing because the DMA trace does not
work in Zephyr and the main branch yet.

Signed-off-by: Marc Herbert <[email protected]>
Because it's mostly working now and avoids macro nesting complexity;
there is already #ifdef CONFIG_DW_SPI #elif CONFIG_TRACE

Just for the record this is reverting a very tiny part of
commit cf8e35f ("zephyr: init: create a zephyr entry point in SOF.")

Signed-off-by: Marc Herbert <[email protected]>
Reverts commit 74cacc3 ("zephyr: ipc: dont enable DMA trace
transport.") modified by commit d728276 ("ipc3: don't declare unused
variables")

Signed-off-by: Marc Herbert <[email protected]>
@lyakh
Copy link
Collaborator

lyakh commented Jul 6, 2021

Good that you've posted this, nice to see that all those parts can be safely re-enabled and the respective #ifdefs can be removed. Would it be better to wait with merging this PR until we can actually enable DMA traces with SOF+Zephyr? Firstly to avoid adding unused code to the build and secondly to first get a chance to review and test the whole set?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 6, 2021

On one hand it would be better to turn this on once the corresponding tests are ready[*]. On the other hand a ​"Continuous Integration" and "Continuous Review" approach is also valuable, it can be harder to find reviewers for large PRs and I'm one of the (few?) people who looks at tests results every day. Moreover this PR is just removing 2 hacks and fixing one minor issue, the tracing code is unused only in Zephyr and this PR makes the initialization code actually run in Zephyr, so it's not really unused.

Also keep in mind I'm testing this code (+ other work in progress) many times every day. In fact I've been sitting on these specific patches for a long time and I waited to have the sof-logger fully working before submitting them.

The next PRs should be bigger I promise :-)

[*] In fact I've already been spending a massive amount of time on the test side, see the large web of links from thesofproject/sof-test#297

https://sof-ci.01.org/sofpr/PR4452/build9577/devicetest is all green.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc-hb @lyakh do we have consensus when to merge, I dont see any harm now, unless someone tells me it will get in the way of some other work until DMA is ready ?

lyakh
lyakh previously approved these changes Jul 7, 2021
@lyakh
Copy link
Collaborator

lyakh commented Jul 7, 2021

@marc-hb @lyakh do we have consensus when to merge, I dont see any harm now, unless someone tells me it will get in the way of some other work until DMA is ready ?

@lgirdwood IMHO usually it's better to only add or enable code when it is used and can be tested, but in principle it should be fine to merge this now too, seems harmless enough.

@lyakh lyakh dismissed their stale review July 7, 2021 08:36

would like to clarify what the DMA trace task would do after this

@lyakh
Copy link
Collaborator

lyakh commented Jul 7, 2021

@marc-hb @lyakh do we have consensus when to merge, I dont see any harm now, unless someone tells me it will get in the way of some other work until DMA is ready ?

@lgirdwood IMHO usually it's better to only add or enable code when it is used and can be tested, but in principle it should be fine to merge this now too, seems harmless enough.

In fact I've looked again and it seems to me that after this PR the DMA trace task would begin scheduling periodically under Zephyr. And this doesn't work yet, right? Do we really want this even if this isn't causing any problems, which I'm not sure about?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 11, 2021

In fact I've looked again and it seems to me that after this PR the DMA trace task would begin scheduling periodically under Zephyr. And this doesn't work yet, right? Do we really want this even if this isn't causing any problems, which I'm not sure about?

It used to work until your commit your PR zephyr: switch over to a simple priority-based LL scheduler
#4377, thanks for the warning! See my recent comment there. Downgrading this to draft until this scheduler situation is resolved.

@marc-hb marc-hb mentioned this pull request Jul 21, 2021
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jul 27, 2021

Superset #4503 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants