Re: [PATCH] cowlinks v2

From: Jörn Engel
Date: Mon Apr 05 2004 - 13:05:06 EST


On Mon, 5 April 2004 13:41:58 +0100, Jamie Lokier wrote:
> Jörn Engel wrote:
> > Sharing the page cache is more important to me than sharing disk
> > space. Disk space is cheap, but increasing memory beyond 1GiB in my
> > notebook is not and 1GiB is too little, so memory is the real
> > constraint.
>
> Lucky you! I have 192MB, that's as much as it can take.

I know your pain, last month my machine had just 160MiB.

That month I also didn't care much about page cache awareness of cow.
A grep over one kernel tree would thrash the cache just as a grep over
ten. Now I can tell the difference again.

> > And it looks like Pavel already found the solution. Whenever doing
> > something fishy that would confuse the page cache, we
> > 1. lock
> > 2. invalidate page cache for all files belonging to that cow entity
> > 3. copyfile(), write(), or whatever
> > 4. unlock
> >
> > This is always possibly, because page cache for cow-files is never
> > read-write. If it was, we would have done 1-4 before and now have a
> > regular (non-cow) file.
> >
> > Did I miss something?
>
> Just some interesting indirection or substitution of address_space
> objects needed in the vmas, to map the right pages.

That is already covered by the nonexistent invalidate_inode() function
in point 2. :)

You are right, implementation is more interesting, but it *should*
work.

Jörn

--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
-
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/