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: weak hash tables Date: Tue, 02 Jul 2024 06:19:20 +0200 Message-ID: References: <2syUQ04IbTWqDJjMfKSrtzWMWmFGq1GIOwSxv_r6BEyNDtk7ADADKjZk-90g9tSS9SKWppkiq6_zihUtsoE1spiopaOI6-v9inQrGxwMyCs=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35740"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Helmut Eller , Emacs Devel To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 02 06:20:07 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 1sOUzt-0008qm-JE for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jul 2024 06:20:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOUzI-0005xe-8C; Tue, 02 Jul 2024 00:19:28 -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 1sOUzG-0005xA-GM for emacs-devel@gnu.org; Tue, 02 Jul 2024 00:19:26 -0400 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOUzE-0005bx-Tm; Tue, 02 Jul 2024 00:19:26 -0400 Original-Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-585e774fd3dso1365109a12.0; Mon, 01 Jul 2024 21:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719893962; x=1720498762; darn=gnu.org; h=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=idON/mofg487CupsXgn5SdnzbB7akDf0v4qaZKyDV7c=; b=coVwJ+UwlSULMYwYq7mOMFZU4b/OvcqQfL/d0OxbPNq4ieUV4nAmXmMfK7voa0SQom UTZWmzCZh5s+NK+o4VHLyZmSVL7FJ+Z3c4AthCOg4iFHfs/Zt01xRUCWlP5UHArnP2Gc QxtHxoNOZ8t3WiGSsiXuVaF0xUWJMKtP8vT67uw2OMeSp6qDvCLd6jQji5lpvRF5AdQ7 UgGfz8vdhDIb/B4qoAxnLFqHV1tv0Fobfj4FTPNdAkXgCAkLodUgAoVahIjQr4EPwDbx AdMtNs0p/A/K9lTF1tnjcM5KkdPJcg25zYV8JmZys4WSOz0oCLhhxBOUTJRLCIJl2u6Y gNug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719893962; x=1720498762; h=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=idON/mofg487CupsXgn5SdnzbB7akDf0v4qaZKyDV7c=; b=rG8JVaaQgwJFWf/Y1rJ48xjLUGmERM+afV34rocP1KBckf15OdCE+E9eRuEC2JkB+3 RfKd90oS5tXalV9jv1xzU/rSUbINg1PQlW9PM6xvYM8GsL+e3LBLgNkcVFeBgNEPwE6l 2ns8gPBJazEkBB4RRJq+DorFghnyq2aGfd29hUwQCeZWRUUObF7cR0Dn/KJTJ2pgAkI7 j4ZvADCL4SAxSRAWntcHK/JJUXVr164u9pm20jFul/EBwB92e8xtlY8+wqolzVPwPq+c 2kGmaRyY2emu08LMJEhn8UtpK4fBtd75hhwgI96Z9wQ0TVKZXoDVdUhJr/uTv5JiYyf4 e3Eg== X-Forwarded-Encrypted: i=1; AJvYcCU07J0f46vbCob5wBFgAyHwPPtMZzKYN/BAgWM3nDab5mZw1dHOQ8PvOGZ4sK8y4uQvSXwi8LfMiHwNMuV8FqFE543G X-Gm-Message-State: AOJu0YxBkeC/EiCSfrOQRhySFuHHOllFhxKJzE4LDDVBObyZzUaRZYFT iPyolqQrRjJa81Kk5Oa9zUbqhqoUn9H1cQniBx7dLISPKfKLFvbSRu3nlg== X-Google-Smtp-Source: AGHT+IHKXIkeXMvG9BehAtx3TEgvWbdz2UZzWxjOEsNoF25YMMbG82ODfVZt08zM/kWIBR8SolViZA== X-Received: by 2002:a05:6402:278d:b0:57d:692:92d9 with SMTP id 4fb4d7f45d1cf-5879ece923cmr5785494a12.4.1719893962225; Mon, 01 Jul 2024 21:19:22 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36129.dip0.t-ipconnect.de. [217.227.97.41]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58614d50e1asm5164132a12.78.2024.07.01.21.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 21:19:21 -0700 (PDT) In-Reply-To: <2syUQ04IbTWqDJjMfKSrtzWMWmFGq1GIOwSxv_r6BEyNDtk7ADADKjZk-90g9tSS9SKWppkiq6_zihUtsoE1spiopaOI6-v9inQrGxwMyCs=@protonmail.com> (Pip Cet's message of "Mon, 01 Jul 2024 23:10:01 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x52c.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:321092 Archived-At: Pip Cet writes: > Is it correct that all IGC objects need to be scannable when they're > still zeroed-out from allocation? I'm not 100% cure what you mean. One must arrange things so that the objects are always scannable, that is so, from the moment on their memory is commited with mps_commit. > (I'm currently trying to simply delay setting the weak->strong and > strong->weak pointers until the parts are initialized, and to turn the > scan into a nop if they aren't. I'm not convinced that's sufficient to > prevent the compiler from reordering the initialization so an invalid > state becomes visible to the scan function, though...) Hm, don't know. I didn't get that far when reading the code yesterday. > Also, any opinions on :weakness 'key-or-value? Can we just not support > it and use strong hash tables instead? I'll try to come up with opinions today :-)