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.bugs Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls Date: Fri, 5 Mar 2021 07:38:27 +0000 Message-ID: References: <83r1kw6b06.fsf@gnu.org> <90e99fc5-280d-63bb-9bc4-3efe89b9f9e2@dancol.org> <83a6riysnv.fsf@gnu.org> 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="25352"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46881@debbugs.gnu.org, eggert@cs.ucla.edu To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 08:40:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lI54F-0006U7-ER for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 08:40:11 +0100 Original-Received: from localhost ([::1]:42956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lI54E-000807-0o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 02:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lI546-0007zn-A2 for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lI546-0007pe-2v for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lI546-0006gP-0G for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 02:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 07:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46881 X-GNU-PR-Package: emacs Original-Received: via spool by 46881-submit@debbugs.gnu.org id=B46881.161492995225626 (code B ref 46881); Fri, 05 Mar 2021 07:40:01 +0000 Original-Received: (at 46881) by debbugs.gnu.org; 5 Mar 2021 07:39:12 +0000 Original-Received: from localhost ([127.0.0.1]:60900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI53H-0006fF-L9 for submit@debbugs.gnu.org; Fri, 05 Mar 2021 02:39:12 -0500 Original-Received: from mail-oi1-f180.google.com ([209.85.167.180]:36144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lI53F-0006f2-Fq for 46881@debbugs.gnu.org; Fri, 05 Mar 2021 02:39:10 -0500 Original-Received: by mail-oi1-f180.google.com with SMTP id j1so1546666oiw.3 for <46881@debbugs.gnu.org>; Thu, 04 Mar 2021 23:39:09 -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=VZ0z9pEvfnZzbQ0sPXcm6gvsEnaOshuFZVeRShqCOBs=; b=psOPkvKQ24fOwb2ymV0kqfJQqZ33IJ1QiJgCfFYlaPEh5j/5nhAcR/ZLf6qHZcAZDs tiNTOBv6yub40h+HsironL7uzCbpgRSjmQyrvrmJW8iL6J4baVPDKZfmHuBlFXlxgPRW WvpVj2SZ108TxyPYV3A9WAinFu5xf3gvLn53MV8ylmEwnUy4Baim1oj35KTsKGlsB9hb ThpWb7XoZE5VoaySaorsisE7dLFfuYTEvScZCfYA4rH+nyZY2HVJb4OdArAuYrklC0i3 zM6+trT4AqX3MoGvGH8rBYuP5qRWTs2TYT2ODv2/i/OPR+IFySndmLKXc03uMjFSy4Dk r6yQ== 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=VZ0z9pEvfnZzbQ0sPXcm6gvsEnaOshuFZVeRShqCOBs=; b=by9gFRev5bfXVYv/1rjjfLRPZOx4m98Zi63ESMIUhcWKkVvGddF2hMzJ9oNPoBB2HR LrquK7av2wKj/V4KddZXN2v5enSZ3olKKkLncn6i8OKacyRiPyrSc+QijyUrniX/B72T cv+9gM17EE07743b+QbFAgV5fFCgAIrQ6gcPvGgCXwvx3uzk/2XccXb4yWr7SRlGCzwa Mvq9Mz/DWZEZzp56++EZ5s8DSATe2k4zh+Et8w1ReNRrqDc+aOKVG5nYDEar9S5em7uY O319dDNAKjw2xuTsAllIcUzubYlUlP7thbMgSspoJi9ppyAo980aafjeXisadnQOsKj+ GHpw== X-Gm-Message-State: AOAM5330VczhMc2KA4jOaDymOwIbHLuMhK2xRcV70/AXFBoR3vnd8RX2 cUo5Rj/9hNeayY3WBkBY++u9/z6iCbTqUqZcV5w= X-Google-Smtp-Source: ABdhPJwGm0E5IrOyoWiHIdVuB2ubCbv9nAM1U73re/fe0kHvackB7JamNXOYoBqltDF2U1wbUJRTwG+1L9NXcxYDN84= X-Received: by 2002:aca:4c0f:: with SMTP id z15mr2190051oia.44.1614929943855; Thu, 04 Mar 2021 23:39:03 -0800 (PST) In-Reply-To: <83a6riysnv.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201503 Archived-At: On Fri, Mar 5, 2021 at 7:19 AM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Fri, 5 Mar 2021 02:30:13 +0000 > > Cc: Eli Zaretskii , Paul Eggert , 46881@debbugs.gnu.org > > > > > It looks fine, but wouldn't dumping to a FILE* (with internal buffering) > > > do the same basic thing in a simpler way? > > > > I initially set out to do that, but decided against it. We don't just > > write sequentially (when FILE I/O helps, a little), we also have the > > seek-and-fixup phase, and it didn't seem any simpler at that point.. > > I'm not sure I understand: what's wrong with fseek? Nothing, assuming you're fine with the current performance. Many libcs aren't going to be smart enough to avoid I/O when you fseek through a "large" file and write a word here and there, and my suspicion is that would include glibc. Also, we're not currently using fseek-and-write anywhere in Emacs. We're talking about a file which Emacs is going to have to keep in memory anyway, when reading the dump. The only case in which there might be a problem is if the build machine has significantly less available memory than the machine we intend to run on, and I just don't think that's going to happen. Pip