Skip to content

scheduler: generic scheduler and work api - #1089

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
bkokoszx:scheduler-generic-api-rebase
Mar 19, 2019
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
bkokoszx:scheduler-generic-api-rebase

Conversation

@bkokoszx

@bkokoszx bkokoszx commented Mar 6, 2019 •

Copy link
Copy Markdown
Collaborator

This PR provides generic scheduler API. Source API code is placed in schedule (.c/.h) sources.
Specific existing schedulers were renamed:

  1. schedule (.c/.h) -> edf_schedule (.c/.h)
  2. work (.c/.h) -> ll_schedule (.c/.h)

Each scheduler export structure with pointers to its own, specific functions. API using task type, selects proper scheduler specific function and calls it.

@tlauda tlauda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In general it's OK.
Just few more unifications needed.

Comment thread src/arch/xtensa/smp/cpu.c Outdated
Comment thread src/arch/xtensa/smp/idc.c Outdated
Comment thread src/arch/xtensa/smp/init.c Outdated
Comment thread src/arch/xtensa/task.c Outdated
Comment thread src/audio/volume.c Outdated
Comment thread src/lib/edf_schedule.c Outdated
Comment thread src/lib/edf_schedule.c Outdated
Comment thread src/lib/edf_schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch 3 times, most recently from 828393b to 5a19c5a Compare March 6, 2019 16:34

@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.

In general we need to align and unify all our client facing scheduler APIs and structures. We also need to support more priority levels and support different schedulers types (using a structure of function pointers to abstract each scheduler to the core logic).

Comment thread src/arch/xtensa/smp/init.c Outdated
Comment thread src/include/sof/low_latency_schedule.h Outdated
Comment thread src/include/sof/schedule.h Outdated
Comment thread src/include/sof/schedule.h Outdated
Comment thread src/include/sof/schedule.h Outdated
Comment thread src/drivers/intel/cavs/hda-dma.c Outdated
Comment thread src/include/sof/low_latency_schedule.h Outdated
Comment thread src/lib/low_latency_schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
Comment thread src/arch/host/include/arch/task.h Outdated
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch 10 times, most recently from 82f70e3 to 905a2bd Compare March 7, 2019 15:47
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch 5 times, most recently from cc7305d to 885c966 Compare March 12, 2019 15:46
@bkokoszx

Copy link
Copy Markdown
Collaborator Author

@lgirdwood
I've applied your naming suggestions. Could below request:
#1089 (comment)
be made in another PR since it requires some logic changes in ll (work queue)?

@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch from 885c966 to bcd3189 Compare March 12, 2019 15:55
Comment thread src/arch/xtensa/smp/xtos/xtos-structs.h Outdated
Comment thread src/audio/pipeline.c Outdated
Comment thread src/audio/tone.c Outdated
Comment thread src/include/sof/agent.h Outdated
Comment thread src/include/sof/audio/buffer.h Outdated
Comment thread src/lib/ll_schedule.c Outdated
Comment thread src/lib/ll_schedule.c Outdated
Comment thread src/platform/baytrail/platform.c Outdated
Comment thread src/platform/haswell/platform.c Outdated
Comment thread src/platform/intel/cavs/platform.c Outdated
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch 4 times, most recently from 68eec0f to 76b841c Compare March 13, 2019 10:43
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch from 76b841c to 6f1314f Compare March 13, 2019 11:14
@tlauda

tlauda commented Mar 13, 2019

Copy link
Copy Markdown
Contributor

@lgirdwood Now everything looks OK for me. Could you take a look, so we could proceed with further PRs?

@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.

Looking in the right direction now. Mostly minor changes needed.

Comment thread src/arch/xtensa/smp/schedule.c Outdated
Comment thread src/arch/xtensa/smp/xtos/xtos-structs.h Outdated
Comment thread src/arch/xtensa/task.c Outdated
Comment thread src/arch/xtensa/task.c Outdated
Comment thread src/arch/xtensa/task.c Outdated
Comment thread src/lib/ll_schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
Comment thread src/lib/schedule.c Outdated
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch 2 times, most recently from 0432bb3 to 8cd1bd6 Compare March 15, 2019 16:18
@michalgrodzicki

Copy link
Copy Markdown

HI @lgirdwood, are you ok with this patch? Can we merge it or some additional work is needed?

This commit:
1. Renames specific schedulers:
	- schedule (.c/.h) -> edf_schedule (.c/.h)
	- work (.c/.h) -> ll_schedule (.c/.h)
2. Implements new generic scheduler api based on generic
   struct with scheduler ops. Every specific
   scheduler exports struct with pointers to its
   specific functions.
3. Makes edf and ll using generic api (exports structure
   with pointers to its own specific functions)
4. Updates host and pipeline tests due to scheduler
   changes.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
@bkokoszx
bkokoszx force-pushed the scheduler-generic-api-rebase branch from 8cd1bd6 to 748a6a7 Compare March 19, 2019 07:53

@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.

I'll merge this now as I think it's better to fix the nitpicks incrementally in subsequent PRs. QA can also stress test now on multiple platforms.

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.

7 participants