From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: Helping with MPS Date: Wed, 21 Aug 2024 08:02:34 +0000 Message-ID: <87o75m9ucq.fsf@protonmail.com> References: <877ccbb3a9.fsf@protonmail.com> <87frqy5quh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15373"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , emacs-devel@gnu.org, Jonathon McKitrick To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 21 13:40:20 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sgjhM-0003q9-JB for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Aug 2024 13:40:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgjgP-0007nq-Pu; Wed, 21 Aug 2024 07:39:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sggIm-0000yf-MK for emacs-devel@gnu.org; Wed, 21 Aug 2024 04:02:44 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sggIk-0000bb-Lz for emacs-devel@gnu.org; Wed, 21 Aug 2024 04:02:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724227359; x=1724486559; bh=yns4uh/pcH8PnRa/OmE5eNhG1CWQ1HDl8njiegWQFSg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TJNQtnb1QKWNC6odlT1LzCSSnTW4QbX1PCEOYnTtlf+YEdgfSonJZlwyFqGQBsZv1 tvuPFncP59Y6OMPeJBzoQb2Wq+8QIVd6Xa72r/HMfCtdQIVU3xUcs1W7PXa/63L6ec haX/Wkb3qpmkyAPs71BdYVMNSaqf8UW6zvqUTQnV7oYXEMqaw4QjoSnqPV2sNqkiXX JomrrmbWeS2+BP+hfBDqYCXLOIC4vf4754z0BsEXRvH+QDVMTNNUWXpi76mT14gbL3 HUXa4LVbtaukv787f4R8GOiuAz52oindRIyRsrUdQka0hd09g+40odFZGHWPcArfs3 h2u9APIBY2FOA== In-Reply-To: <87frqy5quh.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: ed6ce0355c9de1066a3f494948d9b07700161f87 Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 21 Aug 2024 07:39:16 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323000 Archived-At: "Helmut Eller" 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