From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 1 Jun 2018 20:52:55 +0300 From: Konstantin Osipov Subject: Re: [PATCH 1/2] xlog: use ev_sleep instead of fiber_sleep for rate limiting Message-ID: <20180601175255.GA15567@atlas> References: <6ac5f585085a3379daae90480c094412e67b4d2d.1527605229.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ac5f585085a3379daae90480c094412e67b4d2d.1527605229.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/05/29 18:20]: > fiber_sleep() works only if the current thread was created with > cord_costart(). Since vinyl worker threads don't need fibers, they > are created with cord_start() and hence can't use fiber_sleep(). > So to be able to limit rate of vinyl dump/compaction, we have to > use ev_sleep() instead of fiber_sleep() in xlog. This is fine by > other xlog writers, because they don't use fibers either, neither > they should as xlogs are written without coio. > > Needed for #3220 Please use cord_costart() in vinyl workers instead. We will end up needing it for other things and it's nearly free. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov