From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Mon, 12 Feb 2018 12:18:36 -0800 Message-ID: <26497701-9de7-b91e-7ac3-4fb5949b436e@dancol.org> References: <047a67ec-9e29-7e4e-0fb0-24c3e59b5886@dancol.org> <83zikjxt1j.fsf@gnu.org> <8360n6ruzu.fsf@gnu.org> <834m2nplmb.fsf@gnu.org> <83inr2oje6.fsf@gnu.org> <83bmwuogfb.fsf@gnu.org> <878trydrbo.fsf@red-bean.com> <87d15jo39q.fsf@ritchie.wxcvbn.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1518466680 6963 195.159.176.226 (12 Feb 2018 20:18:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 12 Feb 2018 20:18:00 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 To: Kaushal Modi , Philippe Vaucher , Karl Fogel , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 12 21:17:55 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elKXt-00017j-5B for ged-emacs-devel@m.gmane.org; Mon, 12 Feb 2018 21:17:49 +0100 Original-Received: from localhost ([::1]:48293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elKZu-0000DS-Gd for ged-emacs-devel@m.gmane.org; Mon, 12 Feb 2018 15:19:54 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elKYr-0000BU-07 for emacs-devel@gnu.org; Mon, 12 Feb 2018 15:18:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elKYp-000130-S6 for emacs-devel@gnu.org; Mon, 12 Feb 2018 15:18:49 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:47928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elKYp-00011z-ID for emacs-devel@gnu.org; Mon, 12 Feb 2018 15:18:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=j0gMyTEGG8NJFAgjh6DApX2fik94M9fTkZgUr3CxU9c=; b=djPF/9/uIA/muPSpiQTK+OcKm+a3zQtKpgPcKeeqDyYFRujiCdqxswMtP4vAJqb4mYKX72bMJnz5auYQYjXOfq3+KLSCWh1Gbv7wWyygsfq80pM0TpoOj+hE3iE+PX8LVvli9E+8dd3BhmSorJVxU5XGE1HWtZDspl3oJcG73zgsodx4HsEiLA16j7PyEDMKLRPtHmWglwXEPFjKrKVxx6+UyoJPo6ePD4HbqC+F84Zoxcrw8Hy83+/7A8ekmNgTImqBnYWCnA02rGTBs7JvqNb47dzoLfZSvbNAaMdPTUkRoRbuTXdcAaaRlsSBXe2FLXNNHVyK48eXm4RTtjMlCQ==; Original-Received: from [2604:4080:1321:8ab0:e47b:cd6c:4bd4:a834] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1elKYn-0008Dr-Bz; Mon, 12 Feb 2018 12:18:45 -0800 In-Reply-To: <87d15jo39q.fsf@ritchie.wxcvbn.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222694 Archived-At: On 10/19/2017 03:12 AM, Jeremie Courreges-Anglas wrote: > On Wed, Oct 18 2017, Kaushal Modi wrote: >> @Daniel >> >> Just bumping the thread. Would like to know what came out of this. > > Same here. I don't really care whether the portable dumper or the "big > .elc file" approach is taken, but it would be cool to see emacs out of > the malloc and unexec business. This code is fragile and tends to break > on less popular platforms (OpenBSD in my case). I've pushed the portable dumper to the pdumper Savannah branch. It should support a fully PIC Emacs. I implemented demand-paging logic and backed all of it out: the demand paging worked fine, but I wasn't able to figure out a good way to get GC not to page in the whole region almost immediately anyway. I was surprised to find that my Emacs GCs almost immediately after start. Timing on the current code is nevertheless pretty good. Running emacs -Q -nw -batch --eval '(progn (garbage-collect) (kill-emacs))' 100 times, unexec: 22.47ms per invocation pdumper: 28.19ms per invocation I think this degree of startup overhead is acceptable. I could implement the non-PIC mode I'd previously mentioned; I'm confident it would be faster than unexec. But with PIC doing this well, why bother? We want a PIC Emacs for security reasons anyway.