From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.devel Subject: Re: Unexpectedly low read/write performance of open-pipe Date: Tue, 9 Apr 2019 22:36:53 +0100 Message-ID: <20190409223653.408feefa28306e470ce43adb@gmail.com> References: <87d0lxmzyv.fsf@trouble.defaultvalue.org> <878swlmz6q.fsf@trouble.defaultvalue.org> <874l79mwbw.fsf@trouble.defaultvalue.org> <87zhp1ld31.fsf@trouble.defaultvalue.org> <87sgus6a65.fsf@netris.org> <87k1g3ll96.fsf@trouble.defaultvalue.org> <87k1g3y3re.fsf@netris.org> <20190409102140.f4d9d1e7c6457c23eea29964@gmail.com> <87lg0jrq8r.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="178620"; mail-complaints-to="usenet@blaine.gmane.org" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Apr 09 23:37:21 2019 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDyQj-000kKn-GF for guile-devel@m.gmane.org; Tue, 09 Apr 2019 23:37:21 +0200 Original-Received: from localhost ([127.0.0.1]:49393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDyQi-0006fT-AO for guile-devel@m.gmane.org; Tue, 09 Apr 2019 17:37:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDyQS-0006fG-Os for guile-devel@gnu.org; Tue, 09 Apr 2019 17:37:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDyQQ-0001jm-Ma for guile-devel@gnu.org; Tue, 09 Apr 2019 17:37:04 -0400 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:34248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hDyQN-0001gZ-4i for guile-devel@gnu.org; Tue, 09 Apr 2019 17:37:00 -0400 Original-Received: by mail-wr1-x42d.google.com with SMTP id p10so443301wrq.1 for ; Tue, 09 Apr 2019 14:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Gs1zx2dKVFwdr2SShwjHGyUtX0TaodZoKwaGRxs0XPo=; b=AjuCkgPUrqb+B82cDOz5zS6kwZjIXjXnL01w4RerHuL3FbhoGseinPAf58JWLnt/lv hNo1tV6dwDnAnnDBUhgcwn+62YRQHToHuq3fk4I6VYU+HOOFKkzvNqbr/q1QpddbD6HD a6ViRd8Mmme6rBy/6cVO2xbukEuT+6DiLtO0rGbdsGvv76qbbe418LKpUG3noxs1GVFp kp+7E24AqymP4ktuqC3ULcZIRngarGtuYFhdRIZlVY3pzK037jlsgHRiCsQNEhuchIuI BNiE/uS/+JeAMSayJ0dn4yyB064i4j9rkJWS+dVeVqADp7mVzPAFTrkx7x768cS0o+XS 2aOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gs1zx2dKVFwdr2SShwjHGyUtX0TaodZoKwaGRxs0XPo=; b=GeXEJ38WtjZR9YLYN1zow7GgbVnLD8YrMN6HaXvCGEvP7pl+bVWarEqtAJVTqe2lIJ SnlTmzdWmFIT3RlTGGJDgf2GnanLfpnphz01x9b7A0uVkHDgUj/WboZVpd15z3RvwbTR YuwYXgdnp2u6a7vie99Tu7k4KJhLlQQDYRGbYTtloqKzSVttSXe0J2NryPt+NWRRrX39 HASyf3TWBCvr533ny/j/vSFhyx7DjrDJrgrTre7c66iqBB6qhglWjyMCg7nusAH+Mvng YAB4Mz9yPKV9HCIcTsf8Fp84hiL8ul8Ss1EXAuUrTu93GxDH5V1ACozslQ6ar2ZHJnIR 2m4A== X-Gm-Message-State: APjAAAW4uDzPOLIialF10lubHyqKNaccp1a1uD+OYzTp5Ot6urfQrgBn UDepOkn4FUP9+Uk88wabQIbdPKb7 X-Google-Smtp-Source: APXvYqw7Vqg1iIXe+iHoRvD8SXsYj7on0tqWDoaThcwjYw/1BIJZ2dPFlY+Jb8qMEmg6OwpU6BP6Sg== X-Received: by 2002:adf:8bc5:: with SMTP id w5mr22994172wra.226.1554845816527; Tue, 09 Apr 2019 14:36:56 -0700 (PDT) Original-Received: from bother.homenet ([91.110.243.32]) by smtp.gmail.com with ESMTPSA id 4sm220312wmg.12.2019.04.09.14.36.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 14:36:55 -0700 (PDT) Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with SMTP id 0FF0B265CEC for ; Tue, 9 Apr 2019 22:36:54 +0100 (BST) In-Reply-To: <87lg0jrq8r.fsf@netris.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19885 Archived-At: On Tue, 09 Apr 2019 14:24:09 -0400 Mark H Weaver wrote: > Hi Chris, > Chris Vine writes: > > On Tue, 09 Apr 2019 04:35:38 -0400 > > Mark H Weaver 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). You are probably right about custom ports' implementations. I encountered a similar problem with guile-gnutls ports. (In the case of guile-gnutls, because TLS connections are one of the areas where you would expect suspendable i/o to be useful, that is a shame.) Chris