Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2024 17:38:52 +0100
From:      Olivier Certner <olce@freebsd.org>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        "Lyndon Nerenberg (VE7TFX/VE6BBM)" <lyndon@orthanc.ca>, freebsd-current@freebsd.org
Subject:   Re: noatime on ufs2
Message-ID:  <4014880.cjyAsbXg9l@ravel>
In-Reply-To: <CAM5tNy4HuHb=GpQXvE4h2NC8_azOwDS3H7wY3UK%2BcE07owPr3A@mail.gmail.com>
References:  <ZZqmmM-6f606bLJx@int21h> <a5e38bfbabd37084@orthanc.ca> <CAM5tNy4HuHb=GpQXvE4h2NC8_azOwDS3H7wY3UK%2BcE07owPr3A@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Hi Rick,

> I do not have a strong opinion w.r.t. atime, but I do believe that
> changing the default would be a POLA violation.

While I value POLA very highly, at the same time I do not consider it a sacrosanct principle that must be followed in every possible circumstances.  There are many different ways and levels of being amazed, and varying counterparties to gain in exchange, so there cannot be any absolute interpretation of it.  Moreover, the stricter you are in general, the more you are pushing the project towards fossilization.  It's true that there are lots of mechanisms to allow both backwards compatibility and evolution in lots of different cases, but they come at a cost which is increased complexity, amount of code and configuration, which has to be taken into account as well.

Here, I do not think activating 'noatime' by default would be a significant violation of POLA.  On the contrary, I think that almost nobody will notice it, so there barely will be any amazement.  Why?  First case: The user/admin doesn't care, so is using the default.  Most of them will never ever use 'atime' for any purposes.  Some will try to use if a few times, discovering on occasion that they cannot because something messed up with them (if 'atime' is the default) or because they are not maintainted (if 'noatime' is the default).  Second case: The user/admin cares, and wants/needs to avoid the extra I/O, so decides to uses 'noatime'.  These people won't even notice a change, since they are using 'noatime' already.  Third case: The user/admin cares, and wants the access times to be updated.  If he's using an explicit 'atime', it's the same as the previous case.  If, as is likely, he's not explicit, he will notice the change as some of his scenarios will start to fail, with more or less bad consequences. I don't think this is really different than lots of changes the project has gone through.  The very important thing, but the only one, we would have to do is publicizing this part correctly ("if you're relying on access times, be sure to change your mount options, and possibly configure your auto-mounting applications and/or other mount helpers so that 'atime' is explicitly enabled.").

I address other POLA-related points raised by Mark Millard in a direct response to his mail.
 
> Please look at this email thread, where the opinion w.r.t. atime
> seemed quite different:
> freebsd-hackers@ Oct. 5, 2023
> Subject:  copy_file_range() doesn't update the atime of an empty file
> 
> I'd put a url here, but gmail always puts the subject line in here when
> I copy/paste the url?

No problem, I found it online.

I only re-subscribed to hackers@ a few months ago after discovering I had been seemingly unsubscribed for a while without knowing it.
 
> Basically I did not think that updating the infd's atime when copy_file_range()
> did not actually copy any data, but the collective disagreed, so I patched
> the NFSv4 client. (I do not know if markj@'s patch did get committed).
> They also collectively thought that Linux did a poor job w.r.t. atime.

I completely support the view that, if a copy realized through VOP_READ() updates the access time, so should a copy realized through copy_file_range().  That is arguably also an application of POLA, but in fact here is much more: A matter of correctness.

However I fail to see how that thread, as a whole, has any connection with the discussion we are having.  Could you please elaborate?

Thanks and regards.

-- 
Olivier Certner

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQIzBAABCQAdFiEEmNCxHjkosai0LYIujKEwQJceJicFAmWkDhwACgkQjKEwQJce
JiepJg//Wrlg/nwrqKY24TDuJcaTSX6UehSDPctTEXuJgHoiwIvjrWJpuj7LStsR
N50GNJvnbVvrU5izGqa0xbeTlZTMqCHQVOHbuuH6xE9SiugyAfDKOta3siA3/7PF
KGXoX/eIxxtDraRvsvTQ4yDOnZcTZbhAsAKo409t/K98FMY/Qun2Z3IKmFrDXeSb
OTOC27YfBsimGcqFLfaDp4uhE65yr0Hrh08V55cSUgtoBBfquiP4gvpCN9AN+Psr
zgo2ok6E0VNbp4slS8jB2l70oe/VYoDF5qDEV8rxaqwoyHQgmHjgXeEEICkjXbY/
JVJOj6vQk7m+gEZPX8nbBUXL1JRko458u2rzYWEdZ9tzZHv6DZTrd8VYbi3wa6+R
gTYqqUaRWXBmuAI8YTqL+yOaIazzBv7hDATW7prVpk7EXrAB6R1DorMC+HDpEhSF
n+EdPCikgUBT2KpAD4HypSkDk+YItVMrdt6j3yBBpfhWhtP4RRPF3YqMZwYvJi2O
N/IrVT+gJNA1sPpvNBwNOR4epi5il3VyqS0BoAcVRjS48f/VA7LCTHGQPEch++z9
vfSmwOSQmJn7nIsz60cWj5vPDL4rAIYRe3jZI+Hb1z3AH8QWHF+NlDQAieuFsFvB
RuCJt156r8RCCNFzXpr5KD5t4gm1um2duXE7/3fdFzo3dWuMHeo=
=21UC
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4014880.cjyAsbXg9l>