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

sched/wqueue: fix issue about worker can't wake up thread before work_thread running #9007

Merged
merged 1 commit into from Apr 18, 2023

Conversation

Donny9
Copy link
Contributor

@Donny9 Donny9 commented Apr 12, 2023

Summary

sched/wqueue: fix issue about worker can't wake up thread before work_thread running_thread running

Problem:
AppBringup task in default priority 240 ->
board_late_initialize() ->
some driver called work_queue() ->
nxsem_post(&(wqueue).sem) failed because sem_count is 0

hp work_thread in default priority 224 ->
nxsem_wait_uninterruptible(&wqueue->sem);

so hp_work_thread can't wake up, worker can't run immediately.

Signed-off-by: dongjiuzhu1 dongjiuzhu1@xiaomi.com

Impact

start work queue at board_late_initialize step.

Testing

local test

@pkarashchenko
Copy link
Contributor

What is the impact on LPWORK?

@Donny9
Copy link
Contributor Author

Donny9 commented Apr 13, 2023

What is the impact on LPWORK?

Same impact for lpwork and hpwork. Because the priority of AppBringup is higher lpwork and hpwork.

@pkarashchenko
Copy link
Contributor

Please rebase

…_thread running

Problem:
AppBringup task in default priority 240 ->
board_late_initialize() ->
   some driver called work_queue() ->
      nxsem_post(&(wqueue).sem) failed because sem_count is 0

hp work_thread in default priority 224 ->
      nxsem_wait_uninterruptible(&wqueue->sem);

so hp_work_thread can't wake up, worker can't run immediately.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 1f665e3 into apache:master Apr 18, 2023
26 checks passed
@jerpelea jerpelea added this to To-Add in Release Notes - 12.2.0 Jun 13, 2023
@jerpelea jerpelea moved this from To-Add to In Progress in Release Notes - 12.2.0 Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants