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 12:55:07 +0000 Message-ID: References: <666da624-2f59-2eb4-8e56-f0ad20dd900c@gmx.at> <26ff7447-9c29-a2f2-bf3d-9eac20a95d0f@gmx.at> 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="17735"; mail-complaints-to="usenet@ciao.gmane.io" Cc: martin rudalics , eliz@gnu.org, Stefan Monnier , emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 14:57: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 1lJGOK-0004Xx-Gl for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 14:57:48 +0100 Original-Received: from localhost ([::1]:59752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJGOJ-0007Ha-I4 for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 08:57:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJFQJ-0005q0-68 for emacs-devel@gnu.org; Mon, 08 Mar 2021 07:55:47 -0500 Original-Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:37645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJFQH-00037R-Du; Mon, 08 Mar 2021 07:55:46 -0500 Original-Received: by mail-oi1-x235.google.com with SMTP id u198so5880712oia.4; Mon, 08 Mar 2021 04:55:44 -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=k1ATDY6ESfqmovuhcKlKpvZ/2Ao1r9mK9LNMEmPQFqI=; b=QFfCqwGQV/jOd6W6N1yOacviPaXFR07fWJ9kJuRkFnUC0ibb2mwIwzX7T4gwdLFqbc TpZCCkudvG1g4qxPGRU3pOoUbQ6A/Vs4QYX7qY52OzHSZH/Bc5spwBdrzUXwLy80zDlZ sJsmlKOynu0vP93FH2QWuqQi4oIdZYW9mFbf+6PLBKDD/E0fCm55LeOCBNZ2pDtWSY0+ kdUq1vWbMyIaAcRTZjiD00kfSfcrJ5l7VFQH1IQyqymZWc6CWqj4l7S1mT7aN4jnqxes E0UylCu0nUzJdzrflh01USnIa9yu5izwX/pi0KBrAd63Whirg89BcVpMCfWe3/TutOsj 3VTQ== 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=k1ATDY6ESfqmovuhcKlKpvZ/2Ao1r9mK9LNMEmPQFqI=; b=Pk7gixXBdU/g7aLXeXQep1csPXNM21mmbDuQJMFdyxqUE+AxeKDt7lyxDIj6tQM6Ex InH1XTlJzZDbQNMAmeeFkAZYYl6Cv2Zwftew/AQ5zs1Y0h0f+7rmUCQMzhCjQJhKulJH ZGwETFPsdlLEHMP8y8DB26cshkE1S0Ptccu8tIYwjrnQQ1mSJMSPH4IiP84GhDC2PpC1 +tO1f9Ba5YVU5WPPoE/jWXyfIWLNwCEKbdwBHDX4CEU1pIfjcOQHeMWJW5nIHgigBtXu 4nH+vRjbnrpUO79pIABsrXveEtBIWvNIk85OtTtLnImnXSs41Mu2lmARZX37tqrwFYfT w4oQ== X-Gm-Message-State: AOAM530PPM8MOw5ZBo7m9DL3BXA1ZkKNTwQIeyIGvUZVCXY8aj+VxnBT dLuUefNJdF5+IL6BhGOh2vVatxXBRjP+5DZiHTM= X-Google-Smtp-Source: ABdhPJzeXrAn/ES+4OAOtf9aWJVilsVIXiwWfGL14HroyZQ5Eh92MW+sirKtjQ/EbaoG94fyfDM/jzpYQsScpUYU+8I= X-Received: by 2002:a54:4196:: with SMTP id 22mr6593350oiy.30.1615208143791; Mon, 08 Mar 2021 04:55:43 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=pipcet@gmail.com; helo=mail-oi1-x235.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:266179 Archived-At: On Mon, Mar 8, 2021 at 11:38 AM Stefan Kangas wrote: > Pip Cet writes: > > Note that none of this is "real" GC: we still mark and sweep, just in > > a slightly smarter way. > > Do you see any significant pros (or cons) to the approach you suggest as > compared to a generational GC? In general, I see significant cons in my approach of incrementally improving GC a little here and there: a complete rewrite would be much better (but, at least at this point in time, I'm not volunteering for it). So I think any time sunk into this may be lost, eventually, and we're only patching holes in our straw hut until we find time to demolish it and build a skyscraper instead. Other cons: - requires POSIX - requires efficient OS paging Pros: - it's cheap, typically (i.e. on GNU/Linux with a "typical" workload) - it's easy to do (comparatively) - there are going to be tangible and immediate benefits - it's a first step towards making GC more hackable again, so a future GCologist will find it easier to implement generational GC > Would we want/need to move to a generational GC if we had what you > describe? Yes. Absolutely. As I said above, I think this might actually help generational GC implementations a lot: those are going to want a "tell me which objects would be collected if I ran mark-and-sweep now" function for checking, and that's what this is. Pip