From patchwork Mon Dec 28 14:50:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 59023 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1748972lbb; Mon, 28 Dec 2015 06:51:41 -0800 (PST) X-Received: by 10.55.80.9 with SMTP id e9mr68869722qkb.94.1451314301283; Mon, 28 Dec 2015 06:51:41 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b36si19565885qga.28.2015.12.28.06.51.40; Mon, 28 Dec 2015 06:51:41 -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 CD6F3616CC; Mon, 28 Dec 2015 14:51:40 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=I6pjOiXc; 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 15A08616CF; Mon, 28 Dec 2015 14:51:07 +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 6075E616C9; Mon, 28 Dec 2015 14:51:04 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id 321D8616C9 for ; Mon, 28 Dec 2015 14:51:03 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id l9so146609930oia.2 for ; Mon, 28 Dec 2015 06:51:03 -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=VB7lAOt9XRdH8HSJAPixVXGv+2Tln97PLFMIGL3HWaA=; b=I6pjOiXccwCdO/HpXUY5J6F7foSGFnbxsjBUHtg3gcZ+ZOEoIbROhwvX/GDFEa0Xir UZpci/d4igfFJotVDWYMTGthlDU2+vitssz5KES1LCH7GaV9vYiTVYVMNwZLcx6xC2Lz kNdMGtFilWLmGUKDnEes5mxWLXPz2ZdP+dKZY= 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=VB7lAOt9XRdH8HSJAPixVXGv+2Tln97PLFMIGL3HWaA=; b=AKV2eGPmMUHsQXkCTw8e0mxm7BvCq214qk4rjh4WZN3gFM7gT6n3jZzwvO+PmLlN9g +o3iZLazrCViTbbk3a8nmvyfhqtKxekijN9t3uHTaZKz54NTXU58RnnjEbfyZ6HY+gHN /QbQM1apZhvMTU2XRbqk1fih6bjRx3CCkCvNfoEU72bRpFzgRiDIqeQeUCZj3Dkz+JTI H3pJ0kFwI4P7AIflbkcWcoUb/20IgZ56R0Ccvl1Bb1OaAw/UOrO0azGzsXl3f6ZCM1oH 4THvlhVI3smCtCqJX4WfD9sp/OAbxuIC5s04LyHOi43/aobxz0AwJ9PZ70EtaHwI2lcO cjbQ== X-Gm-Message-State: ALoCoQmCWO6yFQ8Gofz5WKw21k2s5bMCAxAUqVCtAtai6ZIuXdzu1X4orhZPel33ggfg7TMTyWk4Zhu3ztKiduP6c9ROEMPJPw== X-Received: by 10.202.97.11 with SMTP id v11mr27863785oib.12.1451314262739; Mon, 28 Dec 2015 06:51:02 -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 n9sm19746507oev.17.2015.12.28.06.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Dec 2015 06:51:02 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 28 Dec 2015 08:50:56 -0600 Message-Id: <1451314256-27492-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1451314256-27492-1-git-send-email-bill.fischofer@linaro.org> References: <1451314256-27492-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 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 --- doc/users-guide/users-guide.adoc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index 7ec7957..80fc53e 100644 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -623,24 +623,27 @@ 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 these multiple events all share the same atomic scheduling context. .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