The long, long life of an inactive_dirty page
Quoted 4 lines · Arjan van de Ven
bdflush and co WILL commit the data to disk after like 30 seconds. They will not move it to
inactive_clean; that will happen at the first sight of memory pressure. The code that does that notices that the data isn't dirty and won't do a write-out just a move.
Thanks for that. I have a couple of follow-up questions if I may be so bold:
1. Is there any way, from user space, to distinguish inactive_dirty pages which have actually been written from those which haven't?
2. Is there any reason, conceptually, that bdflush shouldn't move the pages to the inactive_clean list as page_launder does? After all, they become "known clean" at that point, not X hours later when there is a memory shortfall.
Cheers,
Andrew
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Andrew Crawford
Quoted 4 lines · Arjan van de Ven
bdflush and co WILL commit the data to disk after like 30 seconds. They will not move it to
inactive_clean; that will happen at the first sight of memory pressure. The code that does that notices that the data isn't dirty and won't do a write-out just a move.Thanks for that. I have a couple of follow-up questions if I may be so bold:
well you may IF you fix your mail setup to not send me evil mails about having to confirm something.
Quoted 3 lines
1. Is there any way, from user space, to distinguish
inactive_dirtypages which have actually been written from those which haven't?
no, in fact the kernel doesn't know until it looks at the pages (which it only does on demand). One thing to realize is that after bdflush has written the pages out, they can become dirty AGAIN for a variety of reasons, and as such the accounting is not quite straightforward.
Quoted 3 lines
2. Is there any reason, conceptually, that bdflush shouldn't move the pages to the
inactive_cleanlist aspage_launderdoes? After all, they become "known clean" at that point, not X hours later when there is a memory shortfall.
the problem is that the "becoming clean" is basically asynchronous, which would mean the LRU order (FIFO basically) would be destroyed. (there's implementation issues as well wrt lock ranking etc etc but that's details)