mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-04-06 17:49:11 +03:00
Minor improvement to taskq handling. This is a small step towards
dynamic taskqs which still need to be fully implemented. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@87 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
parent
18c9eadf97
commit
6e605b6e58
@ -198,7 +198,7 @@ do { \
|
|||||||
do { \
|
do { \
|
||||||
if (unlikely(!(cond))) { \
|
if (unlikely(!(cond))) { \
|
||||||
printk(KERN_ERR "ASSERTION(" #cond ") failed"); \
|
printk(KERN_ERR "ASSERTION(" #cond ") failed"); \
|
||||||
SBUG(); \
|
BUG(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -66,10 +66,14 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *priv, uint_t flags)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__taskq_dispatch);
|
EXPORT_SYMBOL(__taskq_dispatch);
|
||||||
|
|
||||||
/* XXX - Most args ignored until we decide if it's worth the effort
|
/* XXX - We must fully implement dynamic workqueues since they make a
|
||||||
* to emulate the solaris notion of dynamic thread pools. For
|
* significant impact in terms of performance. For now I've made
|
||||||
* now we simply serialize everything through one thread which
|
* a trivial compromise. If you ask for one thread you get one
|
||||||
* may come back to bite us as a performance issue.
|
* thread, if you ask for more than that you get one per core.
|
||||||
|
* It's unclear if you ever really need/want more than one per-core
|
||||||
|
* anyway. More analysis is required.
|
||||||
|
*
|
||||||
|
* name - Workqueue names are limited to 10 chars
|
||||||
* pri - Ignore priority
|
* pri - Ignore priority
|
||||||
* min - Ignored until this is a dynamic thread pool
|
* min - Ignored until this is a dynamic thread pool
|
||||||
* max - Ignored until this is a dynamic thread pool
|
* max - Ignored until this is a dynamic thread pool
|
||||||
@ -79,9 +83,15 @@ taskq_t *
|
|||||||
__taskq_create(const char *name, int nthreads, pri_t pri,
|
__taskq_create(const char *name, int nthreads, pri_t pri,
|
||||||
int minalloc, int maxalloc, uint_t flags)
|
int minalloc, int maxalloc, uint_t flags)
|
||||||
{
|
{
|
||||||
/* NOTE: Linux workqueue names are limited to 10 chars */
|
taskq_t *tq;
|
||||||
ENTRY;
|
ENTRY;
|
||||||
RETURN(create_singlethread_workqueue(name));
|
|
||||||
|
if (nthreads == 1)
|
||||||
|
tq = create_singlethread_workqueue(name);
|
||||||
|
else
|
||||||
|
tq = create_workqueue(name);
|
||||||
|
|
||||||
|
return tq;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__taskq_create);
|
EXPORT_SYMBOL(__taskq_create);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user