Skip to content

Conversation

@softwarecki
Copy link
Collaborator

Since only one IPC request from a host is serviced at a time, the response can be stored in an existing buffer. Remove the allocation of an additional buffer to hold the response.

The buffer containing the payload of the sent IPC message should always be placed in shared memory (non-cached). Remove the unnecessary is_shared field from the ipc_msg structure and the code responsible for performing cache memory operations.

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.

Nice simplification @softwarecki !

/* no process on scheduled thread */
atomic_set(&msg_data.delayed_reply, 0);
msg_data.delayed_error = 0;
msg_reply.tx_data = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

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

not particularly against this change, but just for clarity - this is just "cleaning up," right? Without it it would work just as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is just cleaning, without this change everything should work. The code only checks the tx_size field.

@lgirdwood
Copy link
Member

@softwarecki can you take a look at CI, seeing lots of errors. Thanks !

Since only one IPC request from a host is serviced at a time, the response
can be stored in an existing buffer. Remove the allocation of an additional
buffer to hold the response.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The buffer containing the payload of the sent IPC message should always be
placed in shared memory (non-cached). Remove the unnecessary is_shared
field from the ipc_msg structure and the code responsible for performing
cache memory operations.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@kv2019i
Copy link
Collaborator

kv2019i commented Jan 16, 2025

As per #9776 (comment) , I've understood this could be hit on existing MTL/LNL/ARL configurations, so marking to v2.12 milestone for now.

@kv2019i kv2019i added this to the v2.12 milestone Jan 16, 2025
@kv2019i
Copy link
Collaborator

kv2019i commented Jan 17, 2025

Update on this: I've been reviewing impacts of the bug this is addressing (alloc on one core, free on another) and seems this case cannot be hit in configurations we are shipping in public releases. Given this and issues with CI getting this merged, I'm leaning to exclude this from 2.12 final tag today. @lgirdwood @softwarecki @lyakh please add if you have further data points to consider

@kv2019i kv2019i removed this from the v2.12 milestone Jan 17, 2025
@kv2019i kv2019i merged commit 37f240c into thesofproject:main Jan 17, 2025
45 of 49 checks passed
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.

6 participants