From: Ralf Baechle <ralf@linux-mips.org>
To: zhuzhenhua <zzh.hust@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: is remap_pfn_range should align to 2(n) * (page size) ?
Date: Mon, 12 May 2008 12:22:33 +0100 [thread overview]
Message-ID: <20080512112233.GA8843@linux-mips.org> (raw)
In-Reply-To: <50c9a2250805111918r16913139obfc2982220636b3@mail.gmail.com>
On Mon, May 12, 2008 at 10:18:27AM +0800, zhuzhenhua wrote:
> > This has nothing to do with remap_pfn_range but with the power of two
> > sized buckets used by the global free page pool. Any allocation with
> > get_free_pages will be rounded up to the next power of two. If that's a
> > real concern for you you could allocate a 4MB page then split the page
> > into a 2MB and two 1MB pages and free the 1MB page again.
> thanks for your reply , i see in get_frree_pages and free_pages there is a
> get_order(size).
> but i don't understand " allocate a 4MB page then split the page
> into a 2MB and two 1MB pages and free the 1MB page again."
> is there any function to split it?
No, you'd have to code that yourself. Take a look at split_page() which
splits an order n page into order 0 pages. You'd want something similar
but splitting for some non-zero order.
Ralf
next prev parent reply other threads:[~2008-05-12 11:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 6:54 is remap_pfn_range should align to 2(n) * (page size) ? zhuzhenhua
2008-05-09 9:56 ` Ralf Baechle
2008-05-12 2:18 ` zhuzhenhua
2008-05-12 11:22 ` Ralf Baechle [this message]
2008-05-13 11:44 ` zhuzhenhua
2008-05-13 17:23 ` Ralf Baechle
2008-05-14 1:19 ` zhuzhenhua
2008-05-14 7:33 ` Geert Uytterhoeven
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=20080512112233.GA8843@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=zzh.hust@gmail.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 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.