From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp5.mail.ru (smtp5.mail.ru [94.100.179.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EF686441841 for ; Thu, 26 Mar 2020 04:08:46 +0300 (MSK) Date: Thu, 26 Mar 2020 01:08:45 +0000 From: Nikita Pettik Message-ID: <20200326010845.GC3155@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 0/3] fio: close unused descriptors automatically List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On 03 Mar 00:29, Vladislav Shpilevoy wrote: > 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. LGMT (I looked at fresh version on your branch). > 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) >