Re: [PATCH v2 1/2] mm: cma: split cma-reserved in dmesg log

From: Michal Nazarewicz
Date: Fri Oct 24 2014 - 12:33:11 EST


>> On Wed, Oct 22 2014, Pintu Kumar wrote:
>>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>>> index dd73f9a..ababbd8 100644
>>> --- a/mm/page_alloc.c
>>> +++ b/mm/page_alloc.c
>>> @@ -110,6 +110,7 @@ static DEFINE_SPINLOCK(managed_page_count_lock);
>>>
>>> unsigned long totalram_pages __read_mostly;
>>> unsigned long totalreserve_pages __read_mostly;
>>> +unsigned long totalcma_pages __read_mostly;
>>
>> Move this to cma.c.

On Fri, Oct 24 2014, PINTU KUMAR <pintu.k@xxxxxxxxxxx> wrote:
> In our earlier patch (first version), we added it in cmc.c itself.
> But, Andrew wanted this variable to be visible in non-CMA case as well to avoid build error, when we use
> this variable in mem_init_print_info, without CONFIG_CMA.
> So, we moved it to page_alloc.c

If you add

+#ifdef CONFIG_CMA
+extern unsigned long totalcma_pages;
+#else
+# define totalcma_pages 0UL
+#endif

to linux/cma.h the variable will get replaced with a constant zero if
!CONFIG_CMA.

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, MichaÅ âmina86â Nazarewicz (o o)
ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/