public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "solar-gcc at openwall dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/43706] scheduling two threads on one core leads to starvation
Date: Fri, 12 Nov 2010 11:44:00 -0000	[thread overview]
Message-ID: <bug-43706-4-bql0dNfG2C@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-43706-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43706

--- Comment #25 from Alexander Peslyak <solar-gcc at openwall dot com> 2010-11-12 11:19:13 UTC ---
(In reply to comment #24)
> If only one out of 35 tests becomes slower,

You might have misread what I wrote.  I did not mention "35 tests"; I mentioned
that a test became slower by 35%.  The total number of different tests was 4
(and each was invoked multiple times per spincount setting, indeed).  One out
of four stayed 35% slower until I increased GOMP_SPINCOUNT to 200000.

> I would rather blame it to this one (probably badly parallelized) application, not the OpenMP runtime system.

This makes some sense, but the job of an optimizing compiler and runtime
libraries is to deliver the best performance they can even with somewhat
non-optimal source code.  There are plenty of real-world cases where spending
time on application redesign for speed is unreasonable or can only be completed
at a later time - yet it is desirable to squeeze a little bit of extra
performance out of the existing code.  There are also cases where more
efficient parallelization - implemented at a higher level to avoid frequent
switches between parallel and sequential execution - makes the application
harder to use.  To me, one of the very reasons to use OpenMP was to
avoid/postpone that redesign and the user-visible complication for now.  If I
went for a more efficient higher-level solution, I would not need OpenMP in the
first place.

> So I would suggest a threshold of 100000 for now.

My suggestion is 250000.

> IMHO, something should really happen to this problem before the 4.6 release.

Agreed.  It'd be best to have a code fix, though.


  parent reply	other threads:[~2010-11-12 11:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-43706-4@http.gcc.gnu.org/bugzilla/>
2010-11-09 16:33 ` solar-gcc at openwall dot com
2010-11-12  8:21 ` singler at kit dot edu
2010-11-12 11:44 ` solar-gcc at openwall dot com [this message]
2010-11-15  9:14 ` singler at kit dot edu
2010-12-02 14:31 ` jakub at gcc dot gnu.org
2010-12-16 13:03 ` rguenth at gcc dot gnu.org
2012-01-12 20:34 ` pinskia at gcc dot gnu.org
2010-04-09 16:22 [Bug libgomp/43706] New: " baeuml at kit dot edu
2010-04-09 16:22 ` [Bug libgomp/43706] " baeuml at kit dot edu
2010-04-09 18:34 ` pinskia at gcc dot gnu dot org
2010-04-09 20:55 ` baeuml at kit dot edu
2010-04-09 22:11 ` mika dot fischer at kit dot edu
2010-04-20 10:23 ` jakub at gcc dot gnu dot org
2010-04-20 10:49 ` jakub at gcc dot gnu dot org
2010-04-20 12:23 ` mika dot fischer at kit dot edu
2010-04-20 15:38 ` jakub at gcc dot gnu dot org
2010-04-21 14:01 ` jakub at gcc dot gnu dot org
2010-04-21 14:01 ` jakub at gcc dot gnu dot org
2010-04-21 14:06 ` jakub at gcc dot gnu dot org
2010-04-21 14:07 ` jakub at gcc dot gnu dot org
2010-04-21 14:23 ` mika dot fischer at kit dot edu
2010-04-23 14:17 ` singler at kit dot edu
2010-04-30  8:53 ` jakub at gcc dot gnu dot org
2010-07-02  1:39 ` solar-gcc at openwall dot com
2010-07-30 14:00 ` johnfb at mail dot utexas dot edu
2010-08-13 15:48 ` singler at kit dot edu
2010-08-24 11:07 ` solar-gcc at openwall dot com
2010-08-24 11:41 ` jakub at gcc dot gnu dot org
2010-08-24 12:18 ` solar-gcc at openwall dot com
2010-08-30  8:41 ` singler at kit dot edu
2010-09-01 16:38 ` jakub at gcc dot gnu dot org
2010-09-05 11:37 ` solar-gcc at openwall dot com

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=bug-43706-4-bql0dNfG2C@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).