]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
xio: initial mark_* and queueing/flow control
authorMatt Benjamin <matt@cohortfs.com>
Mon, 15 Dec 2014 19:53:09 +0000 (14:53 -0500)
committerMatt Benjamin <matt@cohortfs.com>
Wed, 14 Jan 2015 21:44:11 +0000 (16:44 -0500)
commitf276145fb65d0739bbea2204db42499c9a61dd96
tree81bce21321a6e2152c2fec1be64a1fba081e9ab6
parent1c2efde84d79e1458d939e4cbe4c24d04ed80eca
xio:  initial mark_* and queueing/flow control

This changes implements explicit support for Accelio sender-side
flow control, which requires queuing messages for later delivery
when the connection is ready to send.

This rquirement to queue messages for later delivery, and related
connection state logic, is substantially shared with new session
reset behavior, so we've pulled a subset of that logic foward.

Again due to shared implementation logic, this change also adds
implementations of mark_down(), mark_down_all(), mark_disposable(),
and related methods from Messenger, which were required to be
implemented after Hammer.

Add XioSubmit.h.

For now, start at state UP, READY.

When considering if a flow-controlled connection can be unblocked,
consider only the computed queue depth.  Re-activate and flush the
connection iff the computed queue depth <= 1/2 of the queue
high-water mark.

Placeholder added for byte-throttled case.
Fix lock flags abuse (found by Casey).

Discard deferred and unsent messages on unplanned disconnect.
The change causes discard_input_queue() to be called in Accelio's
on_disconnect_event() handler, as well as on mark_down().

xio: Change new established connection's state to up and ready
     Change the new established passive connection's state to up and
     ready then flush all pending msgs in input_queue

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
Signed-off-by: Vu Pham <vu@mellanox.com>
Signed-off-by: Matt Benjamin <matt@cohortfs.com>
12 files changed:
src/common/buffer.cc
src/include/buffer.h
src/messages/MNop.h [new file with mode: 0644]
src/msg/Message.h
src/msg/xio/XioConnection.cc
src/msg/xio/XioConnection.h
src/msg/xio/XioMessenger.cc
src/msg/xio/XioMessenger.h
src/msg/xio/XioMsg.cc
src/msg/xio/XioMsg.h
src/msg/xio/XioPortal.h
src/msg/xio/XioSubmit.h [new file with mode: 0644]