All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Olivier Galibert <galibert@pobox.com>
Cc: "Hack inc." <linux-kernel@vger.kernel.org>
Subject: Re: alloc_pages and struct page *
Date: Tue, 19 Apr 2005 13:06:50 +0100	[thread overview]
Message-ID: <tnxu0m3ezs5.fsf@arm.com> (raw)
In-Reply-To: <20050419105004.GA7612@dspnet.fr.eu.org> (Olivier Galibert's message of "Tue, 19 Apr 2005 12:50:04 +0200")

Olivier Galibert <galibert@pobox.com> wrote:
> If I get a struct page * from a call to alloc_pages with a non-zero
> order, how do I get the struct page * of te following pages from the
> same allocation in order to use them in calls to tcp_sendpage?

page++;

The page structures are kept in an array, "mem_map" if
CONFIG_DISCONTIGMEM is not set or something like
"discontig_node_data[nid].node_mem_map" otherwise (this is true for
the ARM architecture, should be similar on the others). "alloc_pages"
allocates a contiguous range of pages from an array (and doesn't cross
a node boundary).

-- 
Catalin


      reply	other threads:[~2005-04-19 12:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19 10:50 alloc_pages and struct page * Olivier Galibert
2005-04-19 12:06 ` Catalin Marinas [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=tnxu0m3ezs5.fsf@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=galibert@pobox.com \
    --cc=linux-kernel@vger.kernel.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.