[lkml]   [2006]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 03/13] io-accounting: write accounting
    Andrew Morton wrote:
    > On Wed, 13 Dec 2006 00:45:50 -0800
    > Suleiman Souhlal <> wrote:
    >> wrote:
    >>>From: Andrew Morton <>
    >>>Accounting writes is fairly simple: whenever a process flips a page from clean
    >>>to dirty, we accuse it of having caused a write to underlying storage of
    >>>PAGE_CACHE_SIZE bytes.
    >>On architectures where dirtying a page doesn't cause a page fault (like i386), couldn't you end up billing the wrong process (in fact, I think that even on other archituctures set_page_dirty() doesn't get called immediately in the page fault handler)?
    > Yes, that would be a problem in 2.6.18 and earlier.
    > In 2.6.19 and later, we do take a fault when transitioning a page from
    > pte-clean to pte-dirty. That was done to get the dirty-page accounting
    > right - to avoid the all-of-memory-is-dirty-but-the-kernel-doesn't-know-it
    > problem.

    Ah yes indeed. I'm unable to keep up with all the new developments. :-(

    However, if my understanding of this code is correct, it seems that the
    page fault is only done for shared writable VMAs, so you still can't
    rely on set_page_dirty() always being called by the process that
    dirtied the page in the first place.

    Am I wrong?

    -- Suleiman
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-12-13 11:39    [W:0.024 / U:3.180 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site