[lkml]   [2001]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: SetPageDirty in shmem_nopage

    On 14 Jan 2001, Christoph Rohland wrote:
    > Since we do not mark the page dirty at allocation time the vm can drop
    > it at any time as long as it is not written to. But shmem never
    > adjusts its accounting to that and will happily increase the use
    > counter for both the inode and the fs.

    Why do you increment the use counter at all in nopage?

    There's something wrong here. You shouldn't need to calculate any of this.
    The VM layer already keeps track of how many pages are associated with a
    mapping in "mapping->nr_pages". Why do you maintain extra counters that
    do not give you anything at all?

    You should count how many swap cache entries you have allocated for this
    inode, and nothing more - the VM keeps track of everything else for you
    already. It looks like this code is all historical baggage from when the
    shm code didn't use the VM page cache? I'd rather remove it than try to
    edit it, no?


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

     \ /
      Last update: 2005-03-22 13:28    [W:0.021 / U:14.880 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site