| 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: | Fri, 9 May 2008 10:56:05 +0100 |
| Cc: | linux-mips <linux-mips@linux-mips.org> |
| In-reply-to: | <50c9a2250805082354x1edc1ecar89dcc3378b3bbe75@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <50c9a2250805082354x1edc1ecar89dcc3378b3bbe75@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.17 (2007-11-01) |
On Fri, May 09, 2008 at 02:54:29PM +0800, zhuzhenhua wrote: > i have a sensor driver want to malloc 2.xM SDRAM to capture > data(using DMA), so i used remap_pfn_range to malloc 3M. > But in /proc/meminfo, it showes free memory reduce 4M. i also check the > /proc/buddyinfo, it seemes too. > (i am looking inside kernel code, but not get clear at now). > > is remap_pfn_range should align to 2(n) * (page size) ? 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. Ralf |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [RFC][PATCH 4/4] RTC: SMBus support for the M41T80,, David Brownell |
|---|---|
| Next by Date: | Re: [RFC][PATCH 4/4] RTC: SMBus support for the M41T80,, Atsushi Nemoto |
| Previous by Thread: | 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] |