Hi Gregoy and Sage,
I'm just writing Messenger's unit tests to ensure that SimpleMessenger
and AsyncMessenger behavior same and expected.
I think the most unclear thing is the lock rule of fast dispatch. When
introduced fast dispatch, there exists three methods
"ms_fast_connect", "ms_fast_accept", "ms_fast_dispatch" will be called
within Messenger's thread. Because without fast dispatcher all
messages are delivered from queue to queue, fast path will result in
potential dead lock I think.
"ms_fast_accept" and "ms_fast_connect" are called with
"pipe_lock"(Pipe) or "lock"(AsyncConnection). And
Connection::send_message will called outsider. So it may happen:
Other thread Messenger's thread
lock() connection lock()
send_message() connect
try connection lock() ms_fast_connect()
DEAD LOCK
So I'm not sure whether we have some lock rules whether on caller side
or ms_fast_connect/accept side. For example, ms_fast_connect/accept
can't acquire the same lock with send_message?
--
Best Regards,
Wheat
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html