Branch: refs/heads/peer-wq
  Home:   https://github.com/sheepdog/sheepdog
  Commit: 9afe751e671d9e5913399a2c46a2c23a30d60008
      
https://github.com/sheepdog/sheepdog/commit/9afe751e671d9e5913399a2c46a2c23a30d60008
  Author: Hitoshi Mitake <mitake.hito...@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.hito...@lab.ntt.co.jp>


-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
https://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to