]> bbs.cooldavid.org Git - net-next-2.6.git/commit
Staging: dst: thread pool.
authorEvgeniy Polyakov <zbr@ioremap.net>
Tue, 13 Jan 2009 23:05:30 +0000 (02:05 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:32 +0000 (14:53 -0700)
commit6694b31ac12fd914ae5ecf937a8f55945f46940d
treebfe57ba36bc837152069d66b5c92aeb72b4e6b07
parent03b55b9deded4982c8937bcb7507b91945d71839
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>
drivers/staging/dst/thread_pool.c [new file with mode: 0644]