public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove name length check in a workqueue
@ 2005-08-10 14:19 James Bottomley
  2005-08-10 14:45 ` Ingo Molnar
  0 siblings, 1 reply; 11+ messages in thread
From: James Bottomley @ 2005-08-10 14:19 UTC (permalink / raw)
  To: Andrew Morton, mingo; +Cc: Linux Kernel, SCSI Mailing List

Ingo,

This has been in the workqueue code in day one, for no real reason that
I can see.  We just tripped over it in SCSI because the fibre channel
transport class creates one workqueue per host with the name scsi_wq_%d
which trips this after we get to 100.  Unfortunately we just came across
someone with > 100 host adapters ...

I think the solution is just to get rid of the artificial limit.

James

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -308,8 +308,6 @@ struct workqueue_struct *__create_workqu
 	struct workqueue_struct *wq;
 	struct task_struct *p;
 
-	BUG_ON(strlen(name) > 10);
-
 	wq = kmalloc(sizeof(*wq), GFP_KERNEL);
 	if (!wq)
 		return NULL;



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH] remove name length check in a workqueue
@ 2005-08-11 18:48 Andreas Herrmann
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Herrmann @ 2005-08-11 18:48 UTC (permalink / raw)
  To: Simon Derr
  Cc: Andrew Morton, James Bottomley, linux-kernel, linux-scsi,
	linux-scsi-owner, mingo

        Simon Derr <Simon.Derr@bull.net> wrote:

  > It is sufficient to have a few HBAs and to insmod/rmmod the driver a 
few 
  > times.

  > Since the host_no is choosen with a mere counter increment 
  > in scsi_host_alloc():

  >       shost->host_no = scsi_host_next_hn++; /* XXX(hch): still racy */

  > Unused `host_no's are not reused and the 100 limit is reached even on 
  > smaller systems.

  > I have no idea of why someone would do repeated insmod/rmmods, though.
  > (But someone did).

You even don't have to use insmod/rmmod.  On s390 (using zfcp) it
suffices to take adapters offline and online (triggered via VM,
hardware, or within Linux). Just do so about 100 times ... You
know the result.


Regards,

Andreas

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

end of thread, other threads:[~2005-08-11 18:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-10 14:19 [PATCH] remove name length check in a workqueue James Bottomley
2005-08-10 14:45 ` Ingo Molnar
2005-08-10 17:05   ` Andrew Morton
2005-08-10 17:24     ` James Bottomley
2005-08-10 17:37       ` Andrew Morton
2005-08-10 17:54         ` James Bottomley
2005-08-10 18:27           ` Andrew Morton
2005-08-11 14:37             ` Simon Derr
2005-08-11 16:22             ` Coywolf Qi Hunt
2005-08-10 18:49           ` Frederic TEMPORELLI - astek
  -- strict thread matches above, loose matches on Subject: below --
2005-08-11 18:48 Andreas Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox