Re: [PATCH] cowlinks v2

From: Eric W. Biederman
Date: Sat Apr 03 2004 - 13:45:24 EST


Jamie Lokier <jamie@xxxxxxxxxxxxx> writes:

> Here's a tricky situation:
>
> 1. A file is cowlinked. Then each cowlink is mmap()'d, one per process.
>
> 2. At this point both mappings share the same pages in RAM.

Why they have different inodes?

> 3. Then one of the cowlinks is written to...

I would not worry about sharing page cache entries unless this becomes
a common case. If you want to avoid the hit of rereading the file when
you have a cow copy it should be simple enough to walk through the list
of cow copies and see if anyone else has it open.

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