This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via da9d347e0bbe337ea86448306432080206f3ef49 (commit) via d533d85ad15ea431a431c407dad468e38ae87ec0 (commit) via fa7ce5da4b669e55b8d34c7d90b67070879ba5da (commit) from d96a8207591fbcaac25b79286d7d72a537354c1f (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit da9d347e0bbe337ea86448306432080206f3ef49 Author: Petri Savolainen petri.savolainen@linaro.org Date: Tue Nov 21 14:12:02 2017 +0200
validation: queue: refer to blocking level
Refer to the new blocking level capability and parameter fields to check that those exist.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/test/validation/api/queue/queue.c b/test/validation/api/queue/queue.c index 1ec05b1f..3c6db33a 100644 --- a/test/validation/api/queue/queue.c +++ b/test/validation/api/queue/queue.c @@ -69,6 +69,8 @@ void queue_test_capa(void) CU_ASSERT(capa.sched_prios != 0); CU_ASSERT(capa.plain.max_num != 0); CU_ASSERT(capa.sched.max_num != 0); + CU_ASSERT(capa.plain.nonblocking >= ODP_BLOCKING); + CU_ASSERT(capa.sched.nonblocking >= ODP_BLOCKING);
min = capa.plain.max_num; if (min > capa.sched.max_num) @@ -82,6 +84,7 @@ void queue_test_capa(void) name[ODP_QUEUE_NAME_LEN - 1] = 0;
odp_queue_param_init(&qparams); + CU_ASSERT(qparams.nonblocking == ODP_BLOCKING);
for (j = 0; j < 2; j++) { if (j == 0) {
commit d533d85ad15ea431a431c407dad468e38ae87ec0 Author: Petri Savolainen petri.savolainen@linaro.org Date: Tue Nov 21 13:52:00 2017 +0200
linux-gen: queue: fill blocking capa
Currently, only blocking queues are implemented.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 3f355e69..58103930 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -150,7 +150,9 @@ static int queue_capability(odp_queue_capability_t *capa) capa->max_sched_groups = sched_fn->num_grps(); capa->sched_prios = odp_schedule_num_prio(); capa->plain.max_num = capa->max_queues; + capa->plain.nonblocking = ODP_BLOCKING; capa->sched.max_num = capa->max_queues; + capa->sched.nonblocking = ODP_BLOCKING;
return 0; } @@ -601,6 +603,7 @@ static void queue_param_init(odp_queue_param_t *params) params->type = ODP_QUEUE_TYPE_PLAIN; params->enq_mode = ODP_QUEUE_OP_MT; params->deq_mode = ODP_QUEUE_OP_MT; + params->nonblocking = ODP_BLOCKING; params->sched.prio = ODP_SCHED_PRIO_DEFAULT; params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL; diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index 07201ce7..88a5a8c2 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -315,8 +315,10 @@ static int queue_capability(odp_queue_capability_t *capa) capa->sched_prios = odp_schedule_num_prio(); capa->plain.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; capa->plain.max_size = 0; + capa->plain.nonblocking = ODP_BLOCKING; capa->sched.max_num = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES; capa->sched.max_size = 0; + capa->sched.nonblocking = ODP_BLOCKING;
return 0; } @@ -861,6 +863,7 @@ static void queue_param_init(odp_queue_param_t *params) params->type = ODP_QUEUE_TYPE_PLAIN; params->enq_mode = ODP_QUEUE_OP_MT; params->deq_mode = ODP_QUEUE_OP_MT; + params->nonblocking = ODP_BLOCKING; params->sched.prio = ODP_SCHED_PRIO_DEFAULT; params->sched.sync = ODP_SCHED_SYNC_PARALLEL; params->sched.group = ODP_SCHED_GROUP_ALL;
commit fa7ce5da4b669e55b8d34c7d90b67070879ba5da Author: Petri Savolainen petri.savolainen@linaro.org Date: Tue Nov 21 13:41:14 2017 +0200
api: queue: non-blocking level parameter
Add queue parameter and capability to indicate queue operation blocking level. This guarantee of non-blocking is important for real-time applications. HW based implementations may be always non-blocking. Where as, SW based implementation need to trade-off between block freedom and performance.
Signed-off-by: Petri Savolainen petri.savolainen@linaro.org Reviewed-by: Balasubramanian Manoharan bala.manoharan@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 014d3362..79a26df3 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -96,6 +96,54 @@ typedef enum odp_queue_op_mode_t {
} odp_queue_op_mode_t;
+/** + * Non-blocking level + * + * A non-blocking level defines implementation guarantees for application + * progress when multiple threads operate on the same resource (e.g. a queue) + * simultaneously. The first level (ODP_BLOCKING) does not have any block + * freedom guarantees, but a suspending thread may block the other threads for + * the entire time it remains suspended (infinitely if crashed). + * On the contrary, actual non-blocking levels provide guarantees of progress: + * + * ODP_NONBLOCKING_LF: A non-blocking and lock-free implementation guarantees + * that at least one of the threads successfully completes + * its operations, regardless of what other threads do. + * Application progress is guaranteed, but individual + * threads may starve while trying to execute their + * operations on the shared resource. + * + * ODP_NONBLOCKING_WF: A non-blocking and wait-free implementation guarantees + * application progress with starvation freedom. All + * threads are guaranteed to complete their operations in + * a bounded number of steps, regardless of what other + * threads do. + * + * Non-blocking levels are listed from the weakest to the strongest guarantee of + * block freedom. Performance of a non-blocking implementation may be lower than + * the blocking one. Non-blocking guarantees are important e.g. for real-time + * applications when real-time and non real-time threads share a resource. + */ +typedef enum odp_nonblocking_t { + /** Blocking implementation. A suspeding thread may block all other + * threads, i.e. no block freedom guarantees. This is the lowest level. + */ + ODP_BLOCKING = 0, + + /** Non-blocking and lock-free implementation. Other threads can make + * progress while a thread is suspended. Starvation freedom is not + * guaranteed. + */ + ODP_NONBLOCKING_LF, + + /** Non-blocking and wait-free implementation. Other threads can make + * progress while a thread is suspended. Starvation freedom is + * guaranteed. + */ + ODP_NONBLOCKING_WF + +} odp_nonblocking_t; + /** * Queue capabilities */ @@ -125,6 +173,10 @@ typedef struct odp_queue_capability_t { * store all available events. */ uint32_t max_size;
+ /** The strongest guarantee of block freedom that is supported + * for plain queues. */ + odp_nonblocking_t nonblocking; + } plain;
/** Scheduled queue capabilities */ @@ -138,6 +190,10 @@ typedef struct odp_queue_capability_t { * store all available events. */ uint32_t max_size;
+ /** The strongest guarantee of block freedom that is supported + * for scheduled queues. */ + odp_nonblocking_t nonblocking; + } sched;
} odp_queue_capability_t; @@ -178,6 +234,13 @@ typedef struct odp_queue_param_t { * ODP_QUEUE_TYPE_SCHED. */ odp_schedule_param_t sched;
+ /** Non-blocking level + * + * Queue implementation must guarantee at least this level of block + * freedom for queue enqueue and dequeue/schedule operations. + * The default value is ODP_BLOCKING. */ + odp_nonblocking_t nonblocking; + /** Queue context pointer * * User defined context pointer associated with the queue. The same
-----------------------------------------------------------------------
Summary of changes: include/odp/api/spec/queue.h | 63 +++++++++++++++++++++++++++++ platform/linux-generic/odp_queue.c | 3 ++ platform/linux-generic/odp_queue_scalable.c | 3 ++ test/validation/api/queue/queue.c | 3 ++ 4 files changed, 72 insertions(+)
hooks/post-receive