Re: 'cp file1 file2' takes 2x`sizeof(file)` cache (2.3.99-pre9-2)

From: Rik van Riel (riel@conectiva.com.br)
Date: Tue May 16 2000 - 18:59:06 EDT

  • Next message: David Hinds: "Re: PCI/cardbus resources (was Re: xircom_tulip_cb ...)"

    On Tue, 16 May 2000 iafilius@xs4all.nl wrote:

    > Just noticed while copying a (large/tested with 60MB) file it
    > takes about twice the file's size in cache (which takes it from
    > free memory).
    >
    > This must be because kernel doesn't know about the same files,
    > and caches them separate.

    But they _are_ not the same files. If you wanted them to stay
    the same file, you would have linked them instead of copying...

    > But it _is_ waste of memory isn't ?

    Not really. They are two different files, after all...
    (and COW caching really wouldn't be worth the complexity)

    regards,

    Rik

    --
    The Internet is not a network of computers. It is a network
    of people. That is its real strength.
    

    Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies http://www.conectiva.com/ http://www.surriel.com/

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



    This archive was generated by hypermail 2b29 : Tue May 16 2000 - 19:08:30 EDT