On 5 July 2017 at 01:31, Savolainen, Petri (Nokia - FI/Espoo) <petri.savolai...@nokia.com> wrote: > > >> -----Original Message----- >> From: Honnappa Nagarahalli [mailto:honnappa.nagaraha...@linaro.org] >> Sent: Wednesday, July 05, 2017 7:04 AM >> To: Petri Savolainen <petri.savolai...@linaro.org> >> Cc: lng-odp-forward <lng-odp@lists.linaro.org> >> Subject: Re: [lng-odp] [API-NEXT PATCH 1/4] linux-gen: sched: remove >> schedule interface depedency to qentry >> >> On 30 June 2017 at 09:10, Petri Savolainen <petri.savolai...@linaro.org> >> wrote: >> > Do not use queue internal type in schedule interface. >> > >> > Signed-off-by: Petri Savolainen <petri.savolai...@linaro.org> >> > --- >> > platform/linux-generic/include/odp_schedule_if.h | 8 +++-- >> > platform/linux-generic/odp_queue.c | 9 ++++-- >> > platform/linux-generic/odp_schedule.c | 18 ++++------- >> > platform/linux-generic/odp_schedule_iquery.c | 41 +++++++++++++---- >> ------- >> > platform/linux-generic/odp_schedule_sp.c | 18 +++-------- >> > 5 files changed, 45 insertions(+), 49 deletions(-) >> > >> > diff --git a/platform/linux-generic/include/odp_schedule_if.h >> b/platform/linux-generic/include/odp_schedule_if.h >> > index 5877a1cd..5abbb732 100644 >> > --- a/platform/linux-generic/include/odp_schedule_if.h >> > +++ b/platform/linux-generic/include/odp_schedule_if.h >> > @@ -35,9 +35,10 @@ typedef int (*schedule_term_local_fn_t)(void); >> > typedef void (*schedule_order_lock_fn_t)(void); >> > typedef void (*schedule_order_unlock_fn_t)(void); >> > typedef unsigned (*schedule_max_ordered_locks_fn_t)(void); >> > -typedef void (*schedule_save_context_fn_t)(queue_entry_t *queue); >> > +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index, void >> *ptr); >> > >> > typedef struct schedule_fn_t { >> > + int status_sync; >> >> this structure should contain functions that are provided by scheduler >> to other components of ODP. 'status_sync' seems to be an internal >> mechanism between the default scheduler and default queue. Hence it >> should not be here. > > This flags if unsched_queue() and save_context() needs to be called. Those > calls are only needed by iquery scheduler. With this flag, queue needs to > check only single variable if those calls are needed or not. Today, these > calls are made always, which hurt performance. > >> >> > schedule_pktio_start_fn_t pktio_start; >> > schedule_thr_add_fn_t thr_add; >> > schedule_thr_rem_fn_t thr_rem; >> > @@ -45,7 +46,6 @@ typedef struct schedule_fn_t { >> > schedule_init_queue_fn_t init_queue; >> > schedule_destroy_queue_fn_t destroy_queue; >> > schedule_sched_queue_fn_t sched_queue; >> > - schedule_unsched_queue_fn_t unsched_queue; >> these queue related functions are not used by other components within >> ODP. These are specific to default queue and default schedulers. These >> should not be part of this file. > > Didn't add or remove those functions in this patch set. This discussion can > be done in context of another patch set. > Are you just cleaning up the scheduler and queue interface in this patch? If not this change can be taken up in this patch.
> -Petri > >> >> > schedule_ord_enq_multi_fn_t ord_enq_multi; >> > schedule_init_global_fn_t init_global; >> > schedule_term_global_fn_t term_global; >> > @@ -54,7 +54,11 @@ typedef struct schedule_fn_t { >> > schedule_order_lock_fn_t order_lock; >> > schedule_order_unlock_fn_t order_unlock; >> > schedule_max_ordered_locks_fn_t max_ordered_locks; >> > + >> > + /* Called only when status_sync is set */ >> > + schedule_unsched_queue_fn_t unsched_queue; >> > schedule_save_context_fn_t save_context; >> > + >> > } schedule_fn_t;