From patchwork Tue Jul 7 23:11:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 50850 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 863C022A03 for ; Tue, 7 Jul 2015 23:12:06 +0000 (UTC) Received: by lbbpo10 with SMTP id po10sf19398133lbb.1 for ; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=qrCmYRk0OPL+DEIWLLvGg+yzNA+TBfygLuWJ8BuVT8M=; b=Ugg/2rlFuUnO6mFH2wJFfVB7y/XpH2y3wBOK5v+3Uq50RjMQCe7NalZCJdYVFk4hE0 HJvxPceTJVVwxbc+M1iNcNyYYJ8zJdpqGaahoz1wYIODvWXT9MAd2HtBOFY/YztyfVP8 7IFVCtpAjY4WNkURsWI8WmgX27iIEAj7IYE5QrLklHvTyqwcVbkjmDEIr4Avbu5dGQco YPzu+/yRoFjiTltUBLCgMAMTSlQtnbjKs5li7CViTWTPdLNVVU+jViLepJWeUGhKHw07 2ATwID9nuQIeskNzvQ8PAsHwxfaEEQzzk+6ER2jBpf5RwIe8L5lv28BCyrz7Ho7309mg d+qA== X-Gm-Message-State: ALoCoQkoo6pxsQ3whlaTjmhhH8J+4/C63rainUkvD9kvCPvk2Hf/wEDvrtBL4xwjIdmlFVnc0vj5 X-Received: by 10.152.237.36 with SMTP id uz4mr394134lac.1.1436310725428; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.227 with SMTP id t3ls863331laj.72.gmail; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) X-Received: by 10.112.128.169 with SMTP id np9mr6190290lbb.73.1436310725264; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id f6si19319663lam.85.2015.07.07.16.12.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2015 16:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbpo10 with SMTP id po10so45892216lbb.3 for ; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) X-Received: by 10.152.18.162 with SMTP id x2mr6190570lad.73.1436310725156; Tue, 07 Jul 2015 16:12:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2690276lbb; Tue, 7 Jul 2015 16:12:03 -0700 (PDT) X-Received: by 10.55.18.197 with SMTP id 66mr11241306qks.13.1436310723530; Tue, 07 Jul 2015 16:12:03 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d14si282077qhc.99.2015.07.07.16.12.02; Tue, 07 Jul 2015 16:12:03 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 6140561F46; Tue, 7 Jul 2015 23:12:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 240D961F39; Tue, 7 Jul 2015 23:11:55 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D714E61F3A; Tue, 7 Jul 2015 23:11:52 +0000 (UTC) Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by lists.linaro.org (Postfix) with ESMTPS id 92AE161F36 for ; Tue, 7 Jul 2015 23:11:51 +0000 (UTC) Received: by obbkm3 with SMTP id km3so139142213obb.1 for ; Tue, 07 Jul 2015 16:11:51 -0700 (PDT) X-Received: by 10.202.214.18 with SMTP id n18mr6294359oig.75.1436310711167; Tue, 07 Jul 2015 16:11:51 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id oy11sm12516085oeb.3.2015.07.07.16.11.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jul 2015 16:11:50 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 7 Jul 2015 18:11:45 -0500 Message-Id: <1436310705-3993-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Cc: Petri Savolainen Subject: [lng-odp] [API-NEXT PATCHv2 03/11] api: sched: removed GROUP_DEFAULT X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Petri Savolainen User should care which group of thread will process events from a queue. Removed default group and use all threads group instead. Signed-off-by: Petri Savolainen Signed-off-by: Bill Fischofer --- v2 rebases reflects scheduler test rename in test/validation hierarchy example/classifier/odp_classifier.c | 2 +- example/generator/odp_generator.c | 2 +- example/ipsec/odp_ipsec.c | 10 +++++----- example/packet/odp_pktio.c | 2 +- example/timer/odp_timer_test.c | 2 +- include/odp/api/queue.h | 9 +++------ platform/linux-generic/include/odp/plat/queue_types.h | 2 -- platform/linux-generic/odp_queue.c | 2 +- test/performance/odp_l2fwd.c | 2 +- test/performance/odp_pktio_perf.c | 2 +- test/performance/odp_scheduling.c | 2 +- test/validation/classification/odp_classification_tests.c | 2 +- test/validation/pktio/pktio.c | 2 +- test/validation/scheduler/scheduler.c | 2 -- 14 files changed, 18 insertions(+), 25 deletions(-) diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index bf7a8c6..6f7b101 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -211,7 +211,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool) qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "%" PRIu64 "-pktio_inq_def", odp_pktio_to_u64(pktio)); inq_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 3a8105e..780cdf2 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -342,7 +342,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool) */ qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "%" PRIu64 "-pktio_inq_def", odp_pktio_to_u64(pktio)); inq_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 1763f5c..d892803 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -325,7 +325,7 @@ void ipsec_init_pre(void) */ qparam.sched.prio = ODP_SCHED_PRIO_HIGHEST; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; completionq = queue_create("completion", ODP_QUEUE_TYPE_SCHED, @@ -337,7 +337,7 @@ void ipsec_init_pre(void) qparam.sched.prio = ODP_SCHED_PRIO_HIGHEST; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; seqnumq = queue_create("seqnum", ODP_QUEUE_TYPE_SCHED, @@ -450,7 +450,7 @@ void initialize_loop(char *intf) /* Create input queue */ qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(queue_name, sizeof(queue_name), "%i-loop_inq_def", idx); queue_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; @@ -463,7 +463,7 @@ void initialize_loop(char *intf) /* Create output queue */ qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(queue_name, sizeof(queue_name), "%i-loop_outq_def", idx); queue_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; @@ -535,7 +535,7 @@ void initialize_intf(char *intf) */ qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "%" PRIu64 "-pktio_inq_def", odp_pktio_to_u64(pktio)); inq_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index d2e4d9c..7dc867d 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -154,7 +154,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, int mode) case APPL_MODE_PKT_SCHED: qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; inq_def = odp_queue_create(inq_name, ODP_QUEUE_TYPE_PKTIN, &qparam); diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index 4e090fd..aabc012 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -428,7 +428,7 @@ int main(int argc, char *argv[]) memset(¶m, 0, sizeof(param)); param.sched.prio = ODP_SCHED_PRIO_DEFAULT; param.sched.sync = ODP_SCHED_SYNC_NONE; - param.sched.group = ODP_SCHED_GROUP_DEFAULT; + param.sched.group = ODP_SCHED_GROUP_ALL; queue = odp_queue_create("timer_queue", ODP_QUEUE_TYPE_SCHED, ¶m); diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h index f746ac0..0852119 100644 --- a/include/odp/api/queue.h +++ b/include/odp/api/queue.h @@ -145,12 +145,9 @@ extern "C" { /** * @def ODP_SCHED_GROUP_ALL - * Group of all cores - */ - -/** - * @def ODP_SCHED_GROUP_DEFAULT - * Default core group + * Group of all threads. All active worker and control threads belong to this + * group. The group is automatically updated when new threads enter or old + * threads exit ODP. */ /** diff --git a/platform/linux-generic/include/odp/plat/queue_types.h b/platform/linux-generic/include/odp/plat/queue_types.h index 9f398a1..7ab19e6 100644 --- a/platform/linux-generic/include/odp/plat/queue_types.h +++ b/platform/linux-generic/include/odp/plat/queue_types.h @@ -62,8 +62,6 @@ typedef int odp_schedule_group_t; #define ODP_SCHED_GROUP_ALL 0 -#define ODP_SCHED_GROUP_DEFAULT ODP_SCHED_GROUP_ALL - /** Get printable format of odp_queue_t */ static inline uint64_t odp_queue_to_u64(odp_queue_t hdl) { diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 54ed674..2546e2b 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -62,7 +62,7 @@ static void queue_init(queue_entry_t *queue, const char *name, memset(&queue->s.param, 0, sizeof(odp_queue_param_t)); queue->s.param.sched.prio = ODP_SCHED_PRIO_DEFAULT; queue->s.param.sched.sync = ODP_SCHED_SYNC_ATOMIC; - queue->s.param.sched.group = ODP_SCHED_GROUP_DEFAULT; + queue->s.param.sched.group = ODP_SCHED_GROUP_ALL; } switch (type) { diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 0576bc0..7394dfc 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -294,7 +294,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "%" PRIu64 "-pktio_inq_def", odp_pktio_to_u64(pktio)); inq_name[ODP_QUEUE_NAME_LEN - 1] = '\0'; diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 26feafb..98511a5 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -747,7 +747,7 @@ static int test_init(void) /* create and associate an input queue for the RX side */ qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_NONE; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "inq-pktio-%" PRIu64, odp_pktio_to_u64(gbl_args->pktio_rx)); diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 14de848..8fa7734 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -956,7 +956,7 @@ int main(int argc, char *argv[]) param.sched.prio = i; param.sched.sync = ODP_SCHED_SYNC_ATOMIC; - param.sched.group = ODP_SCHED_GROUP_DEFAULT; + param.sched.group = ODP_SCHED_GROUP_ALL; for (j = 0; j < QUEUES_PER_PRIO; j++) { name[9] = '0' + j/10; diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c index 0ec9b78..45f3e3b 100644 --- a/test/validation/classification/odp_classification_tests.c +++ b/test/validation/classification/odp_classification_tests.c @@ -307,7 +307,7 @@ int classification_suite_init(void) } qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; sprintf(queuename, "%s", "inq_loop"); inq_def = odp_queue_create(queuename, diff --git a/test/validation/pktio/pktio.c b/test/validation/pktio/pktio.c index fd16300..6b4f3fb 100644 --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -251,7 +251,7 @@ static int create_inq(odp_pktio_t pktio, odp_queue_type_t qtype) qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; - qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; + qparam.sched.group = ODP_SCHED_GROUP_ALL; snprintf(inq_name, sizeof(inq_name), "inq-pktio-%" PRIu64, odp_pktio_to_u64(pktio)); diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c index 85a57eb..92ce5dc 100644 --- a/test/validation/scheduler/scheduler.c +++ b/test/validation/scheduler/scheduler.c @@ -123,7 +123,6 @@ static void scheduler_test_queue_destroy(void) for (i = 0; i < 3; i++) { qp.sched.prio = ODP_SCHED_PRIO_DEFAULT; - qp.sched.group = ODP_SCHED_GROUP_DEFAULT; qp.sched.sync = sync[i]; queue = odp_queue_create("sched_destroy_queue", @@ -623,7 +622,6 @@ static int create_queues(void) for (i = 0; i < prios; i++) { odp_queue_param_t p; p.sched.prio = i; - p.sched.group = ODP_SCHED_GROUP_DEFAULT; for (j = 0; j < QUEUES_PER_PRIO; j++) { /* Per sched sync type */