From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 12 Feb 2019 21:15:53 +0300 From: Konstantin Osipov Subject: Re: [PATCH v3 3/4] vinyl: don't consume quota if wait queue isn't empty Message-ID: <20190212181553.GE21518@chai> References: <1c59bdace186d95c6baeae5ba16cdfc2ec42cd31.1549990576.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c59bdace186d95c6baeae5ba16cdfc2ec42cd31.1549990576.git.vdavydov.dev@gmail.com> To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [19/02/12 20:28]: > vy_quota_use only checks if there's enough quota available for consumer > to proceed, but that's not enough, because it may occur that there are > fibers already waiting for the resource. Bypassing them may result in > starvation, which manifests itself as "waited for vinyl memory quota for > too long" warnings. To ensure fairness and avoid starvation, let's go to > sleep if the wait queue is not empty. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov