mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: vatsa@in.ibm.com
Cc: rusty@rustcorp.com.au, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix deadlock in __create_workqueue
Date: Tue, 4 May 2004 00:35:48 -0700	[thread overview]
Message-ID: <20040504003548.75097bb6.akpm@osdl.org> (raw)
In-Reply-To: <20040504065016.GA6911@in.ibm.com>

Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
>
> On Mon, May 03, 2004 at 12:25:20PM -0700, Andrew Morton wrote:
> > Well that create_workqueue_thread() will basically never fail - it's not a
> > path we need to be optimising.
> 
> Even if thread creation normally never fails, we still check for its
> return code and have some error recovery code! In that case, 
> I dont understand the point behind continuing the loop once thread
> destruction fails for some CPU. Lets say on a 128 CPU machine, if
> thread creation fails for the 1st CPU (because of say ENOMEM?), then
> why continue trying to create threads for the rest of 126 CPUs and
> _then_ destroy? Why not just break at the first occurence of failure 
> and cleanup then and there?
> 

Because there's less code to get wrong.

In this situation, correctness, clarity and code size are the only things
we care about.

  reply	other threads:[~2004-05-04  7:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 11:37 Srivatsa Vaddagiri
2004-05-01  2:19 ` Andrew Morton
2004-05-03 12:24   ` Srivatsa Vaddagiri
2004-05-03 20:08     ` Andrew Morton
2004-05-04  6:51       ` Srivatsa Vaddagiri
2004-05-01  2:27 ` Andrew Morton
2004-05-03 12:23   ` Srivatsa Vaddagiri
2004-05-03 19:25     ` Andrew Morton
2004-05-04  6:50       ` Srivatsa Vaddagiri
2004-05-04  7:35         ` Andrew Morton [this message]
2004-05-05  8:37     ` Rusty Russell

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=20040504003548.75097bb6.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=vatsa@in.ibm.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

all inboxes | Powered by JetHome®