+ free-the-reserved-memblock-when-free-cma-pages.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/cma.c: free the reserved memblock when free cma pages
has been added to the -mm tree.  Its filename is
     free-the-reserved-memblock-when-free-cma-pages.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/free-the-reserved-memblock-when-free-cma-pages.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/free-the-reserved-memblock-when-free-cma-pages.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Wang, Yalin" <Yalin.Wang@xxxxxxxxxxxxxx>
Subject: mm/cma.c: free the reserved memblock when free cma pages

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

Marek said:

: When cma_activate_area() is called noone should use memblock to allocate
: memory, but it is ok to call memblock_free() to update memblock
: statistics, so users won't be confused by cma entries in
: /sys/kernel/debug/memblock/reserved file.

Signed-off-by: Yalin Wang <yalin.wang@xxxxxxxxxxxxxx>
Acked-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/cma.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN mm/cma.c~free-the-reserved-memblock-when-free-cma-pages mm/cma.c
--- a/mm/cma.c~free-the-reserved-memblock-when-free-cma-pages
+++ a/mm/cma.c
@@ -115,6 +115,8 @@ static int __init cma_activate_area(stru
 				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);
_

Patches currently in -mm which might be from Yalin.Wang@xxxxxxxxxxxxxx are

free-the-reserved-memblock-when-free-cma-pages.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux