[Drbd-dev] drbd threads and workqueues: For what is each responsible?

Eric Wheeler drbd-dev at lists.ewheeler.net
Mon Sep 26 01:47:49 CEST 2016


Hello all,

Would someone kindly point me at documentation or help me summarize the 
kernel thread and workqueues used by each DRBD resource?

These are the ones I've found, please correct or add to my annotations as 
necessary to get a better understanding of the internal data flow:

drbd_submit (workqueue, device->submit.wq):
  The workqueue that handles new read/write requests from the block layer, 
  updates the AL as necessary, sends IO to the peer (or remote-reads if 
  diskless).  Does this thread write blocklayer-submitted IO to the 
  backing device, too, or just metadata writes?


drbd_receiver (thread, connection->receiver):
  The connection handling thread.  Does this thread do anything besides 
  make sure the connection is up and handle cleanup on disconnect?
  
  It looks like drbd_submit_peer_request is called several times from 
  drbd_receiver.c, but is any disk IO performed by this thread?


drbd_worker (thread, connection->worker):
  The thread that does drbd work which is not directly related to IO 
  passed in by the block layer; action based on the work bits from 
  device->flags such as:
	do_md_sync, update_on_disk_bitmap, go_diskless, drbd_ldev_destroy, do_start_resync 
  Do metadata updates happen through this thread via 
  do_md_sync/update_on_disk_bitmap, or are they passed off to another 
  thread for writes?  Is any blocklayer-submitted IO submitted by this 
  thread?


drbd_ack_receiver (thread, connection->ack_receiver):
  Thread that receives all ACK types from the peer node.  
  Does this thread perform any disk IO?  What kind?


drbd_ack_sender (workqueue, connection->ack_sender):
  Thread that sends ACKs to the peer node.
  Does this thread perform any disk IO?  What kind?

Thank you for your help!
  

--
Eric Wheeler


More information about the drbd-dev mailing list