From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Opportunistic GC Date: Mon, 8 Mar 2021 19:06:43 +0100 Message-ID: <1401c9fa-4236-4060-9a32-51354ab5bd0f@gmx.at> 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; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, Stefan Monnier , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 19:34:59 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 1lJKiZ-0000ZB-N0 for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 19:34:59 +0100 Original-Received: from localhost ([::1]:36598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJKiY-0001SY-P9 for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 13:34:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJKHR-0002lO-MB for emacs-devel@gnu.org; Mon, 08 Mar 2021 13:07:00 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:56313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJKHL-0004Yp-VD; Mon, 08 Mar 2021 13:06:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1615226805; bh=3Fa1ef6z0sG0bJMYIWqLXvIHk5eoHeaOSW0aAYY6q6o=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=BJLa6q6mCVsujPDbIzLWLj2HoSTacxjECYQbGlcbuwuTGHc1du3kXAF4M7KrPxBYl CvtKLffVBxFYcS2aEttTsD/RSNU2/Er54gvMhyVSOEGjmKX9qEg9bkl+mdFGTsgWn3 D4iYskCjKDsG0p3VUSlPU4ebVz6rfzlZW1scER+k= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.150]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MPog5-1l5nUs2m6l-00Mwad; Mon, 08 Mar 2021 19:06:45 +0100 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:Qux/mlwnjC62UxRvCxoWDy7ReRgrp82aDNm63x0F4yHgHvcEN2+ QiUbd6WV5w5NtiJsyggxLcvQMuRActeeh4UPQn2mBySIo7oWnIpJbRu+ANKm/Vwuvxsy7qI y1zMTr63dLL+3NS6lKdI+bfTdcgAPf8HN6rHn7PCQZBx0hElyK8P0wH5W1RgnSJ1VStHqQ0 qiTTeDnp34p4JoPMFJBuA== X-UI-Out-Filterresults: notjunk:1;V03:K0:vV+NsJFhqaw=:C+sk3dMsdet+8YrqnEnF6l M3z2Zo1sQHVaeacTHwGG2mTCPeMVxjohIrhaAuoIPB4rPdDP2ZEjDEjs75bVPlTSNmEhXeTGU VuCe3ZvJibs7d+T9ZbOzWuBn6heq/rrN7RAM5pdmvV4bSay8uRfqkNnHmZdk4kRqfd7ROzf7F 1nusnToqVksiWQOPZeXcamyMYVKskPZCfTLvBCp51h2dA1Ese3ScljiZ54kxUSUEpf5AvH4z8 RxrB79YeMMNY1IPx0BXoNpWODq5LbiJ5aZ7WkFxSEnJ9nBJ/OynNFTWkWpJQGQx6PCcVTTHEY 5pSDPhjEy/XeHiI+W2g74T+a1UqzMvpgK8jEnDuBXzskA9AD0ZP+xrwERm2k0HOSN+c9FCtfE uWgARppfZCmaROaOOwqjqiCCwBwJLpbW7FEbdoUEwFbF/xiiFpTLJ+fv5ERcPEQcUE55j/jT5 kj6G73ahjtSZKElZGpZr7EO8pwUETATmpVJA/v67OBOtdOtMA52jmgbGEct+5MRHfeOOqUCA5 H/LAxAn77uUiYowYhrfu1/ivaDRjPsSN0WVPxJ3zjXBm9dw7SX6dDtwVfhvx/EVmdM1ZFvhMm HFMHXxcpBkLh04kPs6S9v0DdRmLPzY58PUnAKHDA6KFnCVyoeQqgAbfH/81xZhpW7C4e/VJak RVPVIXijJeDf5yNmk0RPYHwza9fgtw7ZOKB2h8r067lN7Wods6VdhFe1V1qhrkKWj7um0mTA9 WKHgteOqzpucWz7xbAjO8Qj/D2mDNaLnuDNU4hUebGuunnBJyQi8dkj8sQ5neAN3AkjI+2i4 Received-SPF: pass client-ip=212.227.15.15; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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:266215 Archived-At: > I don't think it's going to matter in practice, though. GC, after all, > does not take that long, .. as long as we do not increase the heap size with the excuse that GC is now no more intrusive anyway ... > and the retained working set of most Lisp > programs is small, memory is cheap, and it is a factor of two in the > absolute worst conceivable case. We don't have to reserve that space and closing the fork automatically returns it to the OS? I have no idea how copy-on-write is implemented. >> Each such write causes its associated page getting written >> out to avoid that an old link gets lost. And if the action was to drop >> an old link, writing the page out doesn't even make sense. > > I'm not sure what you mean by "drop an old link". Setting a car or cdr to nil (as opposed to setting a car or cdr to some other cons cell). In this case, the copy on write will trigger a fault on that object's page to make sure that the previous reference gets traced by the collector. Usually, concurrent collectors do not care. > No, I meant "real" as opposed to mark-and-sweep style algorithms. > Generational would have been a better (but possibly slightly > narrower?) term. So you mean mark-and-sweep as opposed to copying. In principle, a generational collector could be mark-and-sweep too. Just that its paging behavior would be probably disastrous over time. We never collected any evidence on how long Elisp objects live. So it's not clear how much we could gain from promoting long-lived objects. martin