User: Password:
|
|
Subscribe / Log in / New account

Stable pages, posible corner cases

Stable pages, posible corner cases

Posted May 12, 2011 18:49 UTC (Thu) by jzbiciak (subscriber, #5246)
In reply to: Stable pages, posible corner cases by davecb
Parent article: Stable pages

It seems like it should, but only if the page starts getting flushed to disk during the series of writes. Dirty pages don't get flushed to disk immediately unless there's memory pressure, too many dirty pages, they've been sitting around awhile, or you've asked them to be flushed. All those thresholds are defined throughout here:

http://lxr.free-electrons.com/source/mm/page-writeback.c

That's what makes it so hard (at least for me) to reason about what workloads would get hurt, since there's not a simple, immediate relationship between "application dirtied a page" and "page got scheduled for writeback." You need both of those things to happen *and* the application must subsequently try to dirty the page further before you hit the page-block.

I guess you could get some negative interactions more immediately if a 'write' call scheduled a writeback for part of a page, and then the app immediately resumed filling the rest of the page. Still, I don't think a write() syscall triggers an immediate writeback on most calls. Take a look at 'queue_io' around line 277:

http://lxr.free-electrons.com/source/fs/fs-writeback.c

Only the oldest dirtied pages get flushed, as I read that.


(Log in to post comments)

Stable pages, posible corner cases

Posted May 12, 2011 19:23 UTC (Thu) by davecb (subscriber, #1574) [Link]

Excellent, thanks! --dave


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds