From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 6925F70C99; Thu, 2 Sep 2021 18:48:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6925F70C99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1630597729; bh=0SF3QSdyAYAhu19UjME0vNqnxusfJQ0A1EOSlEttLsc=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ynGSFi8OwBO1WOXSTA/Gyym1kOAnn4wOO7hx2YXyHdF3UHq/71TK97hUinyxaJONl 2Z48AQ4/dGO1sd3CWtcIr5CVQA5orGfFBGgkEoX1LFwtHjTbxFPV1qVAeRVcsZe3rf J2/WsV7j/XXnrIsvqu0hdFavQIrMBibnwdA5vCCI= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 2598C70CAC for ; Thu, 2 Sep 2021 18:48:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2598C70CAC Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mLowu-00022N-Ka; Thu, 02 Sep 2021 18:48:21 +0300 Date: Thu, 2 Sep 2021 18:23:06 +0300 To: olegrok@tarantool.org Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: <20210902152306.GU5743@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D96C1EA41D18F4D5409838B14BB7DC4567FB6F44CFDC9DC8182A05F53808504009B8791067588A250EC38C165FD0108F1E846BB5D3D209ED0B00BDA05FA442A8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79145AB6E9E75F07EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637976142D429C486548638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8590464B96D7382CC6C22D53A80FED4B9117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC5FC25ED3FCEC3375A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DCB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6BF3059D42242344A089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A51CE97E597B5099BD3EB740521B4179BDF32FB9F568FACE31D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752546FE575EB473F1410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AF12ADB97C97CD8922B408583E3C5DABA878059F83A7711B221F2CE7255B71D7315BC9098BBEE6A91D7E09C32AA3244CC72507DC40B2A679CF974C76E1D2C896E3D93501275E802F927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojK/h3ZnmlPjGXEDouQegvvg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D18B2980289D5A315316B4F53BD662646A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 0/4] fiber: keep reference to userdata if fiber created once X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Oleg, Thanks for the series! On 11.08.21, olegrok@tarantool.org wrote: > From: Oleg Babin > > This patch reworks approach to fiber management in Lua. Before > this patch each action that should return fiber led to new > userdata creation that was quite slow and made GC suffer. This > patch introduces new field in struct fiber to store a reference to > userdata that was created once for a fiber. It allows speedup > operations as fiber.self() and fiber.id(). > Simple benchmark shows that access to fiber storage is faster in > two times, fiber.find() - 2-3 times and fiber.new/create functions > don't have any changes. > > Initially changes were inspired by #6210 [1] but current patchset > doesn't introduce anything new just improves performance of > existing functions. > Some results are available also in related github PR [2]. > > [1] https://github.com/tarantool/tarantool/issues/6210 > [2] https://github.com/tarantool/tarantool/pull/6280 Does this PR supersedes another one[1] from you? If it does, please close #6215 then. > > Oleg Babin (4): > fiber: rename ref to fiber_ref > fiber: pass struct fiber into lbox_pushfiber instead of id > fiber: keep reference to userdata if fiber created once > fiber: allocate on_stop triggers using mempool > > src/lib/core/fiber.h | 7 ++- > src/lua/fiber.c | 134 ++++++++++++++++++------------------------- > 2 files changed, 62 insertions(+), 79 deletions(-) > > -- > 2.32.0 > [1]: https://github.com/tarantool/tarantool/pull/6215 -- Best regards, IM