public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tim Cullen <timcullen2001@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: possible bug in page allocation mechanism
Date: Thu, 15 Feb 2007 21:53:50 -0800	[thread overview]
Message-ID: <20070215215350.4dbd04ca.akpm@linux-foundation.org> (raw)
In-Reply-To: <490976.56324.qm@web43116.mail.sp1.yahoo.com>

On Thu, 15 Feb 2007 14:11:42 -0800 (PST) Tim Cullen <timcullen2001@yahoo.com> wrote:

> There appears to be a inconsistenancy with reference
> counts on pages allocated with alloc_pages when order
> is greater than zero. In buffered_rmqueue when order
> != 0 then __rmqueue is called. This returns a page
> pointer that is really a pointer to the first page in
> a group of pages. Subsequently prep_new_page is called
> on the first page of the group but not on any others.
> This results in the first page having a reference
> count of 1 while all other pages in the allocation
> have a reference count of 0. I would think that all
> pages in the same allocation should all have the same
> reference count at the end of the allocation.
> 
> I've looked at this in the 2.6.20, 2.6.19.1, and the
> 2.6.17.7 kernels. They contain the same code in this
> area.
> 

That's as-designed.  All page refcount manipulations on a higher-order page
are supposed to be against the head pageframe.

Also, we have the compound page logic in there to force code which tries to
manipulate the refcount of a tail page to be redirected to the head page.


      reply	other threads:[~2007-02-16  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 22:11 possible bug in page allocation mechanism Tim Cullen
2007-02-16  5:53 ` Andrew Morton [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=20070215215350.4dbd04ca.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timcullen2001@yahoo.com \
    /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