[sheepdog] [sheepdog/sheepdog] 15f5c9: sheep: create a dedicated workqueue for peer reque...

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Feb 16 09:04:20 CET 2017


  Branch: refs/heads/peer-wq
  Home:   https://github.com/sheepdog/sheepdog
  Commit: 15f5c9d3678f2c55390efa186963c0abbdf06e3e
      https://github.com/sheepdog/sheepdog/commit/15f5c9d3678f2c55390efa186963c0abbdf06e3e
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2017-02-16 (Thu, 16 Feb 2017)

  Changed paths:
    M sheep/request.c
    M sheep/sheep.c
    M sheep/sheep_priv.h

  Log Message:
  -----------
  sheep: create a dedicated workqueue for peer requests

Current sheepdog uses the io workqueue (sys->io_wqueue) for 2 kinds of
requests: peer and local. However, this architecture can cause
deadlock in the fixed workqueue mode because of the schedules like
below:

1. node A receives a request Ra from a client, queue Ra to io_wqueue
   as a peer request
2. node B receives a request Rb from another client, queue Rb to
   io_wqueue as a peer request
3. in node A, Ra forwards the requests to node B
4. in node B, Rb forwards the requests to node A
5. if node A or node B don't have idle workers in io_workqueue, it can
   cause deadlock

This commit avoids the problem by creating a new dedicated workqueue
sys->peer_wqueue for avoiding the problem.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>




More information about the sheepdog mailing list