[Stgt-devel] More threads for device server
Mike Christie
michaelc at cs.wisc.edu
Mon Sep 5 05:38:08 CEST 2005
FUJITA Tomonori wrote:
> From: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
> Subject: Re: [Stgt-devel] More threads for device server
> Date: Mon, 05 Sep 2005 11:14:49 +0900
>
>
>>>>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
>>>>handy APIs?
>>>
>>>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 create threads per device, can we put the code to wait all the
> threads to finish and destroy them in stgt_device_class_release?
Ummmm I think you can sleep in there. We would have to make sure the
last put on the device is from a place that can sleep. A thread or
couple of threads per device seems like it might be a lot of threads though.
More information about the stgt
mailing list