From: lauraa@codeaurora.org (Laura Abbott)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: print cma-reserved pages from show_mem
Date: Fri, 06 Feb 2015 13:41:15 -0800 [thread overview]
Message-ID: <54D534FB.1090101@codeaurora.org> (raw)
In-Reply-To: <CADtm3G7ROX4CrxSKRvTKcjqCiX=uJQZ=Q5izH8pS61z4jfumLg@mail.gmail.com>
On 2/6/2015 1:14 PM, Gregory Fong wrote:
> On Thu, Feb 5, 2015 at 4:41 PM, Laura Abbott <lauraa@codeaurora.org> 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 <gregory.0xf0@gmail.com>
>>> ---
>>> 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 <linux/memblock.h>
>>> #include <linux/dma-contiguous.h>
>>> #include <linux/sizes.h>
>>> +#include <linux/cma.h>
>>>
>>> #include <asm/cp15.h>
>>> #include <asm/mach-types.h>
>>> @@ -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
WARNING: multiple messages have this Message-ID (diff)
From: Laura Abbott <lauraa@codeaurora.org>
To: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Kees Cook <keescook@chromium.org>,
Nicolas Pitre <nico@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
open list <linux-kernel@vger.kernel.org>,
Yalin Wang <Yalin.Wang@sonymobile.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
vishnu.ps@samsung.com,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] ARM: print cma-reserved pages from show_mem
Date: Fri, 06 Feb 2015 13:41:15 -0800 [thread overview]
Message-ID: <54D534FB.1090101@codeaurora.org> (raw)
In-Reply-To: <CADtm3G7ROX4CrxSKRvTKcjqCiX=uJQZ=Q5izH8pS61z4jfumLg@mail.gmail.com>
On 2/6/2015 1:14 PM, Gregory Fong wrote:
> On Thu, Feb 5, 2015 at 4:41 PM, Laura Abbott <lauraa@codeaurora.org> 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 <gregory.0xf0@gmail.com>
>>> ---
>>> 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 <linux/memblock.h>
>>> #include <linux/dma-contiguous.h>
>>> #include <linux/sizes.h>
>>> +#include <linux/cma.h>
>>>
>>> #include <asm/cp15.h>
>>> #include <asm/mach-types.h>
>>> @@ -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
next prev parent reply other threads:[~2015-02-06 21:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 23:22 [PATCH] ARM: print cma-reserved pages from show_mem Gregory Fong
2015-02-04 23:22 ` Gregory Fong
2015-02-06 0:41 ` Laura Abbott
2015-02-06 0:41 ` Laura Abbott
2015-02-06 21:14 ` Gregory Fong
2015-02-06 21:14 ` Gregory Fong
2015-02-06 21:41 ` Laura Abbott [this message]
2015-02-06 21:41 ` Laura Abbott
2015-02-09 19:55 ` Gregory Fong
2015-02-09 19:55 ` Gregory Fong
2015-02-10 11:32 ` Russell King - ARM Linux
2015-02-10 11:32 ` Russell King - ARM Linux
2015-03-23 9:08 ` Gregory Fong
2015-03-23 9:08 ` Gregory Fong
2015-03-25 11:49 ` Mel Gorman
2015-03-25 11:49 ` Mel Gorman
2015-03-26 11:46 ` Russell King - ARM Linux
2015-03-26 11:46 ` Russell King - ARM Linux
2015-03-26 12:30 ` Mel Gorman
2015-03-26 12:30 ` Mel Gorman
2015-03-26 13:22 ` Russell King - ARM Linux
2015-03-26 13:22 ` Russell King - ARM Linux
2015-03-26 13:47 ` Mel Gorman
2015-03-26 13:47 ` Mel Gorman
2015-04-10 4:36 ` Gregory Fong
2015-04-10 4:36 ` Gregory Fong
2015-04-10 5:18 ` Wang, Yalin
2015-04-10 5:18 ` Wang, Yalin
2015-04-10 11:24 ` Russell King - ARM Linux
2015-04-10 11:24 ` Russell King - ARM Linux
2015-04-13 1:09 ` Gregory Fong
2015-04-13 1:09 ` Gregory Fong
2015-04-13 1:21 ` Gregory Fong
2015-04-13 1:21 ` Gregory Fong
2015-04-13 9:56 ` Russell King - ARM Linux
2015-04-13 9:56 ` Russell King - ARM Linux
2015-04-13 10:04 ` Mel Gorman
2015-04-13 10:04 ` Mel Gorman
2015-04-13 10:05 ` Russell King - ARM Linux
2015-04-13 10:05 ` Russell King - ARM Linux
2015-04-13 12:29 ` Gregory Fong
2015-04-13 12:29 ` Gregory Fong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54D534FB.1090101@codeaurora.org \
--to=lauraa@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.