Re: PAGE_CACHE_SIZE vs. PAGE_SIZE

From: Simon Jeons
Date: Tue Feb 19 2013 - 05:55:21 EST


On 01/18/2013 11:57 PM, Kirill A. Shutemov wrote:
Hi,

PAGE_CACHE_* macros were introduced long time ago in hope to implement
page cache with larger chunks than one page in future.

In fact it was never done.

Some code paths assume PAGE_CACHE_SIZE <= PAGE_SIZE. E.g. we use
zero_user_segments() to clear stale parts of page on cache filling, but
the function is implemented only for individual small page.

It's unlikely that global switch to PAGE_CACHE_SIZE > PAGE_SIZE will never
happen since it will affect to much code at once.

I think support of larger chunks in page cache can be in implemented in
some form of THP with per-fs enabling.

IIRC, you try to implement THP support page cache, then PAGE_CACHE_SIZE maybe don't need any more.


Is it time to get rid of PAGE_CACHE_* macros?
I can prepare patchset if it's okay.


--
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/