Re: Should PAGE_CACHE_SIZE be discarded?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Howells <dhowells@...>
Cc: <torvalds@...>, <linux-arch@...>, <linux-fsdevel@...>, <npiggin@...>
Date: Thursday, November 15, 2007 - 1:09 pm

On Wed, 14 November 2007 13:56:53 +0000, David Howells wrote:

I did some digging.  The code was merged between 28.4.1999 and
11.5.1999, as it first appears in 2.2.8 and 2.3.0:

/*
 * The page cache can done in larger chunks than
 * one page, because it allows for more efficient
 * throughput (it can then be mapped into user
 * space in smaller chunks for same flexibility).
 *
 * Or rather, it _will_ be done in larger chunks.
 */
#define PAGE_CACHE_SHIFT        PAGE_SHIFT
#define PAGE_CACHE_SIZE         PAGE_SIZE
#define PAGE_CACHE_MASK         PAGE_MASK

#define page_cache_alloc()      __get_free_page(GFP_USER)
#define page_cache_free(x)      free_page(x)
#define page_cache_release(x)   __free_page(x)

Looks like PAGE_CACHE_SIZE>PAGE_SIZE was planned before 2.3 opened, but
never went very far.  So judging by the last eight years of history,
PAGE_CACHE_SIZE is dead.

Completely discarding it might be a bad idea, as it serves as code
annotation.  Christoph Lameters "Large Blocksize Support" patches seem
to globally replace PAGE_CACHE_SIZE with a different macro.  Having
PAGE_CACHE_SIZE makes such an effort easier.  Dropping existing
annotation seems useless, when maintaining them is zero effort.

Large code audits for the PAGE_SIZE/PAGE_CACHE_SIZE distinction seem
completely useless, though.  For as long as the macro existed, it never
ever mattered.  My take is to keep it and let it bitrot until someone
actually cares.

Jörn

-- 
Joern's library part 6:
http://www.gzip.org/zlib/feldspar.html
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Should PAGE_CACHE_SIZE be discarded?, David Howells, (Wed Nov 14, 9:56 am)
Re: Should PAGE_CACHE_SIZE be discarded?, Jörn, (Thu Nov 15, 1:09 pm)
Re: Should PAGE_CACHE_SIZE be discarded?, Nick Piggin, (Wed Nov 14, 11:23 am)
Re: Should PAGE_CACHE_SIZE be discarded?, David Howells, (Wed Nov 14, 11:59 am)
Re: Should PAGE_CACHE_SIZE be discarded?, Nick Piggin, (Wed Nov 14, 5:35 pm)
Re: Should PAGE_CACHE_SIZE be discarded?, David Howells, (Thu Nov 15, 8:05 am)
Re: Should PAGE_CACHE_SIZE be discarded?, Benny Halevy, (Thu Nov 15, 10:15 am)
Re: Should PAGE_CACHE_SIZE be discarded?, David Howells, (Thu Nov 15, 10:46 am)
Re: Should PAGE_CACHE_SIZE be discarded?, Nick Piggin, (Thu Nov 15, 5:30 pm)