From: Kevin Wang <kevin.w...@arm.com> The total packet meta data size was 7 cache lines for Linux-generic. With this change the size of the meta data is 4 cache lines for Linux-generic. Make scalable scheduler as the default scheduler. --- /** Email created from pull request 266 (kevinwangsk:2.0-buffer-meta) ** https://github.com/Linaro/odp/pull/266 ** Patch: https://github.com/Linaro/odp/pull/266.patch ** Base sha: d37aa7f1c0480273fb0ccfded44a13e3e5a8e42f ** Merge commit sha: 551242d4514ac016beb77d12858409a54d0d7e90 **/ .travis.yml | 3 --- platform/linux-generic/Makefile.am | 24 +++++++++++++--------- .../linux-generic/include/odp_buffer_internal.h | 10 --------- platform/linux-generic/m4/odp_schedule.m4 | 13 ++++-------- 4 files changed, 18 insertions(+), 32 deletions(-)
diff --git a/.travis.yml b/.travis.yml index 29909a3a1..5baf9bf30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,9 +66,6 @@ cache: env: - CONF="" - CONF="--disable-abi-compat" - - CONF="--enable-schedule-sp" - - CONF="--enable-schedule-iquery" - - CONF="--enable-schedule-scalable" - CONF="--enable-dpdk-zero-copy" - CROSS_ARCH="arm64" - CROSS_ARCH="armhf" CFLAGS="-march=armv7-a" diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 277418142..67dbf4417 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -257,16 +257,9 @@ __LIB__libodp_linux_la_SOURCES = \ odp_pkt_queue.c \ odp_queue_if.c \ queue/subsystem.c \ - queue/generic.c \ - queue/scalable.c \ odp_rwlock.c \ odp_rwlock_recursive.c \ odp_schedule_if.c \ - schedule/generic.c \ - schedule/iquery.c \ - schedule/scalable.c \ - schedule/scalable_ordered.c \ - schedule/sp.c \ schedule/subsystem.c \ odp_shared_memory.c \ odp_sorted_list.c \ @@ -354,20 +347,31 @@ endif pool/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE buffer/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE + if ODP_SCHEDULE_SCALABLE +__LIB__libodp_linux_la_SOURCES += schedule/scalable.c \ + schedule/scalable_ordered.c schedule/scalable.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE else -schedule/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE -endif if ODP_SCHEDULE_SP +__LIB__libodp_linux_la_SOURCES += schedule/sp.c schedule/sp.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE -endif +else if ODP_SCHEDULE_IQUERY +__LIB__libodp_linux_la_SOURCES += schedule/iquery.c schedule/iquery.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE +else +__LIB__libodp_linux_la_SOURCES += schedule/generic.c +schedule/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE +endif endif +endif + if ODP_SCHEDULE_SCALABLE +__LIB__libodp_linux_la_SOURCES += queue/scalable.c queue/scalable.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE else +__LIB__libodp_linux_la_SOURCES += queue/generic.c queue/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE endif diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index 358c0e441..7f3aa3e00 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -73,16 +73,6 @@ struct odp_buffer_hdr_t { /* Segments */ seg_entry_t seg[CONFIG_PACKET_MAX_SEGS]; - /* Burst counts */ - uint8_t burst_num; - uint8_t burst_first; - - /* Next buf in a list */ - struct odp_buffer_hdr_t *next; - - /* Burst table */ - struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE]; - /* --- Mostly read only data --- */ /* User context pointer or u64 */ diff --git a/platform/linux-generic/m4/odp_schedule.m4 b/platform/linux-generic/m4/odp_schedule.m4 index 9c09d6c41..e4c3405ba 100644 --- a/platform/linux-generic/m4/odp_schedule.m4 +++ b/platform/linux-generic/m4/odp_schedule.m4 @@ -1,3 +1,7 @@ +AC_DEFINE([ODP_SCHEDULE_SCALABLE], [1], + [Define to 1 to enable scalable scheduler]) +AM_CONDITIONAL([ODP_SCHEDULE_SCALABLE], true) + AC_ARG_ENABLE([schedule-sp], [ --enable-schedule-sp enable strict priority scheduler], [if test x$enableval = xyes; then @@ -15,12 +19,3 @@ AC_ARG_ENABLE([schedule-iquery], [Define to 1 to enable interests query scheduler]) fi]) AM_CONDITIONAL([ODP_SCHEDULE_IQUERY], [test x$schedule_iquery_enabled = xyes]) - -AC_ARG_ENABLE([schedule_scalable], - [ --enable-schedule-scalable enable scalable scheduler], - [if test x$enableval = xyes; then - schedule_scalable_enabled=yes - AC_DEFINE([ODP_SCHEDULE_SCALABLE], [1], - [Define to 1 to enable scalable scheduler]) - fi]) -AM_CONDITIONAL([ODP_SCHEDULE_SCALABLE], [test x$schedule_scalable_enabled = xyes])