Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757557AbbBFVlV (ORCPT ); Fri, 6 Feb 2015 16:41:21 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:60184 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754731AbbBFVlU (ORCPT ); Fri, 6 Feb 2015 16:41:20 -0500 Message-ID: <54D534FB.1090101@codeaurora.org> Date: Fri, 06 Feb 2015 13:41:15 -0800 From: Laura Abbott User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gregory Fong CC: Florian Fainelli , Russell King , Kees Cook , Nicolas Pitre , Catalin Marinas , open list , Yalin Wang , "linux-arm-kernel@lists.infradead.org" , vishnu.ps@samsung.com, Marek Szyprowski Subject: Re: [PATCH] ARM: print cma-reserved pages from show_mem References: <1423092164-9145-1-git-send-email-gregory.0xf0@gmail.com> <54D40DAF.4080609@codeaurora.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2439 Lines: 70 On 2/6/2015 1:14 PM, Gregory Fong wrote: > On Thu, Feb 5, 2015 at 4:41 PM, Laura Abbott wrote: >> On 2/4/2015 3:22 PM, Gregory Fong wrote: >>> >>> Add cma reserved information to the ARM-specific show_mem. It was >>> added to the generic implementation by commit >>> 49abd8c28046adf77c5ce1949549aa64d7221881 "lib/show_mem.c: add cma >>> reserved information". >>> >>> Signed-off-by: Gregory Fong >>> --- >>> arch/arm/mm/init.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c >>> index 2495c8c..da77507 100644 >>> --- a/arch/arm/mm/init.c >>> +++ b/arch/arm/mm/init.c >>> @@ -22,6 +22,7 @@ >>> #include >>> #include >>> #include >>> +#include >>> >>> #include >>> #include >>> @@ -130,6 +131,9 @@ void show_mem(unsigned int filter) >>> printk("%d pages of RAM\n", total); >>> printk("%d free pages\n", free); >>> printk("%d reserved pages\n", reserved); >>> +#ifdef CONFIG_CMA >>> + printk("%lu cma reserved pages\n", totalcma_pages); >>> +#endif >> >> >> Nit: 'cma reserved pages' is a bit unclear. Are there some CMA >> pages that aren't reserved? Dropping the reserved might be >> clearer. > > Sure, I was trying to replicate what's in lib/show_mem.c, but it > doesn't actually make much sense. Maybe it would be better to change > to "cma pages" here and change the wording in that lib/show_mem.c too. > > I'll wait a bit for any other thoughts and send out a v2 with those changes. > So it looks like the lib/show_mem.c does something different #ifdef CONFIG_CMA printk("%lu pages reserved\n", (reserved - totalcma_pages)); printk("%lu pages cma reserved\n", totalcma_pages); #else printk("%lu pages reserved\n", reserved); #endif No need to change the name, instead I'd say fix up arm to match what the generic showmem is doing. Thanks, Laura -- Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/