From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: Opportunistic GC Date: Mon, 8 Mar 2021 14:57:06 +0000 Message-ID: References: <83a6rdso07.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36187"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 15:59:48 2021 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 1lJHMK-0009Jb-8I for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 15:59:48 +0100 Original-Received: from localhost ([::1]:58334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJHMJ-0000Z0-9c for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 09:59:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJHKL-0006uT-Mw for emacs-devel@gnu.org; Mon, 08 Mar 2021 09:57:45 -0500 Original-Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]:43084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJHKK-0005UX-5n; Mon, 08 Mar 2021 09:57:45 -0500 Original-Received: by mail-oo1-xc2c.google.com with SMTP id x19so2239748ooj.10; Mon, 08 Mar 2021 06:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BZFUa7m14yaQLoSEAWKJ1KZdvr5ZipZ3MIkmGwuRjZA=; b=cnxhaRI8sGMiGnl5fi74OwwG6yQMjhXqvSPQ7DfAXZjidiEIR7bTpa3Hl7T156YC/j KmtzY5xnoPXijT0065sb+haQeo9m593VpZxtP9wFR05m0J8y6BRmsem2CK6ZNWkwk6qA oaSauJAY69HZJkQnz9Rwoc2cgHfyxppF/8j4dyTksb/gawrakxdoH0fuZ6yBXYV1cBwZ +egF/FsZJdjnrYBo9prKHyaB/oDz7UGUuf2O6TWhUJOBRmw6upH1v+FlWqgsrfQEnWC8 KLu8KvaXJx5u3h3E3wfJc0h+sBAFdnxA7ItGJy24rP/TKDg+o8+ZbLffEIZebWYeXwMh JppA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BZFUa7m14yaQLoSEAWKJ1KZdvr5ZipZ3MIkmGwuRjZA=; b=EOZKS8wTRY6PP+Imk/RjzaiHQGMdAUMRKsrbxujxb5h1lW+E235Ay7OxdBN0gO7UPW 6Vv4zrHjcuZXUg4Scenh21hw0omq3N+nRy7/Ug/I7TdKSP4alAZXMvtA4tl2Pt6+4PCw JYV5duf/J5tyJLFUVBbpwSU6HKycmqeuhVrEMv78xm1pd1C+DVSFpx/ZxM2HgBzlA1Uu gr4BGXESHAae1ACF4ie9C9Kh3HRkcA/KC0dQZlAKvf2CjX0zl9X/t1yexj3PI3LCbf2e xj+4Fa+cfvxDndfKTf1pBFFAhkm60qZ1IJMslbKj8j0aOQFvQs61tuhR4GQjaYN/dby0 bOvQ== X-Gm-Message-State: AOAM533xRXuzzX5Amb9p9DZBAwa+27BhvsMgNJLZTwFdGppJ9pojufRB zE1hpRhDCh9Lo++5H64F3H5malgqLGoIbfunDZ1EQiGd/T0= X-Google-Smtp-Source: ABdhPJyltR+7i8oCuaMSwehpo8FmcoiXWzzTntL9DBv4j3RZ0UAuJD+ZOyBpiyS0MynPg5JzU0E4zS7lsuHt4sS3oCg= X-Received: by 2002:a4a:2511:: with SMTP id g17mr19151353ooa.22.1615215462608; Mon, 08 Mar 2021 06:57:42 -0800 (PST) In-Reply-To: <83a6rdso07.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=pipcet@gmail.com; helo=mail-oo1-xc2c.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.23 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" Xref: news.gmane.io gmane.emacs.devel:266186 Archived-At: On Mon, Mar 8, 2021 at 2:45 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Mon, 8 Mar 2021 07:20:28 +0000 > > Cc: emacs-devel@gnu.org > > > > My implementation proposal would be to pipe(), fork(), run GC, then > > send through the pipe the Lisp_Objects which can be collected by the > > original Emacs. > > What happens when, on a 8GB machine, we have an Emacs session with a > 5GB memory footprint, and you fork and start marking (which triggers > copy-on-write)? That is, indeed, one of the cases in which we have to use the synchronous GC or suffer the consequences. Let me be clear about that: yes, it would use (up to) 10 GB of memory, if you really have 5 GB of Lisp data. > Also, I quite frequently need to run Emacs on a system where I'm > forbidden to run more than 2 processes simultaneously ("make -j3" > aborts with an error message), and you propose to take those two > processes with 2 copies of Emacs? That is, indeed, one of the cases in which we have to use synchronous GC. > IOW, I don't believe this scales well enough. I believe it has applications, including my own personal use of Emacs. I don't believe it's universally better than synchronous GC. > > Eli, would this qualify as a "small" GC change, and thus be vetoed? > I don't yet see how it is a good idea to begin with. I'm probably > missing something. Once in a while, every few days or so, GC happens at an inconvenient time to me. I'd like to interrupt it, but I can't. I'd like for Emacs not to become unresponsive while it's mark-and-sweeping, but it is. Sometimes, I end up killing Emacs rather than waiting for GC to complete. Pip