From: "Jörn Engel" <joern@logfs.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, linux-arch@vger.kernel.org,
linux-fsdevel@vger.kernel.org, npiggin@suse.de
Subject: Re: Should PAGE_CACHE_SIZE be discarded?
Date: Thu, 15 Nov 2007 18:09:30 +0100 [thread overview]
Message-ID: <20071115170930.GD10165@lazybastard.org> (raw)
In-Reply-To: <17161.1195048613@redhat.com>
On Wed, 14 November 2007 13:56:53 +0000, David Howells wrote:
>
> Are we ever going to have PAGE_CACHE_SIZE != PAGE_SIZE? If not, why not
> discard PAGE_CACHE_SIZE as it's then redundant.
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
prev parent reply other threads:[~2007-11-15 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 13:56 Should PAGE_CACHE_SIZE be discarded? David Howells
2007-11-14 15:23 ` Nick Piggin
2007-11-14 15:59 ` David Howells
2007-11-14 21:35 ` Nick Piggin
2007-11-15 12:05 ` David Howells
2007-11-15 14:15 ` Benny Halevy
2007-11-15 14:46 ` David Howells
2007-11-15 21:30 ` Nick Piggin
2007-11-15 17:09 ` Jörn Engel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071115170930.GD10165@lazybastard.org \
--to=joern@logfs.org \
--cc=dhowells@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).