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 37EF46EC55; Tue, 13 Jul 2021 13:02:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 37EF46EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626170539; bh=syhpg86o67xAHexdbMoyWE9gMD4q2a50n4KrGe5t2D0=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=pQrr8u5Xhn0LKm2rcbnygDWnVG/SzYi1oZqCzX2L2TUHj4V/yd13VFBFoLAmGAysn Brk4jb2WhgXeVIoZpsVlHip2t5l+lVA/KxGe+sNLGE38UY6dtg/kBINfoZZaBOEkMF pchFcmeZH3EhGRtMyPzoTucrQlvJu/uphNx9sjFo= Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 35FF16EC55 for ; Tue, 13 Jul 2021 13:02:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 35FF16EC55 Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1m3FF3-0007tA-KA; Tue, 13 Jul 2021 13:02:17 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com References: Message-ID: <700e9ac8-aa23-fc53-e5b2-880f748b9369@tarantool.org> Date: Tue, 13 Jul 2021 13:02:17 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97BB0EF39AD2B33D52D9CC5C87942E9F174CE6222ED5B65F6182A05F5380850405080AE57D9CA9CEB2F6FC46C681F793A7AE93E21A92AD4A748377CEF3DB2BBDA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7364F8074C6DFACE2C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE745C0EDBD94D46193EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F28E0A9DCAB8FFD053A840CD6FE98CEF90CC7F00164DA146DAFE8445B8C89999728AA50765F7900637DCE3DBD6F8E38AFD389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8D23BF7408B3F9022F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BC6A536F79815AD9275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A53C6F1805E8FE1F4A553B31F74F0EF9F46CD72E9B03C35C57D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA753753CEE10E4ED4A7410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AC632F0BE69382F3B75768FAC51B0B5B8E784C8FC7F1A5228C5D61194878ACF360AF5A49FB12F6B01D7E09C32AA3244C33296DDE2807E0F8CE3299A03EE2981CA90944CA99CF22E3FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojAZDAgpmGsvaJ6N6Ef8xbOw== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446A4C4208606290B1CE55C66C8C490B8B5603900A81D5605F0424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/1] qsync: remove polling from box_promote() 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 13.07.2021 01:20, Vladislav Shpilevoy пишет: > box_promote() when called manually used to wait for the existing > transactions from a foreign limbo to end during a timeout. Giving > them a chance to end on their terms. > > The waiting was done via polling like > > while (!done) > sleep(small_timeout); > > Polling is almost always super bad both for execution time and > for CPU usage. The patch replaces it with proper waiting based on > events happening in the limbo. > > Closes #5190 > --- > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5190-qsync-polling > Issue: https://github.com/tarantool/tarantool/issues/5190 > > src/box/box.cc | 7 +---- > src/box/txn_limbo.c | 74 ++++++++++++++++++++++++++++++++++----------- > src/box/txn_limbo.h | 4 +++ > 3 files changed, 62 insertions(+), 23 deletions(-) >  Hi! Thanks for the fix! LGTM. -- Serge Petrenko