From: Eric Wong <yahns-public@yhbt.net>
To: yahns-public@yhbt.net
Subject: [PATCH] doc: design_notes: we do not use EPOLLEXCLUSIVE
Date: Sat, 18 Mar 2017 00:54:24 +0000 [thread overview]
Message-ID: <20170318005424.11276-1-yahns-public@yhbt.net> (raw)
And clarify that we only have one thread by default.
Since EPOLLEXCLUSIVE seems to have gotten some more press, I
guess we should emphasize our design does not rely on it.
---
Documentation/design_notes.txt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Documentation/design_notes.txt b/Documentation/design_notes.txt
index 308faa6..68d31bc 100644
--- a/Documentation/design_notes.txt
+++ b/Documentation/design_notes.txt
@@ -17,9 +17,12 @@ socket we have inside the kernel.
Each listen queue has a dedicated thread pool running _blocking_
accept(2) (or accept4(2)) syscall in a loop. We use dedicated threads
and blocking accept to benefit from "wake-one" behavior in the Linux
-kernel. By default, this thread pool only has thread per-process, doing
+kernel. By default, this thread pool only has one thread per-process, doing
nothing but accepting sockets and injecting into to the event queue
-(used by epoll or kqueue).
+(used by epoll or kqueue) so a worker thread pool can pick them up.
+
+This design makes EPOLLEXCLUSIVE in Linux 4.5+ unnecessary to us,
+our listen sockets are never registered with epoll or kqueue.
worker thread pool
------------------
@@ -38,7 +41,7 @@ allows us to guarantee exclusive access to a client socket without
additional locks managed in userspace.
Idle threads will sit performing epoll_wait(2) (or kevent(2))
-indefinitely until a socket is reported as "ready" by the kernel.
+indefinitely until a client socket is reported as "ready" by the kernel.
queue flow
----------
--
EW
reply other threads:[~2017-03-18 0:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/yahns/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170318005424.11276-1-yahns-public@yhbt.net \
--to=yahns-public@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).