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: scratch/igc fe90d556834: Make glyphs ambiguous roots Date: Mon, 29 Jul 2024 12:19:08 +0200 Message-ID: References: <172218853212.17772.9043342656088870281@vcs2.savannah.gnu.org> <20240728174212.BDB66C41F13@vcs2.savannah.gnu.org> <87h6c8lnva.fsf@gmail.com> <87le1kk0zk.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="22335"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 29 12:20:11 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 1sYNUA-0005ch-Se for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jul 2024 12:20:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYNTI-0004sJ-G5; Mon, 29 Jul 2024 06:19:16 -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 1sYNTH-0004s3-LM for emacs-devel@gnu.org; Mon, 29 Jul 2024 06:19:15 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYNTF-0001Ih-Jt for emacs-devel@gnu.org; Mon, 29 Jul 2024 06:19:15 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a7a94478a4eso675265966b.1 for ; Mon, 29 Jul 2024 03:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722248351; x=1722853151; 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=SOltXirELy8s1v6KIkSIRIOgTS7fwEQ/7MyDbfqnQg0=; b=MhMDLzLI741BpJDak2GkuVqlrbYoNpWwe9KuXNvp/aO67vRuHufTu341peSll7KHJU H++3mEEi9vPJ9MfWmIhPY7J52EC9piQOqhCxEjkiYVwNHDDdZeY71Vx0KIWWDfSRuGdr W62LVmk29x9Hx7M+YSFIGyV2qJIvfnwAr3W3STyluIZ07n+LIA8RYren4x+e0yivBSBQ 2u40xL/qBePE4pUcMSMzguFEFu59dn8UI/FAReHlFFLwYOHGGRjueULjda811puLTeiU laMElak46ZiL87BxpvqgPIfY/SYQ761bC7TTJLNBOhAH8v4ScKS9ZWxtv0Evbr8XDIQc R8Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722248351; x=1722853151; 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=SOltXirELy8s1v6KIkSIRIOgTS7fwEQ/7MyDbfqnQg0=; b=ikLgwnMuYy2rOTEGwFW6gVOhdMozDWGeCLCKgr1X/qeKFn2+QcfNzqpJZ6Gr/+Wxcr HXANGS7YPKEn6C22DkFiaYcaTbxczO0ieHDLbft+eIIxONNJIwcH5upqzRvWEr6H3y91 b8Ybk+ZY7X2QuO+t//mKAyJRhrE3HzZAhgQdxBDh12DjwAgobH/lsDF++lNyiPrNmDmT hOHEvExoyJ1KKVBjABEsiugTzkVr8h9ioOLjgV1C7az7WmNnD5OVOicMcSNsg/DZzV1o 5QL8fWQIh9nDwjbd2wLlrkrpvX+95YVRIpJbabhX23okwdmLY3jjocW+gGRPZ2Xj8rf0 4MKA== X-Gm-Message-State: AOJu0YzBg+Pr/CR5NthcI90tjnxmjKngOXBEnXGktuRztvLKUaebsG64 n7RWjQxt7EbDwo2PGPitdU9a8Drv1GiSRm4xsyo2cNzDj4YnqmPjRyE9Hw== X-Google-Smtp-Source: AGHT+IFbMuwjoheAZV3Z049I44yhFPNyNnxTaPVDgqb0+CUeWLEywk1YKvGbCZSKsW+326vKBZ2npA== X-Received: by 2002:a17:907:7d92:b0:a77:cdae:6a59 with SMTP id a640c23a62f3a-a7d3fa09dd6mr765291166b.21.1722248351030; Mon, 29 Jul 2024 03:19:11 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a35e.dip0.t-ipconnect.de. [79.227.163.94]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab50cbfsm486245566b.47.2024.07.29.03.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 03:19:10 -0700 (PDT) In-Reply-To: <87le1kk0zk.fsf@gmail.com> (Helmut Eller's message of "Mon, 29 Jul 2024 11:21:03 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62b.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:322189 Archived-At: Helmut Eller writes: > On Mon, Jul 29 2024, Gerd M=C3=B6llmann wrote: > >>> While fix_frame runs, all other threads are suspended. >> >> I don't think that is guranteed. but please check. >> >> Frames are not roots, so fix_frame can only assume exclusive access to >> the frame struct itself. Other threads can work on glyph_rows, glyphs >> and so on while fix_frame runs. > > The doc > https://memory-pool-system.readthedocs.io/en/latest/topic/format.html#cau= tions > says: > > 1. 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. > ... > > 6. Subject to the above constraints, format methods can freely access: > a. memory inside the object or block that they have been asked to > look at; > b. MPS-managed memory in pools that do not protect their contents; > c. memory not managed by the MPS. > > While the doc doesn't guarantee that all other (registered) threads are > suspended, it's hard to imagine what else MPS could do to stop other > threads from messing up the object. (MPS must remove hardware barriers, > so that's not an option.) Good point, indeed. I've reverted that change. Thanks for checking! > >>> So why don't we have exclusive access? And why is it not a problem for >>> FRAME_FONT, FRAME_DISPLAY_INFO, etc? >> >> FRAME_X_DISPLAY_INFO has the same problem. It's just that I had the >> glyphs on my todo list. With frame->font I don't see a problem. Fonts >> are pvecs so we only have to fix the pointer to it, and fix_font should >> do the rest. > > There is no frame->font. Only a frame->output_data.ns->font. And > ns_output is not part of the frame struct. > >> BTW, unrelated. Do you observe problems in clear_face_cache? > > Nothing that I'm aware off. Too bad, then it might be another macOS thing :-(.