From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Justin Van Winkle Newsgroups: gmane.emacs.bugs Subject: bug#33194: 26.1; Auto-revert mode causes emacs to use 100% cpu whenever a file is being written to in the home directory Date: Tue, 30 Oct 2018 12:18:34 -0400 Message-ID: References: <878t2gbisr.fsf@gmx.de> <83pnvskl8b.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000450c890579748a7d" X-Trace: blaine.gmane.org 1540916234 5805 195.159.176.226 (30 Oct 2018 16:17:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 16:17:14 +0000 (UTC) Cc: michael.albinus@gmx.de, 33194@debbugs.gnu.org To: eliz@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 17:17:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1gHWhZ-0001Qr-HE for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2018 17:17:09 +0100 Original-Received: from localhost ([::1]:54335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHWjf-0000Bz-RB for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2018 12:19:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHWjR-00008W-RF for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2018 12:19:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHWjP-00078E-3D for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2018 12:19:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHWjO-00076y-Uz for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2018 12:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHWjO-0001LW-Q9 for bug-gnu-emacs@gnu.org; Tue, 30 Oct 2018 12:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Justin Van Winkle Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Oct 2018 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33194 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33194-submit@debbugs.gnu.org id=B33194.15409163365154 (code B ref 33194); Tue, 30 Oct 2018 16:19:02 +0000 Original-Received: (at 33194) by debbugs.gnu.org; 30 Oct 2018 16:18:56 +0000 Original-Received: from localhost ([127.0.0.1]:55781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHWjH-0001L3-Kr for submit@debbugs.gnu.org; Tue, 30 Oct 2018 12:18:55 -0400 Original-Received: from mail-lj1-f169.google.com ([209.85.208.169]:43672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHWjF-0001Kq-Ve for 33194@debbugs.gnu.org; Tue, 30 Oct 2018 12:18:54 -0400 Original-Received: by mail-lj1-f169.google.com with SMTP id g26-v6so10679563lja.10 for <33194@debbugs.gnu.org>; Tue, 30 Oct 2018 09:18:53 -0700 (PDT) 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=MvS8sG9Ao+Eq50wsaVHkqkGayUhbNU7KGYwsm1QDGU8=; b=CPabKTuw2jgG4LrFhzB3u5NFMcdvSdwiq0gVgSdn3s9NQe7Bo5ckyUrR1PrM/aSnSJ R7MAHAv+ZtuYZD5zfRcGR1J4YtIQrvhW0/0GKm6gAg82CMlaI05j2DAj8zEI6DvTZuCN Vf5hThIXWhxqz3ZR6GVdME8lUy8z0/A2DSpbzz2P/uQ3JwZgsphHYkp3TXdKTsEbAYJO m7PYk3kngPCVRb4Z5tljIaSFWTjGHjieJXNEClar7FMd0nIcDOfRcLP/LPDexWJAjcJF kYCSTrZG2cisNGsJs40kfrPzVqRgOfXNv443oOlAvYq2Z/0UbxaBKMAG6mHhOIIqGEPK K+qQ== 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=MvS8sG9Ao+Eq50wsaVHkqkGayUhbNU7KGYwsm1QDGU8=; b=HlJs9B1YbRlxal3RoeZEnsxG1OSJGT5xS9VaH31MXE895DohT1B6B2ZCzCbnSSztqt GaW4YovB6UPbmD/N3tZVjy1NBY7W8t8NFoUUDKlmmPKROBkDjTIqha95beH5RTCY5CsN r2fYPQtkudxRJcI+hjoArOoC2pFm2hhD2zuSebcwRDxYj/5mzZA8IOPvEVx30jhMkSJ3 q7p7pEpnaiMnnTK8hT0cXrmAD7a4NV3Rcj3zAce+xGOMqe2vFapmQ4i6R5g7GQz6gA2k yZ4TpSc04uZE+w43FkzI4z0gZ6ZfxTPE8R3Pdb7vJQT0D9mLj+IZod6DAVT3h/pb1lEZ 90/g== X-Gm-Message-State: AGRZ1gL93f8e8r+gLHD1xFugs4T1QA+IOSngxjTxqqe1U2PiZ53AWfF3 OHL3qznw8B8CkuRIDk3YheYb1d28VUwECZEeJqs= X-Google-Smtp-Source: AJdET5cXXjtQb9wTsyPQeiwMhIC2uv2fmSGxdrQ0ZifAikxk7/RBGTk+Y0CCIgQq3BRcIDD+xuqMkwVsOtZNGA3sOYI= X-Received: by 2002:a2e:2019:: with SMTP id g25-v6mr4808462ljg.20.1540916326499; Tue, 30 Oct 2018 09:18:46 -0700 (PDT) In-Reply-To: <83pnvskl8b.fsf@gnu.org> 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: 208.118.235.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:151832 Archived-At: --000000000000450c890579748a7d Content-Type: text/plain; charset="UTF-8" To clarify, I was not writing to a file that was open in emacs. In fact, emacs would use 100% cpu even with no files opened, so long as global-auto-revert-mode was activated. On Tue, Oct 30, 2018 at 2:22 AM Eli Zaretskii wrote: > > From: Justin Van Winkle > > Date: Mon, 29 Oct 2018 17:13:22 -0400 > > Cc: 33194@debbugs.gnu.org > > > > It was outside of emacs. SCP would trigger the cpu usage in emacs, > rsync would not (oddly). Both "cat > > /dev/zero > somefile" and "dd if=/dev/zero of=somefile" would trigger > it if somefile was in my $HOME > > directory, but none of these would trigger it if I did it in, for > example, $HOME/Downloads/ > > Isn't this expected? Auto-revert watches the directory of the file, > so if a lot of changes happen in that directory, Emacs will get a lot > of file-change notifications, and will need to process them. > > If you don't like this, customize auto-revert-use-notify to not use > notifications. Or maybe there's some system-wide customization of > inotify that determine the max frequency of inotify notifications when > the changes are to the same file. (I don't know enough about inotify > to say anything more specific, sorry.) > --000000000000450c890579748a7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To clarify, I was not writing to a file that was open in e= macs.=C2=A0 In fact, emacs would use 100% cpu even with no files opened, so= long as global-auto-revert-mode was activated.

On Tue, Oct 30, 2018 at 2:22 AM Eli Zaretskii <= ;eliz@gnu.org> wrote:
> From: Justin Van Winkle <justin.vanwinkle@gmail.com<= /a>>
> Date: Mon, 29 Oct 2018 17:13:22 -0400
> Cc:
33194@d= ebbugs.gnu.org
>
> It was outside of emacs.=C2=A0 SCP would trigger the cpu usage in emac= s, rsync would not (oddly).=C2=A0 Both "cat
> /dev/zero > somefile"=C2=A0 and "dd if=3D/dev/zero of=3Ds= omefile" would trigger it if somefile was in my $HOME
> directory, but none of these would trigger it if I did it in, for exam= ple, $HOME/Downloads/

Isn't this expected?=C2=A0 Auto-revert watches the directory of the fil= e,
so if a lot of changes happen in that directory, Emacs will get a lot
of file-change notifications, and will need to process them.

If you don't like this, customize auto-revert-use-notify to not use
notifications.=C2=A0 Or maybe there's some system-wide customization of=
inotify that determine the max frequency of inotify notifications when
the changes are to the same file.=C2=A0 (I don't know enough about inot= ify
to say anything more specific, sorry.)
--000000000000450c890579748a7d--