News for hackers. Stuff that matters.
Re:Linux Kernel: The multi-generational LRU by k_bx on Monday April 19, 2021 @05:32AM (#26860733)
What I would love to see is an expiration mechanism for files, e.g. you create a file that will get cleaned up in an hour. Would simplify my life on multiple occasions.
Re:Linux Kernel: The multi-generational LRU by pferde on Monday April 19, 2021 @05:37AM (#26860773)
You can with systemd (*cue boos from the audience*), although it involves a bit of additional configuration - what files to clean up, and set up a timer.

See e.g. https://www.putorius.net/systemd-tmpfiles.html#user-specific... (no affiliation with the site, it was just the first one I found that describes the works).

Re:Linux Kernel: The multi-generational LRU by k_bx on Monday April 19, 2021 @06:51AM (#26861227)
Wow, thank you! I didn't know it not only exists but is provided by systemd. I'm already using systemd to deploy my services, so this sounds like a perfect fit!
Re:Linux Kernel: The multi-generational LRU by loa_in_ on Monday April 19, 2021 @08:22AM (#26861920)
That isn't something kernel should concern itself with. It also can be accomplished by three line python script and one line of crontab
Re:Linux Kernel: The multi-generational LRU by k_bx on Monday April 19, 2021 @09:54AM (#26862772)
To me, this is the same concern that tmpfile api is providing. Either remove the temp file/dir api or extend it with useful stuff.
Re:Linux Kernel: The multi-generational LRU by loa_in_ on Tuesday April 20, 2021 @06:09PM (#26882496)
tmpfile isn't guaranteed by Linux kernel. It's POSIX and POSIX is userspace layer with elements of it (like IPC and IO) implemented in kernel for efficiency resons.