[sheepdog] [PATCH v2 00/11] raise max node number

Liu Yuan namei.unix at gmail.com
Sat Sep 14 12:34:20 CEST 2013


v2:
 - make struct rb_node aligned to 64 bits.
 - raise the max node number from 1024 to 6144.
 - drop "sheep: remove bug_on for struct sd_node"

This is the second round of patch set that aims to raise the max node limit.

With this patch set, we can support up to 6144 nodes with zookeeper driver.
The real limit is actually determined by the cluster driver with the current node
management code, that is, how much payload of broadcast message the driver can
send determine value of SD_MAX_NODES.

No algorithm nor functionality changes, but involes a lot of api changes that
assume a static array of sd_nodes.

With this patch set, cluster driver will pass a rbtree of nodes directly to sheep
handlers and all the way down we'll play with rbtree instead of the old static
array.

I do not yet move static sd_nodes array in struct epoch_log and struct
cluster_info to dynamic structures. So basically we are still limited by max
node roof, but we are way close to get rid of it.

Liu Yuan (11):
  rbtree: make rb_for_each_entry and rb_for_each more generic
  sheep: remove local_idx in struct sd_rsp
  rbtree: add rb_copy helper
  sheep: don't check nodes information for joined nodes
  sheep: add option to disable shepherd driver
  rbtree: make rb_node aligned to 64 bytes
  sheep: use rbtree to manage struct sd_node
  group: add node to sockfd_cache as early as possible
  sheep: refactor send_join_request()
  cluster driver: don't use SD_MAX_NODES for local and corosync
  sheep: bump SD_MAX_NODES from 1024 to 6144

 configure.ac              |   10 ++
 dog/dog.c                 |   14 ++-
 dog/dog.h                 |    2 +-
 dog/node.c                |   59 ++++++-----
 dog/vdi.c                 |   15 +--
 include/internal_proto.h  |   18 +++-
 include/rbtree.h          |   30 ++++--
 include/sheep.h           |   20 +++-
 include/sheepdog_proto.h  |    1 -
 include/sockfd_cache.h    |    2 +-
 lib/sockfd_cache.c        |   10 +-
 sheep/Makefile.am         |    6 +-
 sheep/cluster.h           |    6 +-
 sheep/cluster/corosync.c  |   38 +++----
 sheep/cluster/local.c     |   50 +++++----
 sheep/cluster/zookeeper.c |   60 +++++------
 sheep/group.c             |  245 ++++++++++++++++++++++++---------------------
 sheep/ops.c               |   16 +--
 sheep/recovery.c          |   17 ++--
 sheep/sheep_priv.h        |    3 +-
 20 files changed, 360 insertions(+), 262 deletions(-)

-- 
1.7.9.5




More information about the sheepdog mailing list