From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: 14756@debbugs.gnu.org
Subject: bug#14756: threads - par-map - multicore issue
Date: Tue, 21 Jun 2016 10:33:47 +0200 [thread overview]
Message-ID: <87vb13c55g.fsf@gnu.org> (raw)
In-Reply-To: <87lh1z592a.fsf@pobox.com> (Andy Wingo's message of "Tue, 21 Jun 2016 08:51:09 +0200")
Andy Wingo <wingo@pobox.com> skribis:
> I see this, but I'm not quite sure what's going on. What I do see is
> that par-map of 1+ on a list is horribly slow, both on 2.0 and master.
> Ludovic do you know what's going on here?
As David put it, only one core is being used, which is clearly a bug.
I believe the bug was introduced by
8a177d316c0062afe74f9a761ef460e297435e59 (however, before that commit,
you would hit a stack overflow when doing ‘par-map’ on a large-enough
list.)
What happens is that ‘par-mapper’ creates nested futures whose
dependency graph forms a comb-shaped tree; thus we quickly hit
%MAX-NESTING-LEVEL.
This is fine in itself, but for some reason, it ends up evaluating most
of those futures in one thread while the other threads apparently remain
stuck in ‘wait-condition-variable’ in ‘process-futures’.
I’ve looked into it a bit but that needs more time…
Ludo’.
next prev parent reply other threads:[~2016-06-21 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-30 18:00 bug#14756: threads - par-map - multicore issue David Pirotte
2016-06-21 6:51 ` Andy Wingo
2016-06-21 8:33 ` Ludovic Courtès [this message]
2017-02-28 9:53 ` Andy Wingo
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vb13c55g.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=14756@debbugs.gnu.org \
--cc=wingo@pobox.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).