public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>, Nick Piggin <npiggin@suse.de>,
	dgc@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Make page->private usable in compound pages V1
Date: Thu, 5 Apr 2007 16:43:00 -0700	[thread overview]
Message-ID: <20070405164300.a5d24329.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070405223651.21698.77505.sendpatchset@schroedinger.engr.sgi.com>

On Thu,  5 Apr 2007 15:36:51 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> If we add a new flag so that we can distinguish between the
> first page and the tail pages then we can avoid to use page->private
> in the first page. page->private == page for the first page, so there
> is no real information in there.
> 
> Freeing up page->private makes the use of compound pages more transparent.
> They become more usable like real pages. Right now we have to be careful f.e.
> if we are going beyond PAGE_SIZE allocations in the slab on i386 because we
> can then no longer use the private field. This is one of the issues that
> cause us not to support debugging for page size slabs in SLAB.
> 
> Having page->private available for SLUB would allow more meta information
> in the page struct. I can probably avoid the 16 bit ints that I have in
> there right now.
> 
> Also if page->private is available then a compound page may be equipped
> with buffer heads. This may free up the way for filesystems to support
> larger blocks than page size.
> 
> We add PageTail as an alias of PageReclaim. Compound pages cannot
> currently be reclaimed. Because of the alias one needs to check
> PageCompound first.

So slub is using compound pages so that it can locate the head page in
higher-order pages, whereas slab uses per-object (or per-order-0-page?)
metadata for that?

I see four instances of

+	page = virt_to_page(p);
+
+	if (unlikely(PageCompound(page)))
+		page = page->first_page;

A new virt_to_head_page() is needed.


Sigh.  We're seeing rather a lot of churn to accommodate slub.  Do we
actually have any justification for all this?  If we end up deciding to
merge slub and to deprecate then remove slab, what would our reasons have
been?

  parent reply	other threads:[~2007-04-05 23:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 22:36 [PATCH 1/2] Make page->private usable in compound pages V1 Christoph Lameter
2007-04-05 22:36 ` [PATCH 2/2] Optimize compound_head() by avoiding a shared page flag Christoph Lameter
2007-04-07  5:23   ` Andrew Morton
2007-04-07 22:16     ` Christoph Lameter
2007-04-07 22:51       ` Andrew Morton
2007-04-08  0:21         ` Christoph Lameter
2007-04-08  1:25           ` Andrew Morton
2007-04-08  1:32             ` Christoph Lameter
2007-04-08  1:48               ` Andrew Morton
2007-04-09 17:22                 ` Christoph Lameter
2007-04-09 18:09                 ` Christoph Lameter
2007-04-09 18:45                   ` Andrew Morton
2007-04-09 18:49                     ` Christoph Lameter
2007-04-09 22:05                     ` Christoph Lameter
2007-04-05 23:43 ` Andrew Morton [this message]
2007-04-06 17:01   ` [PATCH 1/2] Make page->private usable in compound pages V1 Christoph Lameter
2007-04-06 20:04     ` Andrew Morton
2007-04-06 20:28       ` Christoph Lameter
2007-04-06 19:46   ` Christoph Lameter

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=20070405164300.a5d24329.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=dgc@sgi.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    /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