unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <chris@cvine.freeserve.co.uk>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: wip-ports-refactor
Date: Wed, 11 May 2016 11:42:54 +0100	[thread overview]
Message-ID: <20160511114254.6b87c024@bother.homenet> (raw)
In-Reply-To: <87h9e6q92x.fsf@pobox.com>

On Tue, 10 May 2016 16:30:30 +0200
Andy Wingo <wingo@pobox.com> wrote:
> I think we have no plans for giving up pthreads.  The problem is that
> like you say, if there is no shared state, and your architecture has a
> reasonable memory model (Intel's memory model is really great to
> program), then you're fine.  But if you don't have a good mental model
> on what is shared state, or your architecture doesn't serialize loads
> and stores... well there things are likely to break.

Hi Andy,

That I wasn't expecting.  So you are saying that some parts of guile
rely on the ordering guarantees of the x86 memory model (or something
like it) with respect to atomic operations on some internal localised
shared state[1]?  Of course, if guile is unduly economical with its
synchronisation on atomics, that doesn't stop the compiler doing some
reordering for you, particularly now there is a C11 memory model.

Looking at the pthread related stuff in libguile, it seems to be
written by someone/people who know what they are doing.  Are you
referring specifically to the guile VM, and if so is guile-2.2 likely
to be more problematic than guile-2.0?

Chris

[1] I am not talking about things like the loading of guile modules
here, which involves global shared state and probably can't be done lock
free (and doesn't need to be) and may require other higher level
synchronisation such as mutexes.



  reply	other threads:[~2016-05-11 10:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 20:46 wip-ports-refactor Andy Wingo
2016-04-07  4:16 ` wip-ports-refactor Christopher Allan Webber
2016-04-12  8:52   ` wip-ports-refactor Andy Wingo
2016-04-13 14:27     ` wip-ports-refactor Christopher Allan Webber
2016-04-12  9:33 ` wip-ports-refactor Andy Wingo
2016-04-14 14:03 ` wip-ports-refactor Ludovic Courtès
2016-04-17  8:49   ` wip-ports-refactor Andy Wingo
2016-04-17 10:44     ` wip-ports-refactor Ludovic Courtès
2016-04-19  8:00       ` wip-ports-refactor Andy Wingo
2016-04-19 14:15         ` wip-ports-refactor Ludovic Courtès
2016-05-10 15:02     ` wip-ports-refactor Andy Wingo
2016-05-10 16:53       ` wip-ports-refactor Andy Wingo
2016-05-11 14:00       ` wip-ports-refactor Christopher Allan Webber
2016-05-11 14:23       ` wip-ports-refactor Ludovic Courtès
2016-05-12  8:15         ` wip-ports-refactor Andy Wingo
2016-04-24 11:05 ` wip-ports-refactor Chris Vine
2016-05-10 14:30   ` wip-ports-refactor Andy Wingo
2016-05-11 10:42     ` Chris Vine [this message]
2016-05-12  6:16       ` wip-ports-refactor 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=20160511114254.6b87c024@bother.homenet \
    --to=chris@cvine.freeserve.co.uk \
    --cc=guile-devel@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).