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

Георгий Кириченко georgy at tarantool.org
Fri Feb 22 12:24:12 MSK 2019


On Friday, February 22, 2019 10:46:07 AM MSK Cyrill Gorcunov wrote:
> On Fri, Feb 22, 2019 at 10:38:42AM +0300, Георгий Кириченко wrote:
> > Hi Cyrill!
> 
> Hi!
> 
> > 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?
I complain only that you check poison on each fiber schedule what could be too 
expensive - a fiber could be scheduled about million times per second.
I think If we would check a fiber stack poison when it goes to recycle so is 
will be a better option.
> 
> p.s.
> 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190222/9ff718e4/attachment.sig>


More information about the Tarantool-patches mailing list