Skip to content

Conversation

@johnylin76
Copy link
Contributor

adds a kconfig flag to instantiate the low-latency scheduler without task rescheduling, given that the operation is optional.

adds a config to instantiate the low-latency scheduler without task
rescheduling, given that the operation is optional.

Signed-off-by: Johny Lin <johnylin@google.com>
to skip reschedule task for LL scheduler on mt8196 platform.

Signed-off-by: Johny Lin <johnylin@google.com>

#if CONFIG_SCHEDULE_LL_NO_RESCHEDULE_TASK
/* As a null function pointer */
#define reschedule_ll_task ((void*)0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not just NULL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both ways are probably fine. The reason I chose ((void*)0) is because NULL in c is also a macro, and I'm not sure if there is any risk when a macro represents as another macro.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd be very surprised if this didn't work. We certainly have macros using macros like across a dozen or more layers. And this is in a C file, so it won't be included in other files to potentially be used in further macro definitions.

rescheduling, given that the operation is optional. Under such cases,
scheduler_ops::reschedule_task will set to NULL instead, tasks with
the attempt to reschedule (e.g. DMA trace works) will be relinguished
directly and return no error.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this is ok. One option would be to track the dependency to features (like DMA trace) also in Kconfig, but given this is opt-out, this might be too klungy.

@lgirdwood lgirdwood merged commit 31230c4 into thesofproject:main Feb 10, 2025
42 of 48 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.

4 participants