Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
	tarantool-patches@dev.tarantool.org, gorcunov@gmail.com
Subject: Re: [Tarantool-patches] [PATCH 1/1] qsync: remove polling from box_promote()
Date: Tue, 13 Jul 2021 13:02:17 +0300	[thread overview]
Message-ID: <700e9ac8-aa23-fc53-e5b2-880f748b9369@tarantool.org> (raw)
In-Reply-To: <e313e560179117d82891a5a3178d3c59ff22c3b3.1626128376.git.v.shpilevoy@tarantool.org>



13.07.2021 01:20, Vladislav Shpilevoy пишет:
> box_promote() when called manually used to wait for the existing
> transactions from a foreign limbo to end during a timeout. Giving
> them a chance to end on their terms.
>
> The waiting was done via polling like
>
>      while (!done)
>          sleep(small_timeout);
>
> Polling is almost always super bad both for execution time and
> for CPU usage. The patch replaces it with proper waiting based on
> events happening in the limbo.
>
> Closes #5190
> ---
> Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5190-qsync-polling
> Issue: https://github.com/tarantool/tarantool/issues/5190
>
>   src/box/box.cc      |  7 +----
>   src/box/txn_limbo.c | 74 ++++++++++++++++++++++++++++++++++-----------
>   src/box/txn_limbo.h |  4 +++
>   3 files changed, 62 insertions(+), 23 deletions(-)
>

  Hi! Thanks for the fix! LGTM.

-- 
Serge Petrenko


  parent reply	other threads:[~2021-07-13 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 22:20 Vladislav Shpilevoy via Tarantool-patches
2021-07-13 10:01 ` Serge Petrenko via Tarantool-patches
2021-07-13 10:02 ` Serge Petrenko via Tarantool-patches [this message]
2021-07-13 12:19 ` Cyrill Gorcunov via Tarantool-patches
2021-07-13 20:13 ` Vladislav Shpilevoy via Tarantool-patches

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=700e9ac8-aa23-fc53-e5b2-880f748b9369@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=sergepetrenko@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] qsync: remove polling from box_promote()' \
    /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