dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

2 Commits

Author SHA1 Message Date
Evgeniy Polyakov e55b689268 Staging: DST: extend thread pool exit conditions.
Added thread pool exit condition into the thread_pool_del_worker(). If
called in parallel another thread can steal

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:33 -07:00
Evgeniy Polyakov 6694b31ac1 Staging: dst: thread pool.
Kernel currently does not allow to queue work into some entity which
will perform it in the process context and have simple way to extend
number of worker and work with them not as separate objects, but with
pool as a whole. So thread pool model was implemented in the DST.

Thread pool abstraction allows to schedule a work to be performed
on behalf of kernel thread. One does not operate with threads itself,
instead user provides setup and cleanup callbacks for thread pool itself,
and action and cleanup callbacks for each submitted work.

Each worker has private data initialized at creation time and data,
provided by user at scheduling time.

When action is being performed, thread can not be used by other users,
instead they will sleep until there is free thread to pick their work.

Thread pool is used for crypto processing of incoming and outgoing IO
requests to reduce the overall overhead.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:32 -07:00