all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: last_marked array is now ifdef'ed away
Date: Sat, 14 Sep 2024 20:30:13 +0300	[thread overview]
Message-ID: <8634m2f8ii.fsf@gnu.org> (raw)
In-Reply-To: <AEA4306D-3D9C-414A-A58E-2F0C68443257@gmail.com> (message from Mattias Engdegård on Sat, 14 Sep 2024 19:05:31 +0200)

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Sat, 14 Sep 2024 19:05:31 +0200
> Cc: emacs-devel@gnu.org
> 
> 13 sep. 2024 kl. 17.21 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> > But if a user reports a crash inside GC, that's basically the only
> > trace we have to try and understand what caused the crash, especially
> > if the debug info was stripped.  That's why this code was always on by
> > default.
> 
> Yes, I understand that -- nevertheless it is a bit of a waste to spend time on something that is only rarely used (apparently it took over 2 years before anyone noticed, and I know you aren't one for keeping quiet about this sort of thing).

That's the nature of things that are needed rarely.  But when they
_are_ needed, there's nothing to replace them, and that's when you
appreciate their existence.  Like safety belts, these features are
never a waste.

> And that is with LAST_MARKED_SIZE downgraded from the default 512 to just 16 which seemed more reasonable. (512 entries is 4 KiB of L1D cache which seems extravagant, but I presume the size wasn't given much thought at the time.)

16 is way too few.  GC is deeply recursive, and when I used this, I
almost always had to look at much more than 16 objects.

> Perhaps it's not a big surprise after all: the GC marking loop has data-dependent branches and data-dependent loads, and we are likely to be bound by instructions in flight rather than execution resources; maybe any added instructions and memory traffic will just make it worse.
> 
> > My main concern is not bitrot, it's actually being able to debug
> > crashes inside GC.
> 
> I'm quite sympathetic to that goal but it would be good if we could do it more cheaply. You can inspect the mark_stack structure; I've found this to help quite a bit.

That's not the same, and doesn't show all the objects.

I'm quite confident that I want this be turned on again.



  reply	other threads:[~2024-09-14 17:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07  6:05 last_marked array is now ifdef'ed away Eli Zaretskii
2024-09-12  9:19 ` Eli Zaretskii
2024-09-13 14:43   ` Mattias Engdegård
2024-09-13 15:21     ` Eli Zaretskii
2024-09-14 17:05       ` Mattias Engdegård
2024-09-14 17:30         ` Eli Zaretskii [this message]
2024-09-14 20:30           ` Mattias Engdegård
2024-09-15  5:51             ` Eli Zaretskii
2024-09-15 13:58               ` Mattias Engdegård
2024-09-15 14:21                 ` Eli Zaretskii
2024-09-17 10:15                   ` Mattias Engdegård
2024-09-17 13:22                     ` Eli Zaretskii
2024-09-14 22:50           ` Stefan Kangas
2024-09-15  6:01             ` Eli Zaretskii
2024-09-16 18:07               ` Andrea Corallo

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=8634m2f8ii.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mattias.engdegard@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.