From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org Subject: [Tarantool-patches] [PATCH 0/2] fiber_touch() and fiber_continue() Date: Fri, 23 Apr 2021 01:05:53 +0200 [thread overview] Message-ID: <cover.1619132519.git.v.shpilevoy@tarantool.org> (raw) The patchset introduces 2 alternatives to fiber_wakeup(): fiber_touch() and fiber_continue(). Touch behaves like wakeup but is NOP on the current fiber - sometimes it does not matter in the code. Continue works like wakeup but ensures the fiber is not the current one - helps to catch errors where it is not so, earlier than the awake fiber would try to yield. I couldn't find better names. Tried fiber_wake() instead of fiber_touch() but it looks too similar to fiber_wakeup(). Tried fiber_go(), but it looks too similar to fiber_gc(), and just looks more strange than touch. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5292-fiber-wakeup-nop Issue: https://github.com/tarantool/tarantool/issues/5292 Vladislav Shpilevoy (2): fiber: introduce fiber_touch and fiber_continue fiber: use fiber_touch and fiber_continue src/box/applier.cc | 4 +- src/box/box.cc | 2 +- src/box/gc.c | 12 ++-- src/box/journal.c | 4 +- src/box/memtx_engine.c | 2 +- src/box/raft.c | 9 ++- src/box/recovery.cc | 2 +- src/box/txn.c | 8 +-- src/box/txn_limbo.c | 9 ++- src/box/vy_log.c | 2 +- src/box/vy_quota.c | 2 +- src/box/vy_scheduler.c | 2 +- src/lib/core/cbus.c | 2 +- src/lib/core/coio.cc | 2 +- src/lib/core/coio_file.c | 2 +- src/lib/core/coio_task.c | 2 +- src/lib/core/fiber.c | 107 +++++++++++++++++++++-------------- src/lib/core/fiber.h | 26 +++++++++ src/lib/core/fiber_channel.c | 4 +- src/lib/core/fiber_cond.c | 4 +- src/lib/core/fiber_cond.h | 7 ++- src/lib/core/fiber_pool.c | 2 +- src/lib/core/latch.h | 2 +- src/lib/swim/swim.c | 3 +- src/lua/fiber.c | 2 +- test/unit/fiber.cc | 64 +++++++++++++++++++++ test/unit/fiber.result | 4 ++ 27 files changed, 200 insertions(+), 91 deletions(-) -- 2.24.3 (Apple Git-128)
next reply other threads:[~2021-04-22 23:05 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-22 23:05 Vladislav Shpilevoy via Tarantool-patches [this message] 2021-04-22 23:05 ` [Tarantool-patches] [PATCH 1/2] fiber: introduce fiber_touch and fiber_continue Vladislav Shpilevoy via Tarantool-patches 2021-04-22 23:05 ` [Tarantool-patches] [PATCH 2/2] fiber: use " Vladislav Shpilevoy via Tarantool-patches 2021-04-23 23:16 ` [Tarantool-patches] [PATCH 0/2] fiber_touch() and fiber_continue() 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=cover.1619132519.git.v.shpilevoy@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 0/2] fiber_touch() and fiber_continue()' \ /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