On Tue, Feb 19, 2013 at 10:27 PM, Simon Jeons <simon.jeons@xxxxxxxxx> wrote:On 02/05/2013 03:10 PM, Marek Szyprowski wrote:Some vendors use reserved memory at highmem, and it's hard to modifyHello,Hi Marek,
On 2/5/2013 12:34 AM, Minchan Kim wrote:On Mon, Feb 04, 2013 at 11:27:05AM +0100, Marek Szyprowski wrote:The total number of low memory pages is determined asSo what's the end user effect? With the effect, we have to decide
totalram_pages - totalhigh_pages, so without this patch all CMA
pageblocks placed in highmem were accounted to low memory.
routing it on stable.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>We don't need #ifdef/#endif.
mm/page_alloc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index f5bab0a..6415d93 100644
@@ -773,6 +773,10 @@ void __init init_cma_reserved_pageblock(struct
totalram_pages += pageblock_nr_pages;
#ifdef is required to let this code compile when highmem is not enabled,
becuase totalhigh_pages is defined as 0, see include/linux/highmem.h
1) Why can support CMA regions placed in highmem?
to use lowmem, so just CMA can support highmem and no need to adjust
address used at reserved memory.
CMA is for dma buffer, correct? Then how can old dma device access highmem?What's the "old dma device"? To support it, we also modify
arch/arm/mm/dma-mapping.c for handling highmem address.
2) Why there is no totalhigh_pages variable define in the case of configI don't know. it's just defined in case of highmem. that's reason to
use #ifdef/endif. we don't know hisotrical reason.
+ if (PageHighMem(page))
+ totalhigh_pages += pageblock_nr_pages;
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>