[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opportunistic GC
From: |
Philipp Stephani |
Subject: |
Re: Opportunistic GC |
Date: |
Mon, 8 Mar 2021 17:14:51 +0100 |
Am Mo., 8. März 2021 um 16:53 Uhr schrieb Andrea Corallo via Emacs
development discussions. <emacs-devel@gnu.org>:
>
> Pip Cet <pipcet@gmail.com> writes:
>
> > On Mon, Mar 8, 2021 at 2:01 PM Andrea Corallo <akrl@sdf.org> wrote:
> >> Pip Cet <pipcet@gmail.com> writes:
> >>
> >> > On Mon, Mar 8, 2021 at 3:37 AM Stefan Monnier <monnier@iro.umontreal.ca>
> >> > wrote:
> >> >> I've been running with the code below recently to try and see if
> >> >> opportunistic GC can be worth the trouble.
> >> >
> >> > Just a random idea: What if we exploit the fact most people have more
> >> > than one CPU core these days, garbage-collect in a separate fork()ed
> >> > process, then do only the sweeping in the main process?
> >>
> >> It's an interesting concept, I thought about something similar in the
> >> past but, I've two questions:
> >>
> >> Are we really sure that a non trivial process can long survive
> >> or work as expected after being forked?
> >
> > I believe that, on all systems where bash works, we can expect fork()
> > to behave.
>
> I also expect fork will work, I'm more wondering about interaction with
> sockets file descriptors or anything else in our codebase and/or in
> libraries we have loaded.
>
> I've read in the past this is an issue in practice in non trivial code
> and that, because the typical use of fork () nowadays is just to run
> afterward exec (), operating in the grey between the two was not really
> a good idea. But I don't have the reference now and if you say it works
> I've no reasons not to trust you.
The restriction is that you can only call async-signal-safe functions
in subprocesses before exec. See e.g. the man page for fork on
GNU/Linux.
Re: Opportunistic GC, Andrea Corallo, 2021/03/08
- Re: Opportunistic GC, Pip Cet, 2021/03/08
- Re: Opportunistic GC, Stefan Monnier, 2021/03/08
- Re: Opportunistic GC, Andrea Corallo, 2021/03/08
- Re: Opportunistic GC,
Philipp Stephani <=
- Re: Opportunistic GC, Andrea Corallo, 2021/03/08
- Re: Opportunistic GC, Philipp Stephani, 2021/03/08
Re: Opportunistic GC, Stefan Monnier, 2021/03/08
Re: Opportunistic GC, Eli Zaretskii, 2021/03/08
Re: Opportunistic GC, Pip Cet, 2021/03/10
Re: Opportunistic GC, Eli Zaretskii, 2021/03/10
Re: Opportunistic GC, Pip Cet, 2021/03/11
Re: Opportunistic GC, Eli Zaretskii, 2021/03/11
Re: Opportunistic GC, Pip Cet, 2021/03/11
Re: Opportunistic GC, Eli Zaretskii, 2021/03/11