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 6E93A6EC55; Thu, 26 Aug 2021 23:01:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6E93A6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1630008068; bh=gcc11S+B0R04CqalLGf5knuPeee56GlQdYm+PAE/klc=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=m+NjTpsTk/9aaInd23DFePtUQOoILo4C/2yK9SkAmhBSwFS04gcE1Le1aAWcKQyi4 uvcDlabQczOFGjGqnJMRnJi08srIbeae+gjBHnkXzDDp+vld0kel7+0m1PPOxBNPIM b36/MIM1ihot1SAzLcxkn8XsAEqj70CUbuphod9g= 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 3C3FB6EC55 for ; Thu, 26 Aug 2021 23:01:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3C3FB6EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mJLYg-0002FG-A4; Thu, 26 Aug 2021 23:01:06 +0300 To: Oleg Babin , imun@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <32b7ac476fec0b675b34d032a61326970491c7cf.1628713520.git.babinoleg@mail.ru> <9bcfb440-ae54-717c-e377-b49f134028f7@tarantool.org> <817688b9-5419-0dea-d92d-74a82a9b8da6@tarantool.org> Message-ID: <52b6cba2-45d4-68ec-d4e1-b9dc2390091b@tarantool.org> Date: Thu, 26 Aug 2021 22:01:04 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <817688b9-5419-0dea-d92d-74a82a9b8da6@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD906AB4890CDABF0C5CB76CEE71D3E4007182A05F5380850400356933E5E4188160836DBC0EBD91E10DB0F65C3EC8371377EAA5E6BBB5A02DB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70D278D70F8433719EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F757A79C3007ACA28638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C8EEC2617A94F517A3347917776916EB117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B50546A416E4972D5B9CA32AE5386431013B X-C1DE0DAB: 0D63561A33F958A5EE1C242080EF3D9A6DD44BEA42390CD2008B0C3A49277414D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA756665624D6DDF07B5410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343D1F112031EF3D625E3FAA6467DD45580A252237F1BB3C31BA28DF5DFC1E97E3879C53BA9D69C93E1D7E09C32AA3244C4B71ADECE2F4F3E256CF3292831424BD7101BF96129E4011FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj+bzRAXO2P1Qyoma0P4wTAQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DE3229A7E59A636132ED41D824F33F0713841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 4/4] fiber: allocate on_stop triggers using mempool 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On 26.08.2021 08:14, Oleg Babin via Tarantool-patches wrote: > Thanks for your review. See my answers below. > > On 25.08.2021 23:34, Vladislav Shpilevoy wrote: >> Thanks for the patch! >> >> See 4 comments below. >> >> On 11.08.2021 22:33, Oleg Babin via Tarantool-patches wrote: >>> From: Oleg Babin >>> >>> Previously we use malloc for such purpose however we created >>> on_stop triggers only if fiber storage was touched. Currently we >>> create on_stop trigger for each lua fiber. So it seems reasonable >>> to use mempool for such frequent allocations/deallocations. >> 1. Does it give any perf win? This commit specifically. Seems like an >> overkill. A trigger allocation might happen only once per fiber's >> lifetime, and the fiber's creation is supposed to be much longer than >> the trigger's malloc. The commit probably gives a tiny fraction of >> percent improvement or does not change anything. Do you have results? > > It's a good question. I thought thank mempool should be faster than malloc. > > We can easily drop this commit. I had some doubts about it. According to the benchmarks it seems the mempool here is slower. I suggest to drop this commit.