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: Sun, 07 Jul 2024 13:35:45 +0200 Message-ID: References: <878qyeffjh.fsf@localhost> <8734olzlws.fsf@gmail.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="17148"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Helmut Eller , Ihor Radchenko , Eli Zaretskii , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 07 13:36:47 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 1sQQCF-0004Fu-0W for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Jul 2024 13:36:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQQBQ-00063v-8j; Sun, 07 Jul 2024 07:35:56 -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 1sQQBM-00062W-OC for emacs-devel@gnu.org; Sun, 07 Jul 2024 07:35:52 -0400 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQQBL-0006C4-7h; Sun, 07 Jul 2024 07:35:52 -0400 Original-Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-58b447c5112so3261193a12.3; Sun, 07 Jul 2024 04:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720352147; x=1720956947; 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=vqIpYnJOZjKCzi3CC8OxJai+q1+AzGb+ruA1mCOQHDc=; b=f6hCcxFY1d244EjLiVT//XNJrtlpgp4eWnSltQRH3sa7urw3tUCE3ZEaaPwjR/0KCD uuXjZtVfjhzRXEvwviNHEwfINh6CRu7XmAz1wvwNPE04v7sT5t9BjuY2/7LJUSHndSKK ZQGYIegK/1mk7JjKA6ECCmcU2DAuiC+rkTtSSNvuHQd7i7xNIgxHopxh5KVbOKdrkhgd AVWyWoPAkzgvyc8AkWDr9jBRdQP6bnYr1nK8rvadZ4sZSluhM6FRxuISubGytKOWjnHB uqjOCeN55tUXJSG6TJiZuJOT/JoJPdZai6ixUDtEUxDVUeUAd1l26EsovB6jNlewpwHf UCvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720352147; x=1720956947; 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=vqIpYnJOZjKCzi3CC8OxJai+q1+AzGb+ruA1mCOQHDc=; b=cfIuBbcQU12jHhfDdbLYKSjKWyd6IVJSdh71usSGN2xug5jRY4FsGXwe/mRE9scgsu 9wRdniZAETRdF1WX8yNdNpgAH+1CTqdQL7e6fLeY0sDiIh78ziKQ++yG+sy+ADd2SVW8 1g0kMnnDE4PAAVEJd3TlUVhgrtLr79WjW7cE0Lok3Z5jdfw8h5zPHsPJIBK0cLVhUVIr zbELyOV1SXewnmQodO6NSI+DcCeXRIToPOg9nBDDaG8TF/IHU9/s81Z5qZz8RyhO7p6a b966y3l4IZ3zf8SXTtmrb9xxtPhDE5ATo2dLAlgFzJLbGznuUsghaYcirqLIYmu0eKo+ 4mKg== X-Forwarded-Encrypted: i=1; AJvYcCVXsboopOrCnC7BCM9Qo6ykP7AzaEway1a2Ppn0f+smk/r+Wo+NxV9coukw3gvr55XnB03ODkNl087pDA0jV/V6ekj6D7mpuPiniUJAVENVMcI= X-Gm-Message-State: AOJu0YzRGfacDseSnS73Wr355KoUbA1rmWHq6ODzDnh9Gyk/uNQarShM +zeGUkvCqmvYCsIsHfsyzZcST5oe+mAiTFGEWAlNH+9gMY5HwzY3SN9n+g== X-Google-Smtp-Source: AGHT+IFG4i8iyHgqbj3HsNMH7E1M8ti9n2cKAo8fCC2GS2pVr0x107RPYaa737O/SROiYB5ARG1WMA== X-Received: by 2002:a05:6402:1d56:b0:582:9fb8:11a1 with SMTP id 4fb4d7f45d1cf-58e5cc0ad33mr6014758a12.35.1720352147324; Sun, 07 Jul 2024 04:35:47 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a778.dip0.t-ipconnect.de. [79.227.167.120]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58f443f5cadsm3119390a12.65.2024.07.07.04.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jul 2024 04:35:46 -0700 (PDT) In-Reply-To: (Pip Cet's message of "Sun, 07 Jul 2024 10:57:09 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x536.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:321481 Archived-At: Pip Cet writes: >> The big >> difference to the non-MPS case is that struct interval is subject to GC >> at all, they are malloc'd without igc. I didn't see another way to >> handle their plist otherwise. Making them malloc'd roots would have >> meant too many roots for my taste. I have currently ca. 20.000 live >> intervals for example, after GC. > > Does there have to be a big difference at all, The only thing i can think of is what Helmut already suspected, namely barriers. OTOH, it's not really noticeable in other cases, at least here on macOS. In any case, I wouldn't expect anything remotely that big. After all, it's not like a barrier is hit, the client runs a bit, and the barrier goes up again. > or is it possible the test is broken on vanilla Emacs, and it just so > happens that GC happens at the right time and hides that bug? ERT is a dark chapter for me. Digged through it once for the debugger handling and giving the right backtraces in condition-case, and didn't like it :-). I'd say everything is possible. > The attached patch to Emacs master makes > > make -C test lisp/emacs-lisp/ert-tests > > run out of memory for me (again, on master, nothing special). I don't > think it should: all it does is modify the test that runs before. > > So is it possible this isn't all that MPS-specific? I have to admit I don't understand how that has the effect it has. Can you see where it gets stuck?