From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.devel Subject: Re: Eager garbage collection Date: Tue, 17 Nov 2020 23:05:22 -0500 Message-ID: <87zh3fjon1.fsf@catern.com> References: <20201118002050.16426-1-sbaugh@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 18 05:07:14 2020 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 1kfEkU-0007Ak-KR for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Nov 2020 05:07:14 +0100 Original-Received: from localhost ([::1]:43110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfEkT-0007nT-J8 for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Nov 2020 23:07:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfEim-00077L-2L for emacs-devel@gnu.org; Tue, 17 Nov 2020 23:05:28 -0500 Original-Received: from venus.catern.com ([68.183.49.163]:51254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfEii-0002WK-2X for emacs-devel@gnu.org; Tue, 17 Nov 2020 23:05:27 -0500 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=98.7.229.235; helo=localhost; envelope-from=sbaugh@catern.com; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=catern.com; s=mail; t=1605672322; bh=uelMg+YF00Ti/l6/wqjuGDxQ/0k7Eh5m+e04u+hty3I=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=fPRuG+02akxu+OoFBIkv53uM93xzwaO8pSHiZEXU78qMJqiI92sG5tNuO1VMq70lo 03Sdccp5FT29qdzzESUrdCo9uOBMvSs1y4/7jXNHDPd22BJaAbscZaCMUqtNprlY9K OUISSNO32lE8vvms0cB24ID7OnbwRXaZtKtPRMxE= Original-Received: from localhost (cpe-98-7-229-235.nyc.res.rr.com [98.7.229.235]) by venus.catern.com (Postfix) with ESMTPSA id D27DC2DD83C; Wed, 18 Nov 2020 04:05:22 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=68.183.49.163; envelope-from=sbaugh@catern.com; helo=venus.catern.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 23:05:23 X-ACL-Warn: Detected OS = Linux 3.11 and newer 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, 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:259328 Archived-At: Stefan Monnier writes: >>>The time to do a GC doesn't depend on the amount of garbage so much as >>>the size of the heap, but I think I like your idea. Better yet: keep >>>track of the time that each GC takes and use that as a guide for the >>>idle-time delay. >> >> OK, I added an exponential-moving-average to track the time that GC >> uses, and use it as the idle-time delay, with the idea that if we >> reach idle time X, the naive best estimate of the total idle time is >> 2*X. See following patches. > > The code is looking pretty good. I have a few minor comments to make > about it, but the only significant one is that it's a bit more than what > we can consider as trivial. > > AFAICT you haven't yet signed the copyright paperwork for contributions > to Emacs, so we'd need you to do that before we can accept your code. I actually submitted the paperwork just yesterday (finally got around to it since I was sending this in) - I assume it's still being processed.