Linux's Multi-Grain Timestamps Short-Lived: Removed From The Kernel After A Few Weeks
Multi-grain timestamps were intended for addressing cases where the current coarse-grained timestamps can be ineffective for updating creation/modification times with a lot of I/O potentially happening within the once per jiffy timestamp. With NFS for example relying on the current coarse-grained timestamps for validating caches this multi-grained timestamps was hoped to be more robust. Multi-grained timestamps though were only to be selectively enabled to avoid the performance overhead.
Christian Brauner of Microsoft who originally submitted the feature for Linux 6.6 went ahead and submitted the pull request, which has already been honored, for dropping the short-lived kernel feature. He explained:
"The kernel will elide fine-grain timestamp updates when no one is actively querying for them to avoid performance impacts. So a sequence like write(f1) stat(f2) write(f2) stat(f2) write(f1) stat(f1) may result in timestamp f1 to be older than the final f2 timestamp even though f1 was last written too but the second write didn't update the timestamp.
Such plotholes can lead to subtle bugs when programs compare timestamps. For example, the nap() function will estimate that it needs to wait one ns on a fine-grain timestamp enabled filesytem between subsequent calls to observe a timestamp change. But in general we don't update timestamps with more than one jiffie if we think that no one is actively querying for fine-grain timestamps to avoid performance impacts.
While discussing various fixes the decision was to go back to the drawing board and ultimately to explore a solution that involves only exposing such fine-grained timestamps to nfs internally and never to userspace.
As there are multiple solutions discussed the honest thing to do here is not to fix this up or disable it but to cleanly revert. The general infrastructure will probably come back but there is no reason to keep this code in mainline."
Thus after a few short weeks, the multi-grain timestamps code has been removed from the kernel ahead of today's Linux 6.6-rc3 release. At least there are many other great features to Linux 6.6.