Skip to content

Commit 52bd8b3

Browse files
committed
dp: remove deadline recalculation at the start of LL run
Currently DP deadlines are recalculated in the beginning and the end of each LL scheduling tick. As discussed in thesofproject#10177 (comment) recalculating it in the beginning is superfluous. Remove it. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent c1b8889 commit 52bd8b3

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

src/include/sof/lib/notifier.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ enum notify_id {
3232
NOTIFIER_ID_BUFFER_FREE, /* struct buffer_cb_free* */
3333
NOTIFIER_ID_DMA_COPY, /* struct dma_cb_data* */
3434
NOTIFIER_ID_LL_POST_RUN, /* NULL */
35-
NOTIFIER_ID_LL_PRE_RUN, /* NULL */
3635
NOTIFIER_ID_DMA_IRQ, /* struct dma_chan_data * */
3736
NOTIFIER_ID_DAI_TRIGGER, /* struct dai_group * */
3837
NOTIFIER_ID_MIC_PRIVACY_STATE_CHANGE, /* struct mic_privacy_settings * */

src/schedule/ll_schedule.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ static void schedule_ll_tasks_run(void *data)
313313

314314
perf_cnt_init(&sch->pcd);
315315

316-
notifier_event(sch, NOTIFIER_ID_LL_PRE_RUN,
317-
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);
318-
319316
/* run tasks if there are any pending */
320317
if (schedule_ll_is_pending(sch))
321318
schedule_ll_tasks_execute(sch);

src/schedule/zephyr_dp_schedule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ void scheduler_dp_ll_tick(void *receiver_data, enum notify_id event_type, void *
231231
unsigned int lock_key;
232232
struct scheduler_dp_data *dp_sch = scheduler_get_data(SOF_SCHEDULE_DP);
233233

234-
if (event_type == NOTIFIER_ID_LL_PRE_RUN)
235-
/* remember current timestamp as "NOW" */
236-
dp_sch->last_ll_tick_timestamp = k_cycle_get_32();
234+
/* remember current timestamp as "NOW" */
235+
dp_sch->last_ll_tick_timestamp = k_cycle_get_32();
237236

238237
lock_key = scheduler_dp_lock(cpu_get_id());
239238
scheduler_dp_recalculate(dp_sch, event_type == NOTIFIER_ID_LL_POST_RUN);
@@ -363,7 +362,6 @@ int scheduler_dp_init(void)
363362
if (ret)
364363
return ret;
365364

366-
notifier_register(NULL, NULL, NOTIFIER_ID_LL_PRE_RUN, scheduler_dp_ll_tick, 0);
367365
notifier_register(NULL, NULL, NOTIFIER_ID_LL_POST_RUN, scheduler_dp_ll_tick, 0);
368366

369367
return 0;

src/schedule/zephyr_ll.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ static void zephyr_ll_run(void *data)
176176
struct list_item *list, *tmp, task_head = LIST_INIT(task_head);
177177
uint32_t flags;
178178

179-
notifier_event(sch, NOTIFIER_ID_LL_PRE_RUN,
180-
NOTIFIER_TARGET_CORE_LOCAL, NULL, 0);
181-
182179
zephyr_ll_lock(sch, &flags);
183180

184181
/*

0 commit comments

Comments
 (0)