From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 7 Jun 2018 16:11:52 +0300 From: Konstantin Osipov Subject: Re: [PATCH 1/2] xlog: use ev_sleep instead of fiber_sleep for rate limiting Message-ID: <20180607131152.GC23310@chai> References: <6ac5f585085a3379daae90480c094412e67b4d2d.1527605229.git.vdavydov.dev@gmail.com> <20180601175255.GA15567@atlas> <20180604095133.iaxtdven3kjpuff5@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180604095133.iaxtdven3kjpuff5@esperanza> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/06/04 23:48]: > Anyway, yielding in xlog_write() may be unexpected from caller's pov, > because this function is blocking (writes a file) and isn't supposed > to yield. One usually hands it over to coio or a worker thread, where > yielding is pointless. > > > > > We will end up needing it for other things and it's nearly free. > > What things? Multiple things going on in the writer thread. Fiber-based programming is a powerful concept, and we're already using cbus for writer threads. Any kind of monitoring, collecting statistics, periodic work is easier done when you have fiber runtime available. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov