mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Linus Torvalds <torvalds@osdl.org>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: mingo@elte.hu, kernel@kolivas.org, linux-kernel@vger.kernel.org,
	piggin@cyberone.com.au, akpm@osdl.org, wli@holomorphy.com,
	markw@osdl.org
Subject: Re: [PATCH] Performance regression in 2.6.7-rc3
Date: Wed, 16 Jun 2004 07:54:35 -0700	[thread overview]
Message-ID: <3040000.1087397675@[10.10.2.4]> (raw)
In-Reply-To: <Pine.LNX.4.58.0406152004540.4142@ppc970.osdl.org>

>> > How the hell can that have any effect on non-threaded workloads? Perhaps
>> > some part of kernel compile *is* multi-threaded. It does seem to get 
>> 
>> make(1) with vfork(2) perhaps?
> 
> Very likely. And in the vfork() case it is definitely WRONG to try to
> reschedule (either threads _or_ processes), since the parent is going to
> go to sleep real soon now.
> 
> I think this code:
> 
>                         if (clone_flags & CLONE_VM)
>                                 wake_up_forked_thread(p);
>                         else
>                                 wake_up_forked_process(p);
> 
> is just wrong, and it should be replaced with
> 
> 			wake_up_new_process(p, clone_flags);
> 
> and then "wake_up_new_process()" can do the right thing, which is 
> basically:
> 
> 	if (clone_flags & CLONE_VFORK)
> 		synchronous wakeup, same as pipe-will-block case
> 	else if (clone_flags & CLONE_VM)
> 		thread-wakeup-case
> 	else
> 		process-wakeup-case
> 
> No?

Looks much better ... but I'd still dispute whether we need to throw 
non-vfork threads cross node by default. I'd suggest that's disabled
by default, and is either enabled by a global userspace option, or a
per-process one (or the option of both). Most thing (except benchmarks)
simply don't want this in real life ...

M.


  reply	other threads:[~2004-06-16 14:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-12  0:28 Con Kolivas
2004-06-12  7:58 ` Nick Piggin
2004-06-15  4:56 ` Ingo Molnar
2004-06-15 13:11   ` Con Kolivas
2004-06-15 15:02   ` Martin J. Bligh
2004-06-16  2:14     ` Herbert Xu
2004-06-16  3:05       ` Nick Piggin
2004-06-16  3:10         ` Linus Torvalds
2004-06-16  3:18           ` Nick Piggin
2004-06-16  7:02           ` Ingo Molnar
2004-06-16  3:09       ` Linus Torvalds
2004-06-16 14:54         ` Martin J. Bligh [this message]
2004-06-16  3:00   ` Nick Piggin
2004-06-16  1:22     ` Con Kolivas

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='3040000.1087397675@[10.10.2.4]' \
    --to=mbligh@aracnet.com \
    --cc=akpm@osdl.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markw@osdl.org \
    --cc=mingo@elte.hu \
    --cc=piggin@cyberone.com.au \
    --cc=torvalds@osdl.org \
    --cc=wli@holomorphy.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®