yahns Ruby server user/dev discussion
 help / color / Atom feed
* [PATCH] doc: design_notes: we do not use EPOLLEXCLUSIVE
@ 2017-03-18  0:54 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-03-18  0:54 UTC (permalink / raw)
  To: yahns-public

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-18  0:54 [PATCH] doc: design_notes: we do not use EPOLLEXCLUSIVE Eric Wong

yahns Ruby server user/dev discussion

Archives are clonable:
	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox