All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Wu Fengguang <fengguang.wu@intel.com>, Jan Kara <jack@suse.cz>,
	Nick Piggin <npiggin@kernel.dk>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andi Kleen <ak@linux.intel.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>
Subject: Re: PAGE_CACHE_SIZE vs. PAGE_SIZE
Date: Thu, 31 Jan 2013 14:40:26 -0800	[thread overview]
Message-ID: <20130131144026.bd735c07.akpm@linux-foundation.org> (raw)
In-Reply-To: <20130118155724.GA8507@otc-wbsnb-06>

On Fri, 18 Jan 2013 17:57:25 +0200
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> 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.
> 
> Is it time to get rid of PAGE_CACHE_* macros?
> I can prepare patchset if it's okay.

The distinct PAGE_CACHE_SIZE has never been used for anything, but I do
kinda like it for documentary reasons: PAGE_SIZE is a raw, low-level
thing and PAGE_CACHE_SIZE is the specialized
we're-doing-pagecache-stuff thing.

But I'm sure I could get used to not having it ;)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Wu Fengguang <fengguang.wu@intel.com>, Jan Kara <jack@suse.cz>,
	Nick Piggin <npiggin@kernel.dk>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andi Kleen <ak@linux.intel.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>
Subject: Re: PAGE_CACHE_SIZE vs. PAGE_SIZE
Date: Thu, 31 Jan 2013 14:40:26 -0800	[thread overview]
Message-ID: <20130131144026.bd735c07.akpm@linux-foundation.org> (raw)
In-Reply-To: <20130118155724.GA8507@otc-wbsnb-06>

On Fri, 18 Jan 2013 17:57:25 +0200
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> 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.
> 
> Is it time to get rid of PAGE_CACHE_* macros?
> I can prepare patchset if it's okay.

The distinct PAGE_CACHE_SIZE has never been used for anything, but I do
kinda like it for documentary reasons: PAGE_SIZE is a raw, low-level
thing and PAGE_CACHE_SIZE is the specialized
we're-doing-pagecache-stuff thing.

But I'm sure I could get used to not having it ;)

  reply	other threads:[~2013-01-31 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 15:57 PAGE_CACHE_SIZE vs. PAGE_SIZE Kirill A. Shutemov
2013-01-31 22:40 ` Andrew Morton [this message]
2013-01-31 22:40   ` Andrew Morton
2013-02-19 16:12   ` Michel Lespinasse
2013-02-19 16:12     ` Michel Lespinasse
2013-02-19 10:32 ` Simon Jeons
2013-02-19 10:32   ` Simon Jeons

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=20130131144026.bd735c07.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@kernel.dk \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.