I checked out and installed from master (at 294a5246b264441d436612d4de0dd89fad130aa3). I still see 100% cpu usage in emacs. What I did: In one terminal I run 'emacs' from my home directory, and I don't open any files. In another terminal, again while in the home directory, I run 'cat /dev/zero > zed'. Emacs cpu usage spikes to 100%. - Justin On Sun, Nov 4, 2018 at 6:58 AM Michael Albinus wrote: > Michael Albinus writes: > > Hi Justin, > > >> I mean it is certainly a bug to use 100% of a cpu just because a file > >> that is in the same directory to a file you are editing is being > >> written to, but it may not be unintentional behavior. > > > > I could reproduce the problem. I have a running Emacs for some days, and > > I've enabled `global-auto-revert-mode'. Starting scp copy of a large > > file outside Emacs, brought Emacs up to 100% cpu usage. > > I have pushed a fix for this to Emacs' master branch in git. The case of > several buffers using the same file notification descriptor was prepared > already in the code; due to a silly bug it didn't work. > > > The variable `file-notify-descriptors' contains ... > > > > As we can see, many identical entries #s(file-notify--watch > > /home/albinus nil auto-revert-notify-handler). > > Every incoming event for "/home/albinus" triggers the many calls of > > `auto-revert-notify-handler', although one entry would be sufficient. I > > will check, where all these entries come from. > > This doesn't happen any longer for me. And Emacs doesn't eat all cpu > time. > > Do you have a chance to build Emacs 27.0.50, for verification? > > Best regards, Michael. >