all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: scratch/igc fe90d556834: Make glyphs ambiguous roots
Date: Mon, 29 Jul 2024 11:21:03 +0200	[thread overview]
Message-ID: <87le1kk0zk.fsf@gmail.com> (raw)
In-Reply-To: <m2frrszmsc.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Mon, 29 Jul 2024 09:21:07 +0200")

On Mon, Jul 29 2024, Gerd Möllmann 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#cautions
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.)

>> 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.



  reply	other threads:[~2024-07-29  9:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <172218853212.17772.9043342656088870281@vcs2.savannah.gnu.org>
     [not found] ` <20240728174212.BDB66C41F13@vcs2.savannah.gnu.org>
2024-07-29  6:21   ` scratch/igc fe90d556834: Make glyphs ambiguous roots Helmut Eller
2024-07-29  7:21     ` Gerd Möllmann
2024-07-29  9:21       ` Helmut Eller [this message]
2024-07-29 10:19         ` Gerd Möllmann
2024-07-29 13:12           ` Gerd Möllmann
2024-07-29 14:01             ` Helmut Eller
2024-07-29 14:12               ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le1kk0zk.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.