From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Wed, 27 Mar 2019 13:23:34 +0300 From: Cyrill Gorcunov Subject: Re: [PATCH 2/2] lib/core/fiber: Allow to extend default stack size Message-ID: <20190327102333.GJ20626@uranus.lan> References: <20190319193845.31221-1-gorcunov@gmail.com> <20190319193845.31221-3-gorcunov@gmail.com> <20190327093506.zsxzchje2un76rcp@esperanza> <20190327094618.GH20626@uranus.lan> <20190327101552.d3b6xvezm3rigszm@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327101552.d3b6xvezm3rigszm@esperanza> To: Vladimir Davydov Cc: tml , Konstantin Osipov List-ID: On Wed, Mar 27, 2019 at 01:15:52PM +0300, Vladimir Davydov wrote: ... > > > > These are not constants anymore since we're to ajust the values. > > Ah, I see. Anyway, I'd leave the constants alone and instead introduce a > separate static variable to store the current stack size in, because > mixing constants (min_size, watermark) and variables (current_default) > in one array doesn't look good to me. >From my POV using array and indices is more elegant than spreading variables but I won't insist :) ... > > > > Yes, stacks are allocated earlier, and we simply can't adjust already > > allocated stack thus we might need to distinguish stack sizes between > > cord_main and new fibers. This gonna be hard and I would like to escape > > such complexity. Seriously, we should use a hard rule: every stack in > > the engine has the same size allocated. > > > > Lets think -- is there a chance we will have to provide more configurable > > settings for early init stage in future? If yes then we should invent > > early init stage for lua (or say some json fine in /etc). If no and > > there is no chance we might need something else in future, better to > > stick with simplier solution as environment variables. > > Makes sense. But as this is a change in the API, we should consult > Kostja (Cc-ed). Yes, thanks for CC'ing. I managed to forgot to cc him in first place.