public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Jason Garrett-Glaser <darkshikari@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: newidle balancing in NUMA domain?
Date: Tue, 24 Nov 2009 19:09:41 +0100	[thread overview]
Message-ID: <1259086181.15249.117.camel@marge.simson.net> (raw)
In-Reply-To: <28f2fcbc0911240924r708202cdx8bc7b465d473f283@mail.gmail.com>

On Tue, 2009-11-24 at 09:24 -0800, Jason Garrett-Glaser wrote:
> > Quite a few being one test case, and on a program with a horrible
> > parallelism design (rapid heavy weight forks to distribute small
> > units of work).
> 
> > If x264 is declared dainbramaged, that's fine with me too.
> 
> We did multiple benchmarks using a thread pool and it did not help.

Yes, I see no way it possibly could make any difference.

Well, there is one thing.  We have this START_DEBIT thing, using a
thread pool avoids that very significant penalty.  WRT idle->busy again
time though, it can't make any difference.

> If you want to declare our app "braindamaged", feel free, but pooling
> threads to avoid re-creation gave no benefit whatsoever.  If you think
> the parallelism methodology is wrong as a whole, you're basically
> saying that Linux shouldn't be used for video compression, because
> this is the exact same threading model used by almost every single
> video encoder ever made.  There are actually a few that use
> slice-based threading, but those are actually even worse from your
> perspective, because slice-based threading spawns mulitple threads PER
> FRAME instead of one per frame.
> 
> Because of the inter-frame dependencies in video coding it is
> impossible to efficiently get a granularity of more than one thread
> per frame.  Pooling threads doesn't change the fact that you are
> conceptually creating a thread for each frame--it just eliminates the
> pthread_create call.  In theory you could do one thread per group of
> frames, but that is completely unrealistic for real-time encoding
> (e.g. streaming), requires a catastrophically large amount of memory,
> makes it impossible to track the bit buffer, and all other sorts of
> bad stuff.

I don't consider x264 to be braindamaged btw, I consider it to be a very
nice testcase for the scheduler.  As soon as I saw the problem it
highlighted so well, it became a permanent member of my collection.

	-Mike


  reply	other threads:[~2009-11-24 18:09 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 11:22 newidle balancing in NUMA domain? Nick Piggin
2009-11-23 11:36 ` Peter Zijlstra
2009-11-23 11:43   ` Nick Piggin
2009-11-23 11:50     ` Peter Zijlstra
2009-11-23 12:16       ` Nick Piggin
2009-11-23 11:45   ` Ingo Molnar
2009-11-23 12:01     ` Nick Piggin
2009-11-23 12:08       ` Ingo Molnar
2009-11-23 12:27         ` Nick Piggin
2009-11-23 12:46           ` Ingo Molnar
2009-11-24  6:36             ` Nick Piggin
2009-11-24 17:24               ` Jason Garrett-Glaser
2009-11-24 18:09                 ` Mike Galbraith [this message]
2009-11-30  8:19                 ` Nick Piggin
2009-12-01  8:18                   ` Jason Garrett-Glaser
2009-11-23 14:37 ` Mike Galbraith
2009-11-23 15:11   ` Nick Piggin
2009-11-23 15:21     ` Peter Zijlstra
2009-11-23 15:29       ` Nick Piggin
2009-11-23 15:37         ` Peter Zijlstra
2009-11-24  6:54           ` Nick Piggin
2009-11-23 15:53         ` Mike Galbraith
2009-11-24  6:53           ` Nick Piggin
2009-11-24  8:40             ` Mike Galbraith
2009-11-24  8:58               ` Mike Galbraith
2009-11-24  9:11                 ` Ingo Molnar
2009-11-30  8:27                   ` Nick Piggin
2009-11-23 17:04         ` Ingo Molnar
2009-11-24  6:59           ` Nick Piggin
2009-11-24  9:16             ` Ingo Molnar

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=1259086181.15249.117.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=darkshikari@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=peterz@infradead.org \
    /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