| To: | zhuzhenhua <zzh.hust@gmail.com> |
|---|---|
| Subject: | Re: is remap_pfn_range should align to 2(n) * (page size) ? |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Mon, 12 May 2008 12:22:33 +0100 |
| Cc: | linux-mips <linux-mips@linux-mips.org> |
| In-reply-to: | <50c9a2250805111918r16913139obfc2982220636b3@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <50c9a2250805082354x1edc1ecar89dcc3378b3bbe75@mail.gmail.com> <20080509095605.GB14450@linux-mips.org> <50c9a2250805111918r16913139obfc2982220636b3@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.17 (2007-11-01) |
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 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [MIPS] Alchemy: register mmc platform device for db1200/pb1200 boards, Sergei Shtylyov |
|---|---|
| Next by Date: | Re: [PATCH 3/7] au1xmmc: remove db1x00 board-specific functions from driver, Sergei Shtylyov |
| Previous by Thread: | Re: is remap_pfn_range should align to 2(n) * (page size) ?, zhuzhenhua |
| Next by Thread: | Re: is remap_pfn_range should align to 2(n) * (page size) ?, zhuzhenhua |
| Indexes: | [Date] [Thread] [Top] [All Lists] |