Skip to content

schedule: task priority levels reversal - #1269

Merged
tlauda merged 1 commit into
thesofproject:masterfrom
bkokoszx:revert-schedule-task-priorities
Apr 17, 2019
Merged

tlauda merged 1 commit into
thesofproject:masterfrom
bkokoszx:revert-schedule-task-priorities

Conversation

@bkokoszx

Copy link
Copy Markdown
Collaborator

I've reverted level of priority tasks. Now tasks
levels are as follows:

  • level 0 - highest priority;
  • level 9 - lowest priority.

Signed-off-by: Bartosz Kokoszko bartoszx.kokoszko@linux.intel.com

I've reverted level of priority tasks. Now tasks
levels are as follows:
- level 0 - highest priority;
- level 9 - lowest priority.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
@lgirdwood

Copy link
Copy Markdown
Member

@bkokoszx any particular reason for this ? are we aligning with posix priorities ?

@xiulipan

Copy link
Copy Markdown
Contributor

@bkokoszx
Do you change the priority related to scheduler like pipeline in topology? I think they also need to be changed if you change the map of value and priority.

dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
dnl frames, deadline, priority, core)
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
1, 0, 2, s24le,
48, 1000, 0, 0)

Now we hard code pipeline schedule to be 0, with this PR it will change from SOF_TASK_PRI_LOW to SOF_TASK_PRI_HIGH. And it may influence the other design. Please provide more reason and why this change is needed.

@lgirdwood lgirdwood added the P1 Blocker bugs or important features label Apr 16, 2019
@lgirdwood

Copy link
Copy Markdown
Member

@bkokoszx I'm assigning this as P1 as it looks like it fixes a few issues suggested by @emilchudzik

@bkokoszx

bkokoszx commented Apr 17, 2019 •

Copy link
Copy Markdown
Collaborator Author

@lgirdwood
As @emilchudzik @ranj063 have checked once more it does not fix this issues, so I suspect that priority levels are not a root cause.

@lgirdwood @xiulipan @ranj063
After scheduler API refactor #1089 I've revert pipeline priorities to: 0 (lowest) - 9 (highest), but I do not change it in topology. So before #1089 PR pipeline task has higher priority than IPC task, after PR it has been reverted by my oversight.

In fact we want to pipeline task be on higher priority than ipc (as it was earlier). I can revert it to "niceness" scale as it was before (-20 - highest; 0 - medium; 19 - lowest) and do not change pipelines priority (default is 0) or we can change a pipeline priority level in topology.

@lgirdwood

Copy link
Copy Markdown
Member

@bkokoszx yes, pipeline should be higher priority than IPC. Do you have a PR pending to fix ?

@bkokoszx bkokoszx changed the title [WIP] schedule: task priority levels reversal schedule: task priority levels reversal Apr 17, 2019
@bkokoszx

Copy link
Copy Markdown
Collaborator Author

@lgirdwood
This PR reverts task priorities, so after applying it pipelines (default 0) would have higher priorities than IPC.
I do not know which idea we want to use: higher levels - lower priorities or higher levels - higher priorities. In Linux as I read there is "niceless scale" for normal processes (-20 highest; 19 lowest; we had it earlier).

@xiulipan

Copy link
Copy Markdown
Contributor

@bkokoszx
Please also carefully go through all the task priority values used by SOF_SCHEDULE_EDF.
I think this change won't influence SOF_SCHEDULE_LL type task?

@ranj063

ranj063 commented Apr 17, 2019

Copy link
Copy Markdown
Collaborator

As @emilchudzik @ranj063 have checked once more it does not fix this issues, so I suspect that priority levels are not a root cause.

@bkokoszx this PR doesnt fix the issue entirely but it is still needed as I mentioned in issue #1263

@lgirdwood

Copy link
Copy Markdown
Member

@mmaka1 @tlauda @jajanusz need another approval before we can merge, this will fix the priorities in EDF, and will improve the IPC issue (but not a final fix).

@tlauda
tlauda merged commit 8b4cc88 into thesofproject:master Apr 17, 2019
@mengdonglin

Copy link
Copy Markdown
Collaborator

@stevyan @ClarexZhou @keqiaozhang Please help check if this PR #1269 can fix #1263

@bkokoszx
bkokoszx deleted the revert-schedule-task-priorities branch March 10, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Blocker bugs or important features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants