View Single Post
Old 02-28-2012, 07:29 PM  
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Quote:
Originally Posted by raymor View Post
To do it on purpose:
Code:
open(filename, O_NOATIME, ...
To do it explicitly you use the flag to open() as above. To do it accidentally and in a way that not only do your users not know you're doing it, but you yourself don't know you're doing it, you try to be as clever as you can with your caching. If your caching code is as "clever" as you can write, by definition you're not clever enough to understand all of it's side effects and you get clever but broken caching like nginx.



A patch to use O_NOATIME should be fairly trivial, but a module with no patch would be a little more involved because apr_file_open() doesn't currently pass flags directly to open(). Instead it ORs only the APR_* flags. One would need to make a trivial patch to apr_file_open(), then optionally pass O_NOATIME from a module based on configuration (or just use noatime always).
I grep'd the source and couldn't see NOATIME anywhere. I did see it listed in the CHANGES file for version 0.4.1 back in 2006, but then removed the same day. Which files in the code did you find that explicitly use NOATIME?
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote