Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 0/2] fiber_touch() and fiber_continue()
@ 2021-04-22 23:05 Vladislav Shpilevoy via Tarantool-patches
  2021-04-22 23:05 ` [Tarantool-patches] [PATCH 1/2] fiber: introduce fiber_touch and fiber_continue Vladislav Shpilevoy via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladislav Shpilevoy via Tarantool-patches @ 2021-04-22 23:05 UTC (permalink / raw)
  To: tarantool-patches, gorcunov, sergepetrenko

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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-23 23:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 23:05 [Tarantool-patches] [PATCH 0/2] fiber_touch() and fiber_continue() Vladislav Shpilevoy via Tarantool-patches
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox