Example Analysis of Thread of Ceph Network layer Code
Editor to share with you the Ceph network layer code thread example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Where does the Pipe write thread start?
Pipe * SimpleMessenger::connect_rank ()-> pipe- > start_writer (); / / start the WriterThread
Where does the Pipe reader thread start?
Void SimpleMessenger::ready ()-> accepter.start (); Pipe * SimpleMessenger::add_accept_pipe (int sd) {p-> start_reader (); p-> pipe_lock.Unlock (); pipes.insert (p); accepting_pipes.insert (p); lock.Unlock (); return p;} void Pipe::start_reader () {assert (pipe_lock.is_locked ()); assert (! reader_running); if (reader_needs_join) {reader_thread.join () Reader_needs_join = false;} reader_running = true; reader_thread.create (msgr- > cct- > _ conf- > ms_rwthread_stack_bytes);} void Pipe::reader () / / start the reader thread.
Where does the DispatcherQueue thread start?
Void SimpleMessenger::ready () {ldout (cct,10)