Skip to contentSkip to conversation

Use single threaded work queue for hid_compat

PATCH In review Andi Kleen 2 participants 2 messages Nov 10, 2008 – Nov 11, 2008 HID

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Use single threaded work queue for hid_compat

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.

---
 drivers/hid/hid-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-core.c +1 -1
Index: linux-2.6.28-rc4-test/drivers/hid/hid-core.c
===================================================================
@@ -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;
#1 lore raw
Quoted 3 lines · Andi Kleen

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.

Yes, makes sense, thanks. Applied.

Signature · 2 lines
Jiri Kosina
SUSE Labs