|
|
Subscribe / Log in / New account

A walk among the symlinks

A walk among the symlinks

Posted Jul 17, 2015 22:26 UTC (Fri) by Jandar (subscriber, #85683)
Parent article: A walk among the symlinks

> Even without relatime, many filesystems record atime with a one-second granularity, so only one update per second is required.

On my system ext4 seems to have nano-second resolution. Does this mean that using lazytime on ext4 would turn every symlink-traversal into a REF-walk? If yes, a mount-option nosymlinkatime to suppress to update of atime because of symlink-traversal would be useful.


to post comments

A walk among the symlinks

Posted Jul 18, 2015 2:16 UTC (Sat) by neilbrown (subscriber, #359) [Link]

> Does this mean that using lazytime on ext4 would turn every symlink-traversal into a REF-walk?

I don't *think* so but I'm not 100% sure.

I think the kernel mostly only updates its internal time counter (tk_core.timekeeper) every "tick",which means every millisecond or so depending on the HZ setting.
So while it records the time with a precision of 1ns, the accuracy is much less than that.

You only need REF-walk if tk_core.timekeeper has changed since the last time that symlink was accessed. So accessing the same symlink repeatedly should only require REF-walk once per millisecond (or per 10 msecs or whatever HZ is).

I don't think lazytime would change this calculation.

However I do think that nosymlinkatime is probably a good idea and should probably be the default - at least for follow_link (not sure about readlink).
You would need to demonstrate a slowdown caused by the updates, and I suspect you would need quite a few CPU cores to do that (It's quite easy to measure the cost of REF-walk on a 64-core machine ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds