All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Free the reserved memblock when free cma pages
@ 2014-09-09  6:13 Wang, Yalin
  2014-09-10  8:18 ` Michal Hocko
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Wang, Yalin @ 2014-09-09  6:13 UTC (permalink / raw)
  To: 'mhocko@suse.cz', 'linux-mm@kvack.org',
	'akpm@linux-foundation.org',
	mm-commits, hughd, b.zolnierkie

This patch add memblock_free to also free the reserved memblock,
so that the cma pages are not marked as reserved memory in
/sys/kernel/debug/memblock/reserved debug file

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
---
 mm/cma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/cma.c b/mm/cma.c
index c17751c..f3ec756 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -114,6 +114,8 @@ static int __init cma_activate_area(struct cma *cma)
 				goto err;
 		}
 		init_cma_reserved_pageblock(pfn_to_page(base_pfn));
+		memblock_free(__pfn_to_phys(base_pfn),
+				pageblock_nr_pages * PAGE_SIZE);
 	} while (--i);
 
 	mutex_init(&cma->lock);
-- 
2.1.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-09-15  7:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09  6:13 [RFC] Free the reserved memblock when free cma pages Wang, Yalin
2014-09-10  8:18 ` Michal Hocko
2014-09-10  9:02   ` Wang, Yalin
2014-09-12  9:35 ` Marek Szyprowski
2014-09-15  3:06   ` Joonsoo Kim
2014-09-15  5:21 ` Minchan Kim
2014-09-15  5:36   ` Wang, Yalin
2014-09-15  5:42     ` Minchan Kim
2014-09-15  5:46       ` Wang, Yalin
2014-09-15  6:10       ` [RFC V2] " Wang, Yalin
2014-09-15  6:57         ` Minchan Kim
2014-09-15  7:54         ` [PATCH Resend] " Wang, Yalin

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.