[tarantool-patches] Re: [PATCH] lib/core/fiber: Initialize stack_watermark where appropriate

Cyrill Gorcunov gorcunov at gmail.com
Tue Mar 19 00:38:13 MSK 2019


On Tue, Mar 19, 2019 at 12:19:19AM +0300, Konstantin Osipov wrote:
> > > 
> > > Well, then let's increase the number of elements to 32 or 64, or,
> > > better yet, 128, to make the situation better.
> > > 
> > > Why did you guys choose 8?
> > 
> > To cover low 1024 bytes. Maximal path is about 4K limit
> > so I think in average ~1/4 of page should catch paths
> > on stack.
> 
> Okay, well, that at least a plausible cause, I guess I'd be nice to
> see it in the comment for the poison array. However, you could use
> 4 integers and a larger poison offset?-))

Which decreases probability, but yes :) Kostya, do you think
4 writes vs 8 writes would give us that much benefit? Technically
it will be a couple of lines patch but... in the worst case where
we have all marks present but stack actually consumes more pages,
(and instead of shrinking it we wrongly "think" that we don't need
to call madvise), will lead to very bad consequences -- rss will
bloat as hell (just like Volodya pointed me about a stack-eager task
which jumps over all fibers in a system).



More information about the Tarantool-patches mailing list