[PATCH 2/2] lib/core/fiber: Allow to extend default stack size

Konstantin Osipov kostja at tarantool.org
Mon Apr 1 23:51:09 MSK 2019


* Cyrill Gorcunov <gorcunov at gmail.com> [19/04/01 22:23]:
> On Mon, Apr 01, 2019 at 09:58:45PM +0300, Konstantin Osipov wrote:
> > * Cyrill Gorcunov <gorcunov at gmail.com> [19/04/01 20:44]:
> > 
> > require('fiber').cfg{stack_size=value})
> 
> Wait, at such early stage we don't have lua initialized yet.
> Letme describe the issue again, I think it might lost in threads:
> I would like to provide user a way to configure default stack
> size so we won't have to recompile tarantool to increase stack
> sizes in future.
> 
> I assume we can stick to the idea that every fiber in the
> system should have same stack size for simplicity sake.
> Since we need known stack size at the early bootstrap stage
> (for main_cord, even earlier than we initialize lua) we can't
> use traditional cfg engine. Instead we either should use
> environment variables, either some configuration file.
> 
> Or I miss something obvious?

I don't think we should bother with making sure the stack is right
for all fibers. You set the stack size, then you start fibers
which depend on it.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list