On Tue, Sep 1, 2020 at 4:22 AM Paul Eggert <egg...@cs.ucla.edu> wrote: > On 9/11/14 1:13 PM, Paul Eggert wrote: > > Thanks, but there's no need for that; just have 'grep' complain if the > > option is > > used and O_NOATIME == 0. > > On looking into this more today, O_NOATIME seems to be just a best-effort > thing > as some GNU/Linux filesystems ignore it, so grep should just join the throng > and > not worry whether O_NOATIME actually works. > > Also, the O_NOATIME support was withdrawn from fts a couple of years ago, so > 'grep -r' can't easily avoid updating atime on directories. > > A patch is attached. I'm still of two minds about this. The efficiency > argument > for the new option is not as strong as it used to be, now that relatime has > taken over on ext4 style filesystems. So the main argument is "I want to > search > through this directory but don't want it to count as an access"; although > that's > indeed a use case I'm not quite sure it's worth modifying 'grep' over. It > doesn't seem to be worth using up a scarce option letter over, anyway, so the > attached patch uses just a long option.
I confess to similar ambivalence, but do like the idea. Has anyone run tests to compare performance on file systems like ext4, btrfs (the default with Fedora 33) and xfs?