[#88925] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
4 messages
2018/09/09
[#88927] Re: [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical
— Eric Wong <normalperson@...>
2018/09/09
[email protected] wrote:
[#88926] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
3 messages
2018/09/09
[#89218] [Ruby trunk Bug#15130] open-uri hangs on cygwin — duerst@...
SXNzdWUgIzE1MTMwIGhhcyBiZWVuIHVwZGF0ZWQgYnkgZHVlcnN0IChNYXJ0aW4gRMO8cnN0KS4K
5 messages
2018/09/30
[ruby-core:88925] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical
From:
ko1@...
Date:
2018-09-09 15:48:11 UTC
List:
ruby-core #88925
Issue #15095 has been updated by ko1 (Koichi Sasada). > ec->vm_stack is always allocated with malloc, so stacks for root > fiber (thread stack) and non-root fibers can be shared as long > as the size is the same. I'm not sure why we can share the VM stack. If we run root fiber and non-root fiber with switching, it will conflicts. Do I misunderstand something? ---------------------------------------- Feature #15095: [PATCH] share VM stack between threads and fibers if identical https://bugs.ruby-lang.org/issues/15095#change-73961 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Target version: ---------------------------------------- ec->vm_stack is always allocated with malloc, so stacks for root fiber (thread stack) and non-root fibers can be shared as long as the size is the same. The purpose of this change was mainly to reduce dependencies on ROOT_FIBER_CONTEXT, but it makes sense to share reusable data as much as possible, regardless. Will commit in a day or two (part of plan for [Bug #15050]). Long term, I think it makes sense to get rid of distinction between "thread" and "fiber" stacks, because every thread has a (root) fiber, anyways. ---Files-------------------------------- 0001-share-VM-stack-between-threads-and-fibers-if-identic.patch (4.15 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>