From: Pip Cet <pipcet@protonmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: "Gerd Möllmann" <gerd.moellmann@gmail.com>,
emacs-devel@gnu.org, "Jonathon McKitrick" <jcm@SDF.ORG>
Subject: Re: Helping with MPS
Date: Wed, 21 Aug 2024 08:02:34 +0000 [thread overview]
Message-ID: <87o75m9ucq.fsf@protonmail.com> (raw)
In-Reply-To: <87frqy5quh.fsf@gmail.com>
"Helmut Eller" <eller.helmut@gmail.com> writes:
> On Tue, Aug 20 2024, Pip Cet wrote:
>
>> My current workaround is to have a flag for each signal, plus a global
>> flag, and set them when the signal arrives at an inopportune time. We
>> check them when we know we just left MPS code, and that part usually
>> works, but sometimes we miss the exit, and then we have to wait until
>> the next 'maybe_quit' to handle the signal, and that strikes me as
>> potentially too long a delay.
>>
>> So, if you're using GNU/Linux machines, you might run into crashes we
>> already know about. I can provide a temporary fix, but it doesn't feel
>> quite good enough for scratch/igc yet.
>>
>> Any comments or advice would be welcome, of course.
>
> What would you think about creating fork of MPS (on GitHub)
> that includes:
I'm not a huge fan of GitHub, to be honest. There's already
https://codeberg.org/pipcet/mps, so maybe we can use that and mirror to
a GitHub repo if that's desirable?
> a) fixes for known problems:
> https://github.com/Ravenbrook/mps/issues/285
> https://github.com/Ravenbrook/mps/pull/257
> https://github.com/Ravenbrook/mps/pull/38
> https://github.com/Ravenbrook/mps/pull/83
I'll have to look through these.
> b) removes the instruction emulation on protection faults in the AWL
> pool. For us, this adds a lot of complexity with questionable gains:
I don't think it's questionable at all: There is no advantage for us.
> The weak hash tables implementation is, well, complicated and for the
> marker-vector it's ineffective because there we use tagged pointers
> (apparently without problems).
Hmm. I suspect the reason we're not seeing any problems is that few
people test on i386, and that only certain instructions are emulated: in
particular, there has to be a nonzero offset in a load instruction for
it to be emulated. Using a tagged pointer in a weak object with the
single access emulation is definitely not okay...
> c) blocks signals. Not my preferred solution, but some people seem to
> think that that is the emacsy way to do things.
I'm not sure whether we should block signals or add "this thread is
trying to lock the arena"/"this thread is unlocking the arena"
callbacks, but that's an implementation detail. It does feel like I've
been trying to hammer in a screw here :-)
d) adds support for Windows/GCC builds.
I think this is the right way forward (so you've convinced me; I've
previously expressed the opposite opinion), for these reasons:
1. it's the only sensible way of supporting i386, because the single
access restrictions are too much of a problem, and virtually untestable
because they trigger so rarely
2. it supports Windows/GCC configurations
3. I don't see a way to avoid delaying signal handlers until the next
maybe_quit(), at least some of the time, without it.
Pip
next prev parent reply other threads:[~2024-08-21 8:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 15:37 Helping with MPS Jonathon McKitrick via Emacs development discussions.
2024-08-20 15:52 ` Pip Cet
2024-08-20 20:41 ` Jonathon McKitrick via Emacs development discussions.
2024-08-20 20:44 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 6:31 ` Helmut Eller
2024-08-21 6:56 ` Gerd Möllmann
2024-08-21 8:02 ` Pip Cet [this message]
2024-08-21 9:23 ` Helmut Eller
2024-08-21 13:53 ` Eli Zaretskii
2024-08-21 14:36 ` Helmut Eller
2024-08-21 14:44 ` Eli Zaretskii
2024-08-21 15:10 ` Helmut Eller
2024-08-21 15:34 ` Eli Zaretskii
2024-08-21 17:44 ` Helmut Eller
2024-08-21 18:06 ` Eli Zaretskii
2024-08-20 16:05 ` Helmut Eller
2024-08-20 21:42 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 3:46 ` Gerd Möllmann
2024-08-21 5:59 ` Helmut Eller
2024-08-21 6:28 ` Arash Esbati
2024-08-21 6:54 ` Gerd Möllmann
2024-08-21 14:10 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 14:48 ` Gerd Möllmann
2024-08-21 15:08 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 15:40 ` Gerd Möllmann
2024-08-21 15:46 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 16:23 ` Gerd Möllmann
2024-08-21 18:00 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 18:04 ` Gerd Möllmann
2024-08-21 18:20 ` Jonathon McKitrick via Emacs development discussions.
2024-08-21 18:43 ` Gerd Möllmann
2024-08-21 20:42 ` Jonathon McKitrick via Emacs development discussions.
2024-08-22 4:02 ` Gerd Möllmann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o75m9ucq.fsf@protonmail.com \
--to=pipcet@protonmail.com \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=jcm@SDF.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.