[PATCH] Use single threaded work queue for hid_compat

From: Andi Kleen
Date: Mon Nov 10 2008 - 16:34:39 EST


Use single threaded work queue for hid_compat

I doubt HID really needs to scale over multiple CPUs. So only use a
single threaded workqueue for HID_COMPAT. This avoids some excessive
thread use on systems with a larger number of CPUs.

Should still go into 2.6.28 if possible.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.28-rc4-test/drivers/hid/hid-core.c
===================================================================
--- linux-2.6.28-rc4-test.orig/drivers/hid/hid-core.c 2008-11-06 20:26:34.000000000 +0100
+++ linux-2.6.28-rc4-test/drivers/hid/hid-core.c 2008-11-10 22:36:49.000000000 +0100
@@ -1729,7 +1729,7 @@
goto err_bus;

#ifdef CONFIG_HID_COMPAT
- hid_compat_wq = create_workqueue("hid_compat");
+ hid_compat_wq = create_singlethread_workqueue("hid_compat");
if (!hid_compat_wq) {
hidraw_exit();
goto err;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/