lkml.org 
[lkml]   [2001]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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?

    Linus

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/

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