From: tomas@tuxteam.de
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] On Hurd, don't use not implemented madvise()
Date: Sat, 3 Jun 2017 08:41:32 +0200 [thread overview]
Message-ID: <20170603064132.GB16585@tuxteam.de> (raw)
In-Reply-To: <87r2z1x231.fsf@netris.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Jun 02, 2017 at 10:00:18PM -0400, Mark H Weaver wrote:
> <tomas@tuxteam.de> writes:
[...]
> > This would at least suggest having a way to query whether madvise is
> > available, through some introspection (giving the program a chance
> > to adapt its behavior)?
>
> First of all, you should read this for background:
>
> https://wingolog.org/archives/2014/03/17/stack-overflow
Done.
> If you've done that, then you should understand that this new feature in
> guile-2.2 fundamentally changes the way we can express loops in Scheme
> that build recursive data structures where scalability is important.
[...]
Yes, I got that: in a nutshell, getting the stack auto-extended instead
of being blown out of existence by a segfault or similar.
> Consider how frequently patterns like this occur. Do you really want to
> duplicate every piece of code with a loop of this form? It would be
> better to just give up on this new feature entirely.
>
> Anyway, even if you did duplicate your code, that would not solve the
> problem, because many procedures in Guile itself are now written in the
> nicer way to take advantage of this. One such example is 'map'.
You are right, duplicating every piece of code doesn't seem to be
a Good Thing.
I rather proposed the introspection for those who want to come up
with whatever other ideas: it might be they'll want to warn the user
right off at the beginning ("uh, oh: no madvise: expect a rough ride",
so they can then segfault without guilt :)
> I'm quite fond of the Hurd design, and I hope it continues to grow, but
> it's unrealistic to expect developers to write loops like this in a
> fundamentally less clear way to cater to an experimental OS that has so
> few users.
>
> Does that make sense?
It does. As I said, I just proposed that, if Guile decides to use
madvise() dynamically (by "bypassing" ENOSYS -- that's IMO a good idea
anyway), it should give the user a possibility to check for that very
fact ("do we, actually, have an madvise()?"). WDYT?
Cheers
- -- tomás
>
> Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlkyWhwACgkQBcgs9XrR2kYkSACdE8BsW58sCblJWhv0PSQV7+wO
9vYAnjezj0Fr9jg0I7SJDsJBG2pQhLhK
=wSGI
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2017-06-03 6:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 9:26 [PATCH] On Hurd, don't use not implemented madvise() manolis837
2017-05-30 19:41 ` Mark H Weaver
2017-06-01 16:27 ` Manolis Ragkousis
2017-06-01 23:29 ` Mark H Weaver
2017-06-02 8:39 ` tomas
2017-06-03 2:00 ` Mark H Weaver
2017-06-03 6:41 ` tomas [this message]
2017-06-08 17:27 ` Efficiency of `map` (was: [PATCH] On Hurd, don't use not implemented madvise()) Stefan Monnier
2017-06-10 4:28 ` Efficiency of `map` Mark H Weaver
2017-06-10 4:38 ` Nala Ginrut
2017-06-11 5:27 ` Mark H Weaver
2017-07-02 18:57 ` [PATCH] On Hurd, silently ignore ENOSYS for madvise() manolis837
2017-07-02 18:57 ` manolis837
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=20170603064132.GB16585@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.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).