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: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 09:47:54 +0100 Message-ID: References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <86ed1rswup.fsf@gnu.org> <87h66loc17.fsf@gmail.com> <878qrxoayj.fsf@gmail.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="39989"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , spd@toadstyle.org, pipcet@protonmail.com, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 09:48:51 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 1tSBSF-000AJ1-0U for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 09:48:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSBRV-0004OV-AK; Mon, 30 Dec 2024 03:48:05 -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 1tSBRS-0004Ny-7U for emacs-devel@gnu.org; Mon, 30 Dec 2024 03:48:02 -0500 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSBRO-0004qt-4X; Mon, 30 Dec 2024 03:48:00 -0500 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5d3f28881d6so12741286a12.1; Mon, 30 Dec 2024 00:47:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735548476; x=1736153276; 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=WCGQfbHq1CzmEYEGtWzquHCVtMNNVgkRRMWhO7q7LDw=; b=VHVVpeOlv8IkGPWuQu6IpSI/Dy0hwQe6ClQ3Q0XbUkXsy7lbKDCymNcHZP+uc7oFul FRXIPoDnRP6KiuTlk3ZmQqNaReM3cKeDu9iBDax93t3xb1hl+NLds+xu2ZDQ4loaW64g kc6fMIw3rKFsetlbZBTcJ1AzKpfXdBXhA45LbxhUOGEXgiCchjYKSIkms4W+YljXvhhj nQAbalww2IMW/xU1MsN/f0SpzRUKE48LKsi3hnZj3QssrersPKjRyhOiw/T1CpECMRS0 F+uwrTfnCfG/ACHfG/sA9FymXdIzLYVNOx9QhnZrh1YbRp0w/zQOv58TY7m7HkRx/LjJ kLKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735548476; x=1736153276; 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=WCGQfbHq1CzmEYEGtWzquHCVtMNNVgkRRMWhO7q7LDw=; b=Oznoh6YNapDHGNDGXjgVuafM80ppeZo2xZtU7ayFPN4YvIJZsSqq1OgQVbluJ89E1Q m2GQUyeUVphm+oJ8MdJNj04XoN9z/42KkAy7VjtfZ6WJDOJyM1l0MBFLKPnkuYCJLFL5 uMAZQLUQ6To6vgCpB3E5CGP1AsqLoxhIK5Onre45apk24jMzc9P6GJYh4WfAjuu5Gt99 z9xP0v19mJ3FntlJuYxfMv7n+IJBh0gQV/AHURLcWBj2sF5V9oeUIq+YdRU3e7e34emg U09YzdJFzu+zbga4J2HB6+ybMKTPdAFGT6hxkgzo3ksw/INbJcu+axIe8CJvq+Q3M+CQ R+CA== X-Forwarded-Encrypted: i=1; AJvYcCV6grd/AaUTERSx54wF0p+ofW+a2rkH3Kpr6cYNY4uDff3LDEfyS8SstPMNqclvFmYuj4u6o6a17eL/bQ==@gnu.org X-Gm-Message-State: AOJu0Yzuep1d0pHKBA72VYLns0WZhqmIqGA4xzg0YHC1gmov46cCNi80 MjVTdUqtkBbSZTpf4FtOaX0H5+Oiac1beS0Ap6pRRVpm+sol5EPesam13g== X-Gm-Gg: ASbGnctuAgMghl8m///Brt45HlutVXjMj2Lv/j9fUqvUs7Oz5VjoGHNEk0gfAGIn+da 70TpNbZS9IQTRKVb1ywqLvZQFzvB2U6gT5iVf5r+wgKevebVsF/QmiyDL6YmfMs0cUL0sJwai+x XYjaFdKWfzSjGd3elTUOniKcUVSU9x5QN4ydnNJzZzgMX/6S8wApTwyvgN2rovyeWUQ+dqm2E+n aFQI6sinuaSgwVMb++P+nfWraw3iyptpHmA9N4VAY5lTu592gO10Ug2nQkFfjyV/A9SG85qV+dn em3njojzmrnkylaDE7XL7k19qfYgQsx/Vjt+kM5uudvZhTIKpnRmC2DKywIk04os X-Google-Smtp-Source: AGHT+IET+bpEaN64YIOMl1jJrEt7952eQitXCKKtDE73I11CdK7Yke7is8sMet53Zz7tjBuaLTGqBw== X-Received: by 2002:a05:6402:2550:b0:5d4:2ef7:1c with SMTP id 4fb4d7f45d1cf-5d81de06532mr84827460a12.24.1735548475947; Mon, 30 Dec 2024 00:47:55 -0800 (PST) Original-Received: from pro2 (p200300e0b7156f000dceccb84ca1ba38.dip0.t-ipconnect.de. [2003:e0:b715:6f00:dce:ccb8:4ca1:ba38]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f5ffsm1432237466b.12.2024.12.30.00.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 00:47:55 -0800 (PST) In-Reply-To: <878qrxoayj.fsf@gmail.com> (Helmut Eller's message of "Mon, 30 Dec 2024 09:02:12 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x532.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:327395 Archived-At: Helmut Eller writes: > On Mon, Dec 30 2024, Gerd M=C3=B6llmann wrote: > >> I'm afraid Modifying MPS is not my thing, But What about using something >> more modern like Oilpan (aka cppgc) from V8? Can be used as a lib, is >> concurrent for real. > > Ideally, Emacs would have an abstract GC interface so that different > implementations could be plugged in. That would indeed be nice to have. >> That would also be a perfect time to lift Emacs to >> C++. > > I'd rather see Emacs move to Rust. Anyway, neither option seems > realistic. In mainline... (pondering to put a smiley). But something else: Given what I now believe, I think I want to understand better (a bit) why everything appears to work just fine on macOS, with signals. Could you perhaps check if I'm off? MacOS only. In normal operation, there are only ever 2 threads running. An Emacs thread is interrupted by a signal and lands in a signal handler, the MPS port thread keeps running. In the signal handler, hitting barriers is handled by the MPS port thread. Consistency of Emacs's state is a problem the signal handler has to deal with, consistency of MPS' GC data is a problem that hopefully MPS handles, and it seems to work. I think I understand that, except when the Emacs thread is interrupted while in MPS code, which happens for allocation points running out of memory and mps_arena_step (idle time). Do you agree so far? If yes, I'd bite the bullet and look at the MPS code for macOS how that is done, if it's done.