ipc4: Simplify ipc response sending memory allocations by softwarecki · Pull Request #9777 · thesofproject/sof · GitHub
Skip to content

ipc4: Simplify ipc response sending memory allocations#9777

Merged
kv2019i merged 2 commits into
thesofproject:mainfrom
softwarecki:ipc-remove-alloc
Jan 17, 2025
Merged

ipc4: Simplify ipc response sending memory allocations#9777
kv2019i merged 2 commits into
thesofproject:mainfrom
softwarecki:ipc-remove-alloc

Conversation

@softwarecki

Copy link
Copy Markdown
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.

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice simplification @softwarecki !

Comment thread src/ipc/ipc4/handler.c

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

kv2019i commented Jan 16, 2025

Copy link
Copy Markdown
Collaborator

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

kv2019i commented Jan 17, 2025

Copy link
Copy Markdown
Collaborator

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