[Stgt-devel] More threads for device server
michaelc at cs.wisc.edu
Mon Sep 5 05:45:41 CEST 2005
FUJITA Tomonori wrote:
> From: Mike Christie <michaelc at cs.wisc.edu>
> Subject: Re: [Stgt-devel] More threads for device server
> Date: Sun, 04 Sep 2005 21:05:12 -0500
>>>The current code uses work queue for performing SCSI commands (or
>>>block target's tasks). Work queue is simple and good enough for
>>>debugging, however, a single thread per CPU is not good enough (from
>>>the performance perspective).
>>>I thought about creating multiple kernel threads by hand. Are there
>>you can create a single threaded workqueue per target or session?
> The vfs APIs work synchronously. So we need multiple threads per
> target (or session) to perform several SCSI commands simultaneously.
> If we always use asynchronous block I/O APIs (like AIO vfs,
> submit_bio, etc), a single threaded workqueue would be fine.
I think async is going to be better in the long run since a thread per
device sounds like a lot. I am not familar with the AIO vfs code so I am
not much help and my opinion is really more of guess then. I am just
thinking if we can send more than one command down to the real device at
once then we could take advatage of the block layers io scheduling or
More information about the stgt