[Stgt-devel] [Patch 0/4] bs_mmap / kreq_send threading
Mon Nov 5 17:27:10 CET 2007
Sorry about the delay.
On Tue, 23 Oct 2007 16:14:01 -0500
Robert Jennings <rcj at linux.vnet.ibm.com> wrote:
> 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.
tgtd is blocked when the data of a file isn't in page cache. So how
about worker threads does access to the data before tgtd calls
kreq_send? It works like the flush web server.
Another possible improvement is avoiding mmap per command. Seems that
with some distributions for POWER (at least debian), it's easy to
build 64-bit binary. So we don't need to call mmap per command.
More information about the stgt