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: MPS: weak hash tables Date: Sat, 06 Jul 2024 06:29:05 +0000 Message-ID: References: <878qyf4sgm.fsf@gmail.com> <4JQ7mGAwBrGOLmq0SzqnMOSkzoEFxTOfGHxGzJ8fa48FMVlfasV4QTPgE3E8yidy4XXamrIt3gg9Lv_TSJkOO5IIz4VDmygEtBAEsvhIusM=@protonmail.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="6213"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Helmut Eller , Eli Zaretskii , Emacs Devel To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 06 08:49:26 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 1sPzEb-0001Mx-RY for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Jul 2024 08:49:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPzEC-0002ZS-AC; Sat, 06 Jul 2024 02:49:00 -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 1sPyv3-0003dS-Lg for emacs-devel@gnu.org; Sat, 06 Jul 2024 02:29:13 -0400 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPyv1-0004xw-F9 for emacs-devel@gnu.org; Sat, 06 Jul 2024 02:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720247348; x=1720506548; bh=AzjF8zyxJOy04iy+AYVoT2LFXEzbCRS3SZ9AM3Z/KXo=; 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=npOrsHK08a6t11jl323S3ZpgXg4U23Iggguk28/4jHBtstvMBL4jxHRg11WILwmpd aDlPs59hAEYsuNoPJZwVgN4srPxyy4oewvEbDncPsZUbAItPpFu1akfrGhA1yCI1En NRVTJXCUYI9wOwSiuzvinqkL66Yvx8HrTdPdTdVj8nGqpXdOGYK2a0Hr5MAYGN4LUJ jsY8qWJrwE5OsAcfe+YwiM9P3rtbzD/lEFreMGegWTecr31u4DfcDUfP+hz9JLYLrN 1j7aFFzn3dQPlbWlfDSBmi4ia+hY6PZJ0PEvgYkTuYAnnKzCpbUcdlvAquydzxxbbM vo4EWXRRJUMCg== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 4e90bdc8cb2bde19c919236d2a47aba5553feea8 Received-SPF: pass client-ip=185.70.40.131; envelope-from=pipcet@protonmail.com; helo=mail-40131.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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 06 Jul 2024 02:48:57 -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:321410 Archived-At: On Saturday, July 6th, 2024 at 06:20, Gerd M=C3=B6llmann wrote: > Pip Cet pipcet@protonmail.com writes: >=20 > > On Saturday, July 6th, 2024 at 03:39, Gerd M=C3=B6llmann gerd.moellmann= @gmail.com wrote: > >=20 > > > Pip Cet pipcet@protonmail.com writes: > > >=20 > > > > What I'm doing right now is alternating usleep(10000) and > > > > igc_collect() in a secondary thread. That crashes somewhat > > > > reproducibly in interactive sessions. > > >=20 > > > Could you please make that available in some form? > >=20 > > Sure. I was thinking about cleaning it up (usleep is non-standard) and > > committing it behind a stress-test option, actually. >=20 > Thanks! If it's not too bad performance-wise, I was thinking of running > it in the Emacs I'm normally using, in parallel to the rest. It is very bad since full GCs stop the main thread. However, running it onc= e a second is enough to find some bugs and GCs are fairly fast... (One thing I've noticed is that MPS handles failed scans gracefully; we mig= ht be able to get away with "interrupting" a scan if inputs or signals are = pending, but correctness first...) > > Right now it's dying because specpdl is a union type and GC might hit > > while the main thread leaves it in a partially-initialized state. I > > vaguely recall turning it into a struct for that reason on another > > branch years ago... >=20 > Shit. That could mean that we have to scan specpdl amiguously. I was hoping to avoid that. Maybe it's enough to just clear the pdl entries= in between modifications, since the values we put in should be on the stac= k or in registers and be pinned. Pip