[sheepdog] [sheepdog/sheepdog] acb4f7: sheep: remove needless workqueues

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Feb 17 08:39:30 CET 2017


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

  Changed paths:
    M sheep/sheep_priv.h

  Log Message:
  -----------
  sheep: remove needless workqueues

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


  Commit: 40b2e59366c746d1c1e81beff942b5ce6d177c7d
      https://github.com/sheepdog/sheepdog/commit/40b2e59366c746d1c1e81beff942b5ce6d177c7d
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2017-02-17 (Fri, 17 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>


  Commit: a9e5c4b57f0fde0bce0b9f7ff8b90514a4b543ac
      https://github.com/sheepdog/sheepdog/commit/a9e5c4b57f0fde0bce0b9f7ff8b90514a4b543ac
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

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

  Log Message:
  -----------
  sheep: a dedicated workqueue for updating asynchronous ledger update

Because of the same reason with the previous commit, this commit
creates a dedicated workqueue for updating asynchronous ledger update.

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


  Commit: ee6af924e6d7a7fe42172387766027beeb555681
      https://github.com/sheepdog/sheepdog/commit/ee6af924e6d7a7fe42172387766027beeb555681
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M include/sheepdog_proto.h
    M sheep/gateway.c
    M sheep/request.c
    M sheep/sheep.c
    M sheep/sheep_priv.h

  Log Message:
  -----------
  sheep: a dedicated workqueue for internally forwarded gateway requests

Because of the same reason, this commit adds a new dedicated for
internally forwarded gateway requests.

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


  Commit: 953f18c73a79c1157bcb59c9aca84b56c3d8474d
      https://github.com/sheepdog/sheepdog/commit/953f18c73a79c1157bcb59c9aca84b56c3d8474d
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2017-02-17 (Fri, 17 Feb 2017)

  Changed paths:
    M sheep/gateway.c
    M sheep/request.c
    M sheep/sheep.c
    M sheep/sheep_priv.h
    M sheep/store/common.c

  Log Message:
  -----------
  sheep: dedicated queues for request paths related to COW

Internally generated requests for reading/writing inodes and remove
requests during reference decrement must avoid cyclic dependencies of
workqueues.

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


Compare: https://github.com/sheepdog/sheepdog/compare/dde00b645976...953f18c73a79


More information about the sheepdog mailing list