From patchwork Tue Dec 22 15:56:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 58937 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp3321208lbb; Tue, 22 Dec 2015 08:00:25 -0800 (PST) X-Received: by 10.107.46.11 with SMTP id i11mr15828208ioo.67.1450800025541; Tue, 22 Dec 2015 08:00:25 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id u4si34425971igr.88.2015.12.22.08.00.25; Tue, 22 Dec 2015 08:00:25 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D5F1061733; Tue, 22 Dec 2015 16:00:24 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=WdXlFuW8; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 23D0261663; Tue, 22 Dec 2015 15:59:32 +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 891806162C; Tue, 22 Dec 2015 15:59:25 +0000 (UTC) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by lists.linaro.org (Postfix) with ESMTPS id 684CE616A1 for ; Tue, 22 Dec 2015 15:56:45 +0000 (UTC) Received: by mail-ob0-f170.google.com with SMTP id ba1so55493016obb.3 for ; Tue, 22 Dec 2015 07:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=m4pjSELAjQ+SfwFMmeFn7KzoTcJPAvg3JGwVQ7YTKmI=; b=WdXlFuW8QIX2bw/NYWWqoRS+Jk2RzZZLUgvaUmGC/7Sctgv1CkAaGBwx5Ru879D7A8 Y+w8j6jmQyxIq9BAsvitkTk3zhproigj2N7g4TjAUn2JvZGYf/dTV4gc9RPCmrEWm221 tfqs3sMNoVXXyP+8aLs9TBzaJUQ0G5GxVIr/4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=m4pjSELAjQ+SfwFMmeFn7KzoTcJPAvg3JGwVQ7YTKmI=; b=iimxZXt4FnA933YkF12VeD5fAizfjcHuLKgkhzjqCbxJBAhyGvcftWBkc2fXwHWfs1 2Vv42T+2QFdR2/M4+IXe6ZJEGulmEVz2P/dYtBhi89Hea95eIK7mzp0reLJpqC3KOHht iuFB91HWzEoC9pHk2bQ2Fu9eO8Uec+u7he0TydmHDFrKErCsE1xoJ2/4t+iy4ABnx6oy q49Z2qaoPNIdto4i6OGm+5COCUkrKy49zn6OrV+mEY2KWKaxgEwhLUh78tXfLN8iYTWj hbLWo3KSKXnNTukyN2+JZBcZtqKtM321EXE5op9y4nt0a4Mq3IouegUASD05mT8kRs3y eMXg== X-Gm-Message-State: ALoCoQkZqVhPqgftWr6ZaP6Sv5U1KOhJ+ubfsaUs5jXxTTm8mWOkfbyYQRM6ZK9SJTAkQ2zIhR9LGdonQWfCPh9pxbnyoHHGfA== X-Received: by 10.60.17.233 with SMTP id r9mr8421474oed.20.1450799804954; Tue, 22 Dec 2015 07:56:44 -0800 (PST) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id kw1sm6513399obb.28.2015.12.22.07.56.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 07:56:44 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 22 Dec 2015 09:56:38 -0600 Message-Id: <1450799798-26458-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450799798-26458-1-git-send-email-bill.fischofer@linaro.org> References: <1450799798-26458-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/2] doc: user-guide: clarify scheduler operation for atomic queues X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Signed-off-by: Bill Fischofer Reviewed-by: Mike Holmes --- doc/users-guide/users-guide.adoc | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index 7ec7957..fa8990a 100644 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -623,24 +623,29 @@ might either be empty, of lower priority, or not in a scheduler group matching any of the threads being serviced by the scheduler. === Atomic Queues -Atomic queues simplify event synchronization because only a single event -from a given atomic queue may be processed at a time. Events scheduled from +Atomic queues simplify event synchronization because only a single thread may +process event(s) from a given atomic queue at a time. Events scheduled from atomic queues thus can be processed lock free because the locking is being -done implicitly by the scheduler. +done implicitly by the scheduler. Note that the caller may receive one or +more events from the same atomic queue if *odp_schedule_multi()* is used. In +this case any required synchronization between these events is the +responsibility of the caller as the scheduler's context synchronization support +for atomic queues extends only to calls from different threads. .Atomic Queue Scheduling image::../images/atomic_queue.png[align="center"] -In this example, no matter how many events may be held in an atomic queue, only -one of them can be scheduled at a time. Here two threads process events from -two different atomic queues. Note that there is no synchronization between -different atomic queues, only between events originating from the same atomic -queue. The queue context associated with the atomic queue is held until the -next call to the scheduler or until the application explicitly releases it -via a call to *odp_schedule_release_atomic()*. +In this example, no matter how many events may be held in an atomic queue, +only one calling thread can receive scheduled events from it at a time. Here +two threads process events from two different atomic queues. Note that there +is no synchronization between different atomic queues, only between events +originating from the same atomic queue. The queue context associated with the +atomic queue is held until the next call to the scheduler or until the +application explicitly releases it via a call to +*odp_schedule_release_atomic()*. Note that while atomic queues simplify programming, the serial nature of -atomic queues will impair scaling. +atomic queues may impair scaling. === Ordered Queues Ordered queues provide the best of both worlds by providing the inherent