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: Area scanners Date: Mon, 06 May 2024 20:46:20 +0200 Message-ID: References: <86fruubxy3.fsf@gnu.org> 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="7670"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 06 20:47: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 1s43NL-0001gj-JZ for ged-emacs-devel@m.gmane-mx.org; Mon, 06 May 2024 20:47:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s43Mc-0007m9-JU; Mon, 06 May 2024 14:47:02 -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 1s43M4-0007kO-4G for emacs-devel@gnu.org; Mon, 06 May 2024 14:46:28 -0400 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 1s43M0-0006qb-OU; Mon, 06 May 2024 14:46:26 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-572babec735so6138175a12.0; Mon, 06 May 2024 11:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715021182; x=1715625982; 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=nr+ZkaANz/gbmxEensLGQsz1EUhklegwezaxToEAc1w=; b=DpQP8621Bi+wUGhutAaihnzU2ewg0x+WBOuUADPuABSnaEcK3hZIP3gtpgmezor4fU miBcXPZFVJAc4aySE/YR22W2ChpY2/ldY4Z1/ZjLNINM1PA+ckXnZk3nSJddDLN8flnI C6yxTGCnp796tvXGJgy7CXFi0IuUsr9ganfzsqkK7JsnehgpDGV+sLFkK/2rPFfc4jAh keYmIbjTQs8mfJ8c/3+aFr2sctawY0gjj6OWcejKwERMj81EkzhHb3x5/3rph+y6bhM5 CamxaJFCJYnZEI+uo/yXgENcjhztaOmL/aanMI0c2zJd0fgA4X6fF6WXXiMqGqMV8gYQ ucYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715021182; x=1715625982; 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=nr+ZkaANz/gbmxEensLGQsz1EUhklegwezaxToEAc1w=; b=jhgQDeUYlGgQskwC6uwzB9BxBkKc9qBQVCPy0/kE6T3/9TjaH/OG5PKvpXXIgMNW/o 0pdLGMVaV6pLnrtNiJuzUsV+CZC5gQcFmDIWxZ/Qh5a8CHWFHF4rrZINdGDYLKHN7yYy xNop/OJp5KYfWtsvaHD/vZz4dWh/JvFrnt2j3rsjFdR3dxNFIGt2UarmkguwZMNpueHl ijXTPGtR8Gk7cQscesgIQoktedJxN5VC6Z7TiObnMMko60znmDNgSdiQbwpJLnVK7ts/ 82L8QmLjVoL83aA15s1B26OEmVNBm8D/WqFC+LOL5SV0hnWQuFF7NJSm1+JMTTzPRSj0 6ZgQ== X-Forwarded-Encrypted: i=1; AJvYcCWcYp7I2BDpI/vXlwjvf1Vz8NB1XmHQCnHoRv6laI+V9tD3yZKxTWFTEoMJ2MnYCntlmIOPw7NBBRpOKrbe0iokYKCz X-Gm-Message-State: AOJu0Yy0ekwGO0FoLE+l1C3VcL2CBTaxAGQFAfp82Uadc6pPHtOU9b8i rtGJHZKOUmxfDeS3goUyd131gikJKAkMQgXfJqfA7TksnHt6NSvgTwbvqQ== X-Google-Smtp-Source: AGHT+IEoEAI1EdgcZzJmbAy7Op2atcvL9m7fabutKxLcxlvnCnLpdvUjiaSeBTDEY6DYkK0ICEApbg== X-Received: by 2002:a17:906:4808:b0:a59:c7fd:c867 with SMTP id a640c23a62f3a-a59e4e862ddmr32884966b.36.1715021181991; Mon, 06 May 2024 11:46:21 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a55e.dip0.t-ipconnect.de. [79.227.165.94]) by smtp.gmail.com with ESMTPSA id f12-20020a1709062c4c00b00a599de9c255sm3977194ejh.75.2024.05.06.11.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 11:46:21 -0700 (PDT) In-Reply-To: <86fruubxy3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 May 2024 21:24:36 +0300") 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:318910 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Emacs Devel >> Date: Mon, 06 May 2024 19:12:08 +0200 >>=20 >> I remember now why I thought tht scan_bc would work they way I thought, >> so that I could compute a suitable scan end and so on. I read in the MPS >> docs this: >>=20 >> type mps_area_scan_t >>=20 >> Warning: Area scanning functions are subject to the same set of >> restrictions as format scanning functions, described under Cautions. >>=20 >> And Cautions links to a long list containing >>=20 >> 7.3. Cautions >>=20 >> The MPS guarantees that format methods have exclusive access to the >> object for the duration of the call. This guarantee may entail >> suspending arbitrary threads. The methods that manipulate the object >> must not perform any sort of inter-thread locking or communication. >>=20 >> etc. >>=20 >> Question is of course now, what is with the exclusive access for area >> scanning functions? Is that point a member of the "set of restrictions"? >>=20 >> I can't answer that ATM. Maybe someone else can? > > What are those scanning function you are talking about? are they all > those fix_SOMETHING functions that run off dflt_scan etc.?=20=20 The fix_xy functions are subroutines that can be used in scan functions. The scan functions are - dflt_scan, which MPS calls an object format scan function because we specified it in an MPS object format. The MPS object format contains a number of infos about our objects (see make_dflt_fmt in igc.c). - MPS root scanning functions, which are used to scan roots. and are specified when creating MPS roots. Examples scan_ambig, scan_bc, ... All the function named are in igc.c. > If so, these scan Lisp objects, do they?=20 Yes. Some objects we allocated from MPS are also not for Lisp. Doesn't matter. > And so, the above restrictions on inter-thread locking or > communication are relevant for those fix_SOMETHING functions?=20 Sure. > If so, why is inter-thread locking relevant? I don't see anything like > that in those fix_SOMETHING functions. Did I miss something? 100% certain is, and MPS says do that format scanning function are granted exclusice access to the area of memory being scanned. So dflt_scan and subroutines have that. In the thread about scan_bc the question came up if root scanning functions also have exclusive access to what they scan. I initially believed so 100%, forgot why and then doubted the 100%, read a bit and now believe again to 100%. It's a bit complicated :-).