From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: dangling markers Date: Mon, 01 Jul 2024 06:22:03 +0200 Message-ID: References: <87v81u85hv.fsf@localhost> <7YYJyDLCuZhtkTAT_ry6S14y4KoAJtsV_2Ui8Dsy37afuN1zucoO6VPh6YAvKQCs-0OUP3-rTFogtJBLrv2wiZ9rq6lacV-p_M1qsSSgKOk=@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="18121"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , Eli Zaretskii , monnier@iro.umontreal.ca, emacs-devel@gnu.org, eller.helmut@gmail.com To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 01 06:27:37 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 1sO8dc-0004Uy-3Y for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Jul 2024 06:27:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sO8cr-00072z-Pb; Mon, 01 Jul 2024 00:26:51 -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 1sO8YL-0006bp-Mw for emacs-devel@gnu.org; Mon, 01 Jul 2024 00:22:09 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sO8YK-00037c-4K; Mon, 01 Jul 2024 00:22:09 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2ebed33cb65so26802341fa.2; Sun, 30 Jun 2024 21:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719807725; x=1720412525; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6+klJQc2T87dk2lIXVnnaDEu4TD3S8ntz693zwFj3jw=; b=WlUF+9LlNgcFsjPT3BHqYma6fCj295ckIpJyeoikHsKhTnKygjrYU2WyZsDjE2ICZ3 H0ZgyHPcyr35KiQTyYPA2Yco7udlIXo3h3+NwI8yTEd09c3d+oFocR6TTnjzNG5uC0Vw gN4ALmsbHAQcpGRhuAyC18FKQiPW9/1nylAKlYsuIBAJDjmqWILsmDuG0Nsv66JLO3HI Fh3fgNiLU0QapIkPgjtDxjH2+SuH5aXGYM+SQZ+Kaiujha+C4vvmClkyg4LGaygHXoRL QzUiivbZu9W/Cc3bZqTWxFE773sqBg86OrGa/hDPmlgNAJuLiSb8WdWfeRDfEqjPLY1s 0mYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719807725; x=1720412525; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6+klJQc2T87dk2lIXVnnaDEu4TD3S8ntz693zwFj3jw=; b=v1tKs5SgfI0B6VL+s3pV/L/V/+0k7GTrhzyeSFmmlR0W95qfPydF3Xnq0+UGGiTnNy ykfan1Agh2oqZ1XifUTvLWqDnVccfawsCRb2LNI2h5aZH64Iy62psPdYImAbPayo/iij pSi7Mv0MfL4RF5ubVgzN0E1eAdrmMZ/1SW220qLVIdu0uxiC6jszjdxp+Fc1eKdwx/C0 6NGuwxV2ZoNNBsG6JemwHceR4tE8oh2Owjb4Jc+i/TJsg+BvLNvnRZnUAb+5OCXFZHd8 6OL48+iK3csxTaR0aIXRwmLIqtEqRfhJl6sH+dHdUtYXC2xWtUIeuc6TMFj6VoPBOU/w p2Iw== X-Forwarded-Encrypted: i=1; AJvYcCVUZ1QK1ZyQBj8D390JP28PAvH2AXfKsPM4RaXkVrjd7xN4jit5oqVZhECM6sMSVm+RsK98yb286reGl1lCA+Mc31VWqrbI2UuN+QA70akwznE= X-Gm-Message-State: AOJu0YxmYIT35gUDFsVpBIinOJSHTLTmTzZtP++VekP6Qn6fUq5QIS6J hmGGEsjuPrnrJZkFjqddiUJs/TfxpyrWTvjvTEutVIw/8qr/UBhD X-Google-Smtp-Source: AGHT+IEKiA7QQxRxWCaAsVPnyVjOc/6jnTP3s6HxHUaq59hSXq4vyEf7/gb8NWIIlZRUWg26Rn/WGw== X-Received: by 2002:a05:651c:150c:b0:2ec:5364:c790 with SMTP id 38308e7fff4ca-2ee5e4b9a2bmr37061261fa.22.1719807724976; Sun, 30 Jun 2024 21:22:04 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a7fc.dip0.t-ipconnect.de. [79.227.167.252]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861315914csm3881687a12.21.2024.06.30.21.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jun 2024 21:22:04 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Sun, 30 Jun 2024 20:15:36 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=gerd.moellmann@gmail.com; helo=mail-lj1-x231.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:320996 Archived-At: Pip Cet writes: > On Sunday, June 30th, 2024 at 19:22, Gerd M=C3=B6llmann wrote: >> Thanks! What do youo think about making a patch containing only your >> weak hash tables, and leaving the BUF_MARKERS alone for now? > > I think that's the best way forward. Patch attached. Could you please send me something from git format-patch? That way I'd have commit message and your authorship would also be clear. Or even better, if you have the rights could you please commit to the branch? (The reason I'm pushing for Helmut is because he doesn't want commit rights. I'm not the gatekeeper or something of that branch.) > >> That way >> igc could support the existing uses of weak hash tables (I remember one >> in the CLOS department somehwere), and they would be somewhat tested. >> Don't remember if we have unit tests for them. > > It seems MPS isn't very eager about splatting weak references during > ordinary automatic GC, FWIW. What I'm observing with > > (while t > (dotimes (i 10000) > (puthash (cons 1 2) (cons 3 4) table)) > (message "%S" (hash-table-count table)) > (sit-for 0.1)) > > is that the hash table starts out at 0, grows quickly, resets to > count=3D0 once, then keeps growing and never splats any references after > that. It's quite possible this is a bug in my code, of course. Yes, it's not eagerly splatting. Don't know. Which reminds me that I wanted to look if the AWL pool maybe has some paramter that one could set, or something else influences that, like the mortality rate of the generation chain. Or something completely different.