From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS35916 64.27.0.0/19 X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00, RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_ZBI,RCVD_IN_XBL,RDNS_NONE,SPF_FAIL, SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (unknown [64.27.17.140]) by dcvr.yhbt.net (Postfix) with ESMTP id 7DC5C1FF72 for ; Tue, 24 Oct 2017 18:56:44 +0000 (UTC) From: Eric Wong To: cmogstored-public@bogomips.org Subject: [PATCH] doc/queues.txt: add key point about only retrieving ONE event Date: Tue, 24 Oct 2017 18:56:42 +0000 Message-Id: <20171024185642.341-1-e@80x24.org> List-Id: This had become such second nature to me that I forgot to document it :x --- doc/queues.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/queues.txt b/doc/queues.txt index d1de9da..fe8c3bb 100644 --- a/doc/queues.txt +++ b/doc/queues.txt @@ -50,8 +50,9 @@ This is either an epoll(2) or kqueue(2) descriptor. Unlike traditional poll(2)/select(2), epoll/kqueue easily allows clients to migrate between threads as client sockets become ready. -To implement queue-like behavior, we rely exclusively on one-shot -notifications (EPOLLONESHOT or EV_ONESHOT). +To implement this behavior, we rely exclusively on one-shot notifications +(EPOLLONESHOT or EV_ONESHOT) and only retrieve one event at-a-time with +epoll_wait or kqueue to avoid head-of-line blocking. active queue ============ -- EW