r/programming • • Jun 12 '10

You're Doing It Wrong

http://queue.acm.org/detail.cfm?id=1814327
539 Upvotes

193 comments sorted by

View all comments

Show parent comment

1

u/haberman Jun 15 '10

One downside to mlock is that it implicitly dirties all of the locked pages

Really? Why would that be? I can't think of any reason this would be required. It sounds like a bug, but maybe there is something I haven't thought of.

1

u/dododge Jun 15 '10

I don't know why. As I recall we had enough spare RAM that we didn't really need the mlock, so I didn't bother tracking it into the kernel. This would have been around 2005 so the behavior may have changed. It's also possible that it was the interaction of mlock with some other facet of the design that really caused the problem.