[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86775] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
From:
Eric Wong <normalperson@...>
Date:
2018-04-30 10:47:01 UTC
List:
ruby-core #86775
[email protected] wrote: > If you use any kind of thread-safe shared mutable state (e.g. > a queue), you will invoke some kind of IPC (syscall) overhead. There's unavoidable locking costs we're always paying inside the kernel for every epoll_ctl/epoll_wait/kevent syscall. > If you don't need to communicate between threads, you can > avoid all IPC, e.g. > https://github.com/socketry/async/blob/master/lib/async/queue.rb > doesn't directly invoke any kind of IPC/syscall in order to > function. Since we're paying the locking cost inside the kernel, we won't need to pay that cost in userspace (with one-shot). So we might as well take advantage of the fact we're getting "free" thread-safety from the kernel... Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>