From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: Kirill Yukhin <kyukhin@tarantool.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Georgy Kirichenko <georgy@tarantool.org>,
tarantool-patches@freelists.org
Subject: Re: [tarantool-patches] [RFC] fiber: Increase default stack size
Date: Fri, 22 Feb 2019 13:57:10 +0300 [thread overview]
Message-ID: <20190222105710.GX7198@uranus> (raw)
In-Reply-To: <20190222104811.pn6lmblrjtdnhi7o@tkn_work_nb>
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
prev parent reply other threads:[~2019-02-22 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 21:26 Cyrill Gorcunov
2019-02-22 7:38 ` [tarantool-patches] " Георгий Кириченко
2019-02-22 7:46 ` Cyrill Gorcunov
2019-02-22 9:24 ` Георгий Кириченко
2019-02-22 9:45 ` Cyrill Gorcunov
2019-02-22 10:48 ` [tarantool-patches] " Alexander Turenko
2019-02-22 10:57 ` Cyrill Gorcunov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190222105710.GX7198@uranus \
--to=gorcunov@gmail.com \
--cc=alexander.turenko@tarantool.org \
--cc=georgy@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] [RFC] fiber: Increase default stack size' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox