[tarantool-patches] [RFC] fiber: Increase default stack size
Cyrill Gorcunov
gorcunov at gmail.com
Fri Feb 22 13:57:10 MSK 2019
On Fri, Feb 22, 2019 at 01:48:11PM +0300, Alexander Turenko wrote:
> Hi!
>
> I look at the patch and found several typos, so wrote this email. See
> below for them.
Thanks!
> Also I wonder whether we can add a metric for a fiber stack size via,
> say, fiber.info()? It'll give us understanding how close we to the
> limits in certain workloads. We already have backtraces there.
Didn't know about fiber.info() feature. I think we can add some stat.
...
> > +
> > +static inline bool
> > +stack_has_wmark(struct fiber *fiber)
> > +{
> > + void *pos = stack_wmark_pos(fiber);
> > + return !!!memcmp(pos, stack_wmark, sizeof(stack_wmark));
>
> Triple negation? Why?
To convert into bool's inverse. IOW, it is a common trick using
double negation to map [0;N] into bools and third negation
for the inverse. Actually on low level it is the same as
return memcmp(...) == 0 but shorter. If it is confusing
I can put traditional comparision.
> > +}
> > +
> > +/*
> > + * Process stack switching: we try to eliminate unneeded
> > + * physical page usage for stack. If fiber never touched
> > + * area after/before the watermark, the OS get ralaxed in
>
> ralaxed
+1
> > + * If fiber ecxeed a watermark, just clear the
>
> ecxeed
thanks!
> > +
> > + /*
> > + * Set the flag iif've successed,
>
> iif've
iif is correct, i managed to miss "we" :) thanks
More information about the Tarantool-patches
mailing list