[tarantool-patches] Re: [RFC] fiber: Increase default stack size

Cyrill Gorcunov gorcunov at gmail.com
Fri Feb 22 10:46:07 MSK 2019

On Fri, Feb 22, 2019 at 10:38:42AM +0300, Георгий Кириченко wrote:
> Hi Cyrill!


> Thanks for the patch, please see some comments bellow.
> I like your approach but I think we should do it in a different manner: we 
> could poison 64k page of a fiber stack on start and then check the poison mark 
> when fiber finished. If watermark was overwritten by fiber activity we could use 
> madvise in order to decrease RSS usage.

I somehow fail to see how it is different from the current scheme.
In the patch we put single 8 16 bytes poison at 64K (well, page
aligned offset to be precise) and once the fiber scheduled out we
test it. I suspect the difference you mean is to _when_ test the poison?
Or you mean to poison the whole 64K?

You know, I think this stack limits *must not* be fixed in size but
rather configurable from some parameters (getenv or something). Otherwise
it will be an endless run and catch game.

More information about the Tarantool-patches mailing list