unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Chris Vine <vine35792468@gmail.com>
Cc: guile-devel@gnu.org
Subject: Re: Unexpectedly low read/write performance of open-pipe
Date: Tue, 09 Apr 2019 14:24:09 -0400	[thread overview]
Message-ID: <87lg0jrq8r.fsf@netris.org> (raw)
In-Reply-To: <20190409102140.f4d9d1e7c6457c23eea29964@gmail.com> (Chris Vine's message of "Tue, 9 Apr 2019 10:21:40 +0100")

Hi Chris,

Chris Vine <vine35792468@gmail.com> writes:

> On Tue, 09 Apr 2019 04:35:38 -0400
> Mark H Weaver <mhw@netris.org> wrote:
>> 
>> I think it's probably fine for 2.2, although a more careful check should
>> be made for differences in behavior between the old and new
>> implementations, and tests should be added.  I'll try to get to it soon.
>
> If it is going in 2.2 (or 3.0) it would be nice if the ports could be
> suspendable.  put-bytevector (used by write!) is suspendable;
> get-bytevector-some (used by read!) is not.

Unless I'm mistaken, nothing done within custom ports is suspendable,
regardless of which I/O primitives are used, because the custom port
implementations themselves are all written in C.  The custom port
handlers such as 'read!' and 'write!' are always invoked from C code.
Caleb Ristvedt recently ran into this problem and posted about it on
guile-user:

  https://lists.gnu.org/archive/html/guile-user/2019-03/msg00032.html

I responded here:

  https://lists.gnu.org/archive/html/guile-user/2019-04/msg00000.html

I'm not sure off-hand what would be required to re-implement custom
ports in suspendable Scheme code.  Andy Wingo would be a good person to
ask, since he implemented (ice-9 suspendable-ports).

       Mark



  reply	other threads:[~2019-04-09 18:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 18:28 Unexpectedly low read/write performance of open-pipe Rob Browning
2019-04-07 18:45 ` Rob Browning
2019-04-07 19:47   ` Rob Browning
2019-04-07 21:28     ` Rob Browning
2019-04-08 10:52       ` Mark H Weaver
2019-04-09  6:56         ` Rob Browning
2019-04-09  8:35           ` Mark H Weaver
2019-04-09  9:21             ` Chris Vine
2019-04-09 18:24               ` Mark H Weaver [this message]
2019-04-09 21:36                 ` Chris Vine
2019-04-10  0:07                 ` Mark H Weaver
2019-04-16 21:42                   ` Mark H Weaver
2019-04-09 18:33               ` Mark H Weaver
2019-04-17  4:02           ` Mark H Weaver
2019-04-21 16:22             ` Rob Browning
2019-04-22 18:39               ` Arne Babenhauserheide
2019-04-23  7:32 ` tomas

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=87lg0jrq8r.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=vine35792468@gmail.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).