Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 0/3] fio: close unused descriptors automatically
@ 2020-03-02 23:29 Vladislav Shpilevoy
  2020-03-02 23:29 ` [Tarantool-patches] [PATCH v2 1/3] fiber: introduce schedule_task() internal function Vladislav Shpilevoy
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Vladislav Shpilevoy @ 2020-03-02 23:29 UTC (permalink / raw)
  To: tarantool-patches, imun, korablev

The patchset introduces a fiber worker singleton object and uses
it for garbage collection of fio and SWIM objects. This is a
workaround for inability to yield in ffi.gc hook, which is used by
fio and SWIM.

SWIM had GC before, but it was creating a new fiber for each GC.
Fio didn't have GC.

Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4727-fio-gc
Issue: https://github.com/tarantool/tarantool/issues/4727

@ChangeLog
- fio descriptors are closed on garbage collection (gh-4727).

Changes in V2:
- Added a special single fiber for garbage collection of objects,
  which yield in their destructors.

Vladislav Shpilevoy (3):
  fiber: introduce schedule_task() internal function
  fio: close unused descriptors automatically
  swim: use fiber._internal.schedule_task() for GC

 src/lua/fiber.c                  |  15 +++++
 src/lua/fiber.lua                |  60 ++++++++++++++++++
 src/lua/fio.lua                  |  34 ++++++++--
 src/lua/swim.lua                 |  11 ++--
 test/app/fiber.result            |  72 +++++++++++++++++++++
 test/app/fiber.test.lua          |  41 ++++++++++++
 test/app/gh-4727-fio-gc.result   | 104 +++++++++++++++++++++++++++++++
 test/app/gh-4727-fio-gc.test.lua |  60 ++++++++++++++++++
 8 files changed, 385 insertions(+), 12 deletions(-)
 create mode 100644 test/app/gh-4727-fio-gc.result
 create mode 100644 test/app/gh-4727-fio-gc.test.lua

-- 
2.21.1 (Apple Git-122.3)

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-03-26 12:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 23:29 [Tarantool-patches] [PATCH v2 0/3] fio: close unused descriptors automatically Vladislav Shpilevoy
2020-03-02 23:29 ` [Tarantool-patches] [PATCH v2 1/3] fiber: introduce schedule_task() internal function Vladislav Shpilevoy
2020-03-19 14:52   ` Igor Munkin
2020-03-20  0:00     ` Vladislav Shpilevoy
2020-03-20 10:48       ` Igor Munkin
2020-03-02 23:29 ` [Tarantool-patches] [PATCH v2 2/3] fio: close unused descriptors automatically Vladislav Shpilevoy
2020-03-19 14:53   ` Igor Munkin
2020-03-19 22:53     ` Igor Munkin
2020-03-20  0:00       ` Vladislav Shpilevoy
2020-03-20 10:48         ` Igor Munkin
2020-03-20 21:28           ` Vladislav Shpilevoy
2020-03-20 21:28             ` Igor Munkin
2020-03-02 23:29 ` [Tarantool-patches] [PATCH v2 3/3] swim: use fiber._internal.schedule_task() for GC Vladislav Shpilevoy
2020-03-19 14:53   ` Igor Munkin
2020-03-26  1:08 ` [Tarantool-patches] [PATCH v2 0/3] fio: close unused descriptors automatically Nikita Pettik
2020-03-26 12:56 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox