From: Coywolf Qi Hunt <coywolf@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
mingo@redhat.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] remove name length check in a workqueue
Date: Fri, 12 Aug 2005 00:22:53 +0800 [thread overview]
Message-ID: <2cd57c9005081109222c6a5973@mail.gmail.com> (raw)
In-Reply-To: <20050810112710.47388a55.akpm@osdl.org>
On 8/11/05, Andrew Morton <akpm@osdl.org> wrote:
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> >
> > On Wed, 2005-08-10 at 10:37 -0700, Andrew Morton wrote:
> > > > and anyway, it doesn't have to be unique;
> > > > set_task_comm just does a strlcpy from the name, so it will be truncated
> > > > (same as for a binary with > 15 character name).
> > >
> > > Yup. But it'd be fairly silly to go adding the /%d, only to have it
> > > truncated off again.
> >
> > Well, but the other alternative is that we hit arbitrary BUG_ON() limits
> > in systems that create numbered workqueues which is rather contrary to
> > our scaleability objectives, isn't it?
>
> Another alternative is to stop passing in such long strings ;)
>
> > > What's the actual problem?
> >
> > What I posted originally; the current SCSI format for a workqueue:
> > scsi_wq_%d hits the bug after the host number rises to 100, which has
> > been seen by some enterprise person with > 100 HBAs.
> >
> > The reason for this name is that the error handler thread is called
> > scsi_eh_%d; so we could rename all our threads to avoid this, but one
> > day someone will come along with a huge enough machine to hit whatever
> > limit we squeeze it down to.
>
> OK, well scsi is using single-threaded workqueues anyway. So we could do:
>
> if (singlethread)
> BUG_ON(strlen(name) > sizeof(task_struct.comm) - 1);
> else
> BUG_ON(strlen(name) > sizeof(task_struct.comm) - 1 - 4);
>
> which gets you 10,000,000 HBAs. Enough?
>
> Ho hum, OK, let's just kill the BUG_ON.
s/BUG_ON/WARN_ON/ ?
--
Coywolf Qi Hunt
http://ahbl.org/~coywolf/
next prev parent reply other threads:[~2005-08-11 16:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-08-10 18:49 ` Frederic TEMPORELLI - astek
-- strict thread matches above, loose matches on Subject: below --
2005-08-11 18:48 Andreas Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2cd57c9005081109222c6a5973@mail.gmail.com \
--to=coywolf@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox