Goodness gracious, are we fixing the right problem?
Posted Mar 17, 2012 21:32 UTC (Sat) by giraffedata
In reply to: Goodness gracious, are we fixing the right problem?
Parent article: The trouble with stable pages
I think there are any number of other ways a writer of file pages might want only a consistent set of data to get hardened to disk, so a checksum computing callback isn't a very general solution.
Apparently, the way it works with stable pages is that something locks out the page from getting scheduled for writeback while the page is being updated and having its checksum calculated. So it sounds like a better solution is to have that thing lock out the page not from being scheduled, but from having I/O actually started. The page could move through the I/O queue while being locked/updated, but when it reaches the head of the queue if it is locked (in the middle of an update) at that moment, the scheduler starts something else instead, while the locked one otherwise retains its position at head of the queue.
You don't want to waste your time writing out a page that's just going to get dirty again immediately anyway.
to post comments)