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: Some experience with the igc branch Date: Thu, 26 Dec 2024 06:29:19 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <86o7112rnq.fsf@gnu.org> <867c7p2nz4.fsf@gnu.org> <861pxx2lh7.fsf@gnu.org> <86ldw40xbo.fsf@gnu.org> <87cyhf8xw5.fsf@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="18299"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 26 06:29: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 1tQgRP-0004c0-03 for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Dec 2024 06:29:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQgR6-0001eJ-Em; Thu, 26 Dec 2024 00:29:28 -0500 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 1tQgR4-0001e1-P4 for emacs-devel@gnu.org; Thu, 26 Dec 2024 00:29:26 -0500 Original-Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQgR3-0008GY-4m; Thu, 26 Dec 2024 00:29:26 -0500 Original-Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9e44654ae3so1003369666b.1; Wed, 25 Dec 2024 21:29:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735190962; x=1735795762; 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=tPvtFCYGjyCnCMrC7HNO/Wex9FUV6HC1G7WvZE9ptPs=; b=Kc+OpQgJRZLD0rsNVMsCnIORzihu7Vrfg4eO7tjQYYOK1rwSVlRx8kGqCRlyPLwx9f qO7Qn/60kGfPTaIDBLUdtpIuyHxSZKG1AAfWXZ1eP8Uh0jg2KdAXhpv0KxgQBSxGsHAk rL1zWSTSfWu2GqS68mtOVITzFHF+8E7B1hdjQY4XXN4689aJXZUmXgBAjJb3UB49LwlF RKzvOJUn5PFGMmhRUNz/sOaq/esiFgFXmvfKbprTu1/LP7M3NCxC6oyUYVayzdEU056J ulQNUoxQWCwOxqycgqO0ahL4NvaoFWzIo0NCuK762L3yaL9IInBW49a6V2eBQzCXvEmm SRBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735190962; x=1735795762; 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=tPvtFCYGjyCnCMrC7HNO/Wex9FUV6HC1G7WvZE9ptPs=; b=UtPbHJfTnT4FwQoWszZMPkv4dWKJ3tkZUxIiqGFRYnec/OGtDNZSYFj7Qr+imzzrKu VbFuiHMHKuc4HslSl/q2uxlyJFOjGr0wB/psDCblBrlQmSa+Zrjj+OeAHhwh4plKEQg1 aWFnA17t99fb5IlMN7aT2TLfvKUeVi8raBrlgyzwpDTftVl9/JLKDUAY7s/pZeWVK6Vb zNyC7Oz97YEDZiXfpSiNEPX1zN1ipeBpGmK0HoK6dXW7iwdq5coDnU2GlZeVrOU04VX/ vVZeduM10mifRzwo5Xn1cjuQMPezwmagQsdhjaQtGBrQWS26blfltFZy+E8/obZTM63K Cjbw== X-Forwarded-Encrypted: i=1; AJvYcCUJIuyAp3kcsd8fxWhJ27j+gVpbExnNkcPWlHRhS0J09eBUK4Fdy6RM3Xp1qYoyAY9C7rXPY0rCKA==@gnu.org, AJvYcCVJTKsd8D3bekJhbHpQLFasz2UfHn2WSCCxB3yHLuFDQJcHzGlo5uweo3oXoqLobJ6D943dQo5FrFNAZSs=@gnu.org X-Gm-Message-State: AOJu0YyiXwAJm8qZqMSkIkeDOFrP3XtdTK85oD3tMzjbLtcrjjCQYxnH d6x7BUe/wlkgcLw67aJ6HvNo2D5nzhI9s4NPoTh8U6v1hgnDmKn2Yk7yUA== X-Gm-Gg: ASbGncskP+tWwX1ypSzyJv/xS25BOQraNKc+CJMEBxFjYDbk3f9Qpqh4vK0aDx9FeAk 419h/2lzG2TazP/e6Q2NF2nVm6+7HUETHRWVNLIVnibH9aBPYdxu4w+uQTGLSHb9yH0b/DoaD8y mSW2xurkpxgkCHaNuv096hLZ+GshISazc57rbYzXqbrdD4oRMkW+FpYI49c2zB08w39z2fplnM5 0MTTnqJsMnBYU9gZcMrWj3TPoqc+yGwQjSmNLEI/hwQh2QNL5kWMemKwfnDhFaxL7iRFGPuRRcY 931SOBcp/ZrstLFrn8lwxtZOZRFdO+9cRhOb2ZEKAJmvX9Iu3LsRfMXUAnu9WNsIWw== X-Google-Smtp-Source: AGHT+IHEeFs+lJ7HnCUNA2pAfypehRvnFEGyvg7zAQKRCgt7c8Tdvk++JeYuswIcC5lo2TXHmStfqw== X-Received: by 2002:a17:906:7943:b0:aa6:2cc5:56b7 with SMTP id a640c23a62f3a-aac2cf50655mr2159440866b.33.1735190962151; Wed, 25 Dec 2024 21:29:22 -0800 (PST) Original-Received: from pro2 (p200300e0b747910049c6927f9e8bb023.dip0.t-ipconnect.de. [2003:e0:b747:9100:49c6:927f:9e8b:b023]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0efe4bd4sm911595566b.120.2024.12.25.21.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Dec 2024 21:29:21 -0800 (PST) In-Reply-To: <87cyhf8xw5.fsf@protonmail.com> (Pip Cet's message of "Wed, 25 Dec 2024 17:40:42 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x635.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:327133 Archived-At: Pip Cet writes: > Gerd M=C3=B6llmann writes: >> DEFUN ("function-equal", Ffunction_equal, Sfunction_equal, 2, 2, 0, >> doc: /* Return non-nil if F1 and F2 come from the same source. >> Used to determine if different closures are just different instances of >> the same lambda expression, or are really unrelated function. */) >> (Lisp_Object f1, Lisp_Object f2) >> { >> bool res; >> if (EQ (f1, f2)) > > This EQ can also trip. Sorry to insist on that, but I think it's an > important point: if we change Lisp internals (such as the slow EQ > thing), the "we're not dereferencing it, just looking at the bit > representation of the pointer" approach will fail again, in unexpected > places. > > I haven't seen a technical argument against using separate stacks for > MPS and signals (I don't consider "it's a change and we'd need to test > it" to be any more true for this change than for any other proposed > change, or for what's in scratch/igc now). It would get us on par with > master. (Both versions need to add the best memory barrier we have to > the specpdl_ptr++ code) > > (I don't think MPS works on multi-threaded systems if word stores aren't > atomic. If thread A is in the middle of updating an mps_word > referencing another object, and thread B triggers a GC, thread A is > stopped and thread B might scan the segment in the inconsistent state.) > > Miraculously, everything can be made to work out in the WIDE_EMACS_INT > case, even though 64-bit words are stored in two insns: we only look at > the LSB 32-bit word when fixing (because we USE_LSB_TAG), so that'll > just work. Late exthdr creation needed to be changed a little, and now > assumes changing a 64-bit value to another 64-bit value which differs > only in one 32-bit half is atomic. > > Here's a snapshot of the current code. It still assumes strong memory > ordering between threads because I'm pretty sure MPS needs that, too, so > it's just asm volatile ("" ::: "memory") for now. Thanks.