linux - Page migration fails from CMA(contiguous memory allocator) area -
i facing problem cma. trying allocate device memory through cma(contiguous memory allocation) arm based target board running linux 3.8 kernel.
while requesting memory allocation through private cma node, results "no memin cma area". eventhough have reserved required memory. while debugging "_alloc_contig_migrate_range" function found migration of pages failed , resulted in no mem in cma area.
while pages satisfying following condition in "migrate_page_move_mapping(migrate.c)" function being migrated.
if (!mapping) { /* anonymous page without mapping */ if (page_count(page) != 1) { return -eagain; } return migratepage_success; }
other pages fail , returns in migrate_page_move_mapping()
if (page_count(page) != expected_count || radix_tree_deref_slot_protected(pslot, &mapping->tree_lock) != page) { spin_unlock_irq(&mapping->tree_lock); return -eagain; }
whereas page_count(page) -->3 , expected_count-->2 doesnt match , hence returns -eagain repeatedly.
while looking @ page flags found following diffrence in flags.
migration success-> 0xc3a40059
migration fail-> 0xc3a0000d
diff in flags
observation flags--> pg_dirty pg_active pg_swapbacked pg_referenced
migration success----> set set set notset
migration fails------> notset notset notset set
any suggestion helpful.
Comments
Post a Comment