linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: use single threaded work queue
@ 2009-08-19 11:25 Jens Axboe
  2009-08-19 11:59 ` Jeff Garzik
  0 siblings, 1 reply; 20+ messages in thread
From: Jens Axboe @ 2009-08-19 11:25 UTC (permalink / raw)
  To: linux-ide, linux-kernel; +Cc: jeff, htejun

Hi,

On boxes with lots of CPUs, we have so many kernel threads it's not
funny. The basic problem is that create_workqueue() creates a per-cpu
thread, where we could easily get by with a single thread for a lot of
cases.

One such case appears to be ata_wq. You want at most one per pio drive,
not one per CPU. I'd suggest just dropping it to a single threaded wq.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 072ba5e..0d78628 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6580,7 +6580,7 @@ static int __init ata_init(void)
 {
 	ata_parse_force_param();
 
-	ata_wq = create_workqueue("ata");
+	ata_wq = create_singlethread_workqueue("ata");
 	if (!ata_wq)
 		goto free_force_tbl;
 

-- 
Jens Axboe

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-08-20 14:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 11:25 [PATCH] libata: use single threaded work queue Jens Axboe
2009-08-19 11:59 ` Jeff Garzik
2009-08-19 12:04   ` Jens Axboe
2009-08-19 12:14     ` Mark Lord
2009-08-19 12:23       ` Jens Axboe
2009-08-19 13:22         ` Jeff Garzik
2009-08-19 13:28           ` Jeff Garzik
2009-08-19 14:11             ` Tejun Heo
2009-08-19 15:21               ` Alan Cox
2009-08-19 15:53                 ` Tejun Heo
2009-08-19 16:15                   ` Alan Cox
2009-08-19 16:58                     ` Tejun Heo
2009-08-19 17:23                       ` Alan Cox
2009-08-20 12:46                         ` Tejun Heo
2009-08-20 11:39                 ` Stefan Richter
2009-08-20 12:11                   ` Stefan Richter
2009-08-19 22:22         ` Benjamin Herrenschmidt
2009-08-20 12:47           ` Tejun Heo
2009-08-20 12:48             ` Tejun Heo
2009-08-20 14:28               ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).