From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42 Date: Tue, 13 Aug 2019 18:48:05 +0200 Message-ID: <3E8F9821-8C8B-48AD-BC88-7191450C4D7E@acm.org> References: <5075406D-6DB8-4560-BB64-7198526FCF9F@acm.org> <83h86nu0pq.fsf@gnu.org> <86pnlbphus.fsf@phe.ftfl.ca> <83a7cft8qx.fsf@gnu.org> <868srysb9x.fsf@phe.ftfl.ca> <83wofis508.fsf@gnu.org> <83h86lrs8p.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="148058"; mail-complaints-to="usenet@blaine.gmane.org" Cc: jrm@ftfl.ca, eggert@cs.ucla.edu, 37006@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 13 18:49:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hxZz0-000cIq-IL for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Aug 2019 18:49:14 +0200 Original-Received: from localhost ([::1]:54352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxZyz-0002e3-FV for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Aug 2019 12:49:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60676) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxZyp-0002Ot-CR for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2019 12:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxZyo-0000Rb-BP for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2019 12:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxZyo-0000RV-8D for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2019 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hxZyo-0001tX-50 for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2019 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Aug 2019 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37006 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37006-submit@debbugs.gnu.org id=B37006.15657149057239 (code B ref 37006); Tue, 13 Aug 2019 16:49:02 +0000 Original-Received: (at 37006) by debbugs.gnu.org; 13 Aug 2019 16:48:25 +0000 Original-Received: from localhost ([127.0.0.1]:48600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxZyD-0001sh-2O for submit@debbugs.gnu.org; Tue, 13 Aug 2019 12:48:25 -0400 Original-Received: from mail154c50.megamailservers.eu ([91.136.10.164]:55714 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxZy9-0001sV-LH for 37006@debbugs.gnu.org; Tue, 13 Aug 2019 12:48:23 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1565714889; bh=pA9IrvZt+YxsYFEkJaBHP92ILrbaH2X9isYjgHDxpz8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ONp6h4DByyXVDY5K1zqluKb2s+I+EoCdiiAdCJCON9pyXaiNuyHz88xxUy7CSddjU rn+051DVDzALK0kSlCqRDT7o0gk8tjrPB2CL0x5amAgFx3W+hO4cv1rIxXC1BICNpq XzvUlv7hhUqf22V2sNOCecLKvdUjrZCyNchcvu+w= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] ([188.150.171.71]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x7DGm6wv022361; Tue, 13 Aug 2019 16:48:07 +0000 In-Reply-To: <83h86lrs8p.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A0B020D.5D52E9C9.000E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=CNcEoyjD c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=MSCd30SWwwHpbCGJnNgA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164939 Archived-At: 13 aug. 2019 kl. 17.37 skrev Eli Zaretskii : >=20 > Yes, but the full calculation of the threshold is more complicated > than that. For starters, how do you handle gc_cons_threshold values > that are smaller than GC_DEFAULT_THRESHOLD / 10 under your proposal? > There are use cases where the value was below that before and is above > now, or the other way around, or was below and stays below. If a change to gc_cons_threshold has us end up in garbage_collect too = soon, we can just adjust the bias and consing_until_gc and continue; the = cost for doing so is small and amortised. Conversely, if the user raises = gc_cons_threshold beyond the limit (OBJECT_CT_MAX), the intention is = clearly to inhibit GC anyway. > And that's even before we consider other complications: when > memory-full is non-nil, we should use a different threshold; and what > about user changes to gc-cons-percentage? The check for memory-full was already eliminated from maybe_gc by = changing consing_until_gc when that condition occurs, which seems = reasonable enough. Regarding changes gc-cons-percentage, the effect will = just be delayed to next GC --- is this really harmful? I could be wrong about all this; I'm a bit confused by the threshold = computation, too. However, Paul's consolidation of conditions in the hot = and inlined maybe_gc makes eminently sense to me.