[Stgt-devel] [Patch 0/4] bs_mmap / kreq_send threading

Robert Jennings rcj
Tue Oct 23 23:14:01 CEST 2007

A little threading work like we have in bs_sync for bs_mmap.  The mmap
can be taken care of with a small pool of worker threads this way.

After the mmap the completed commands enter back into the main tgtd
thread and would be sent to the kernel for in-kernel drivers through
kreq_send.  Unfortunately kreq_send can sleep in blk_rq_map_user or
scsi_map_user_pages and hold up processing in tgtd.  So kreq_send can
add the command to a list and hand it off to a small thread pool to
process sending the replies to the kernel.

I've also included a kernel patch for our tree to change the processing
of command from userspace such that it only processes one command per
write.  This allows us to thread the blk_rq_map_user/scsi_map_user_pages
calls with our thread pool.

Last patch changes the way we open the backed device in the bs_mmap code
to add O_SYNC.

Robert Jennings

Robert C. Jennings <rcjenn at us.ibm.com>
IBM Linux Technology Center, Austin
+1.512.838.4964 (t/l 678.4964)

More information about the stgt mailing list