Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh This seems to have notable impact in large test runs.
The one thing I don't fully understand is where are we writing to the mailbox. I only see reads from this memory, so not clear how can we have dirty data in the cache that would be written on top of whatever host writes to area.
ipc_msg_send() only writes to the registers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kv2019i right, if we aren't writing there (and we shouldn't) then the DSP shouldn't mark the cache as dirty and therefore shouldn't write it back speculatively. So, indeed, probably it would be enough to make sure not to write there. Unfortunately, we do have a couple of locations where we write there. Probes do that, but they aren't used in our CI tests, so that wouldn't be the reason for failures. But I think I found more locations where that happens: in lines like
in copier.c. I'm working on further patches to fix that. If that's the only location, then fixing it should make this commit superfluous. We also need to check that we don't write caches back ourselves, and so far I don't see such cases.