Skip to content

Commit

Permalink
linux-gen: add interests query (iquery) scheduler
Browse files Browse the repository at this point in the history
Add this interests query (iquery) scheduler as an
alternate choice of ODP-linux scheduler component
for performance optimization especially in lower
queue counts use cases.

It includes a new core algorithm, but adopted the
ring-based pktio poll algorithm from default scheduler,
and still uses the old ordered queue implementation.

Signed-off-by: Yi He <yi.he@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
  • Loading branch information
Yi He authored and muvarov committed Mar 1, 2017
1 parent ff30fcb commit 4210d02
Show file tree
Hide file tree
Showing 4 changed files with 1,535 additions and 0 deletions.
1 change: 1 addition & 0 deletions platform/linux-generic/Makefile.am
Expand Up @@ -197,6 +197,7 @@ __LIB__libodp_linux_la_SOURCES = \
odp_schedule.c \
odp_schedule_if.c \
odp_schedule_sp.c \
odp_schedule_iquery.c \
odp_shared_memory.c \
odp_sorted_list.c \
odp_spinlock.c \
Expand Down
7 changes: 7 additions & 0 deletions platform/linux-generic/m4/odp_schedule.m4
Expand Up @@ -4,3 +4,10 @@ AC_ARG_ENABLE([schedule-sp],
schedule-sp=yes
ODP_CFLAGS="$ODP_CFLAGS -DODP_SCHEDULE_SP"
fi])

AC_ARG_ENABLE([schedule-iquery],
[ --enable-schedule-iquery enable interests query (sparse bitmap) scheduler],
[if test x$enableval = xyes; then
schedule-iquery=yes
ODP_CFLAGS="$ODP_CFLAGS -DODP_SCHEDULE_IQUERY"
fi])
6 changes: 6 additions & 0 deletions platform/linux-generic/odp_schedule_if.c
Expand Up @@ -12,9 +12,15 @@ extern const schedule_api_t schedule_sp_api;
extern const schedule_fn_t schedule_default_fn;
extern const schedule_api_t schedule_default_api;

extern const schedule_fn_t schedule_iquery_fn;
extern const schedule_api_t schedule_iquery_api;

#ifdef ODP_SCHEDULE_SP
const schedule_fn_t *sched_fn = &schedule_sp_fn;
const schedule_api_t *sched_api = &schedule_sp_api;
#elif defined(ODP_SCHEDULE_IQUERY)
const schedule_fn_t *sched_fn = &schedule_iquery_fn;
const schedule_api_t *sched_api = &schedule_iquery_api;
#else
const schedule_fn_t *sched_fn = &schedule_default_fn;
const schedule_api_t *sched_api = &schedule_default_api;
Expand Down

0 comments on commit 4210d02

Please sign in to comment.