RadosClient: Avoid the DispatchQueue for OSD responses.

Prior to this change, reader thread puts the response on the DispatchQueue
and Dispatcher thread would call librados callbacks (C_aio_Ack, C_Safe_Cond).
The single DispatchQueue and Dispatcher thread (per client) would become
a bottleneck with multiple OSDs in the cluster.
Similar to fast-dispatch changes on the OSD, DispatchQueue/thread are removed
and librados internal callbacks will be called from reader thread context.

Signed-off-by: Sushma Gurram <sushma.gurram@sandisk.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>

Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
sushma 2014-05-28 15:27:54 -07:00 committed by Greg Farnum
parent 0cc9ade824
commit 884a6b374a

12
src/librados/RadosClient.h Normal file → Executable file
View File

@ -141,6 +141,18 @@ public:
void get();
bool put();
void blacklist_self(bool set);
private:
bool ms_can_fast_dispatch_any() const { return true; }
bool ms_can_fast_dispatch(Message *m) const {
switch (m->get_type()) {
case CEPH_MSG_OSD_OPREPLY:
return true;
default:
return false;
}
}
void ms_fast_dispatch(Message *m) { ms_dispatch(m); }
};
#endif