All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: linux-mm@kvack.org
Cc: dhowells@redhat.com
Subject: A question about alloc_pages()
Date: Thu, 25 Sep 2008 23:31:16 +0100	[thread overview]
Message-ID: <15178.1222381876@redhat.com> (raw)

Hi,

When alloc_pages() is asked to allocate a block of pages (order > 0), should I
be able to expect that page_count(pages[0]) will be 1, and page_count() for
all the other pages will be 0?

As far as I can see, nothing in the allocator alters what's in the page count
for pages beyond the first when pages are freed, and checks are made that
these are 0 upon freeing, so it looks to me like this ought to be the case.

However, I have a report that sometimes this isn't true, and I'm wondering if
the allocator can't be relied on in this way, or whether there's a bug
somewhere keeping a reference to a released page.

David

--
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>

             reply	other threads:[~2008-09-25 22:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 22:31 David Howells [this message]
2008-09-26 16:01 ` A question about alloc_pages() Christoph Lameter
2008-09-29 13:21   ` David Howells

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=15178.1222381876@redhat.com \
    --to=dhowells@redhat.com \
    --cc=linux-mm@kvack.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 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.