hammer2 - Retool dmsg mechanics to improve virtual circuit design 1/2

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 23 April 2014 02:04 UTC

- Rip-out the circuit structures and forging code. These changes simplify the DMSG code considerably.

- Retool the core command/response messaging mechanics to allow either side of a transaction to initiate commands and receive responses.

This means we cannot use DMSGF_REPLY to determine whether the transmit-side or receive-side state RBTREE holds the msgid. Instead we add two more flags DMSGF_REVTRANS and DMSGF_REVCIRC to tell the receiver which RBTREE holds the msgid and/or circuit id.

- Retool to allow transaction stacking. Sub-transactions can now run under their parents.

- Retool the transaction code to provide virtual circuit functionality through the use of transaction stacking.

With these changes, the normal SPAN mechanism which operates using open transactions can also be used to route messages over the SPAN. There is no longer a need to forge a return path because sub-transaction commands can now be initiated 'out' over an active, received SPAN transaction.

This part is not completely working yet, it needs the actual routing code and some adjustments to the SPAN mechanism to prevent path ripups from interfering with any in-progress transactions. Ultimately the availability of a new path would have two be detected by the end points so new 'connections' can be forged over the new, better path.

1b8eded hammer2 - Retool dmsg mechanics to improve virtual circuit design 1/2
lib/libdmsg/debug.c | 10 +-
lib/libdmsg/dmsg.h | 61 ++---
lib/libdmsg/msg.c | 547 +++++++++++++++++++++---------------------
lib/libdmsg/msg_lnk.c | 494 +++++++++-----------------------------
lib/libdmsg/service.c | 26 +-
sbin/hammer2/cmd_debug.c | 176 ++++++++------
sys/kern/kern_dmsg.c | 582 ++++++++++++---------------------------------
sys/kern/subr_diskiocom.c | 10 +-
sys/sys/dmsg.h | 346 ++++++++++-----------------
9 files changed, 801 insertions(+), 1451 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share