From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46881: 28.0.50; pdumper dumping causes way too many syscalls Date: Wed, 16 Jun 2021 10:13:01 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10292"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46881@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 16 16:14:19 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 1ltWJ8-0002UC-S6 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 16:14:18 +0200 Original-Received: from localhost ([::1]:48124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltWJ7-0008Fu-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 10:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltWIs-0008E4-4D for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 10:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltWIr-0002c0-Se for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 10:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltWIr-0004js-LZ for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 10:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jun 2021 14:14: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.162385279218154 (code B ref 46881); Wed, 16 Jun 2021 14:14:01 +0000 Original-Received: (at 46881) by debbugs.gnu.org; 16 Jun 2021 14:13:12 +0000 Original-Received: from localhost ([127.0.0.1]:53151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltWI4-0004ik-HW for submit@debbugs.gnu.org; Wed, 16 Jun 2021 10:13:12 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltWI2-0004iU-1X for 46881@debbugs.gnu.org; Wed, 16 Jun 2021 10:13:10 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 26493440BCF; Wed, 16 Jun 2021 10:13:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7857B440B26; Wed, 16 Jun 2021 10:13:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1623852782; bh=UmfcGJDnw+Od7Z2u37zwK9b1BDt0yZ7urQYfpbsXpXA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=EzX9GACZKYAun4yuefIIJOGATn5gDIuv4FSG6M59EpbiWBx5a39NCj3Z1eNj3aSZa IrnhHWJVhQWuu9MaH2asxFLyX2/sq9v5I/p22KKnet+D3T8lND59rH39V6zdHXq+H+ IlGKdpT30rA6XESpKsR8oUErKY5Zmdo6B+i/qjC+Bv8SY3Ze/c7EWvCtjFtCHbLJLK Okjgmul+r/E2qEVE5bGDVE7bgW6eBPNqpg2F5UDyqzKbTDhGLX/R8PWPn/YtGEzhA5 yoGpkmTQt6jK5fy67qBufnMLMvd/JwpPGWM046E5+WvsM6v5h1LikAbDKAxEj8O3an G+PywWXJePsMw== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3CD2D12083D; Wed, 16 Jun 2021 10:13:02 -0400 (EDT) In-Reply-To: (Pip Cet's message of "Tue, 2 Mar 2021 20:33:42 +0000") 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:208634 Archived-At: Pip Cet [2021-03-02 20:33:42] wrote: > Playing around with the WebAssembly port, I noticed that pdumper, in > creating the dump file, makes way too many syscalls: it uses > emacs_write(), not fwrite(), so these calls translate to actual > syscalls and context switches. On immature systems (or in special > circumstances like a device mounted synchronously), Thanks for this patch. For the little story, this inefficiency showed up on one of my Thinkpads running GNU/Linux with a plain old ext4 partition mounted in the most standard way (no synchronous mount or other funny business): https://serverfault.com/questions/996495/writes-throttled-to-500kb-s The way this manifested itself is that after some uptime individual writes to the SSD became very slow. For most operations, this was completely invisible, but it was quite noticeable during Emacs's dump which sometimes took several minutes (while all the rest of the compilation (including the "load" part of the dump)) progressed at (apparently) usual speeds. Stefan