From: Mel Gorman <mgorman@suse.de>
To: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Laura Abbott <lauraa@codeaurora.org>,
Florian Fainelli <f.fainelli@gmail.com>,
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>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] ARM: print cma-reserved pages from show_mem
Date: Wed, 25 Mar 2015 11:49:45 +0000 [thread overview]
Message-ID: <20150325114945.GK4701@suse.de> (raw)
In-Reply-To: <CADtm3G64rPf7O76xUbLwqsqTkJxdGJMT9sHj810xPuThDA0ddg@mail.gmail.com>
On Mon, Mar 23, 2015 at 02:08:12AM -0700, Gregory Fong wrote:
> Hello,
>
> On Tue, Feb 10, 2015 at 3:32 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Mon, Feb 09, 2015 at 11:55:54AM -0800, Gregory Fong wrote:
> >> On Fri, Feb 6, 2015 at 1:41 PM, Laura Abbott <lauraa@codeaurora.org> wrote:
> >> > 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.
> >>
> >> The trouble is that lib/show_mem.c and ARM's show_mem use the
> >> 'reserved' variable to hold different info, which was not a problem I
> >> was aiming to tackle here, and am not sure I understand what's going
> >> on well enough to do so. But let's give it a shot:
> >>
> >> In lib/show_mem.c, reserved is calculated by iterating over all online
> >> nodes, then increasing reserved by (zone->present_pages -
> >> zone->managed_pages). This count includes CMA pages and so when
> >> reserved pages is printed it should be 'reserved' - totalcma_pages, as
> >> it currently is.
> >
> > So, some digging is needed into why the generic version is different.
> > You have to remember that many of the algorithms for this kind of thing
> > were based on the x86 implementation, so differences like this are
> > probably down to ARM being annoyingly overlooked or ignored when generic
> > changes happen.
> >
>
> Revisiting this finally, it looks like this was changed by Mel about a
> year and a half ago in commit c78e93630d15b5f5774213aad9bdc9f52473a89b
> "mm: do not walk all of system memory during show_mem"[1], which
> removes the pfn walk and gets this info from struct zone instead,
> saving a lot of time. Is there any reason to not to change the ARM
> show_mem to do this as well?
I did not read through this thread and only see this mail but AFAIK,
the same change should be safe on ARM. I simply had no means of testing
ARM changes and the problem only affected large machines. For all I knew,
ARM developers really cared about the accuracy of this information so I
played it safe.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2015-03-25 11:49 UTC|newest]
Thread overview: 21+ 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-06 0:41 ` Laura Abbott
2015-02-06 21:14 ` Gregory Fong
2015-02-06 21:41 ` Laura Abbott
2015-02-09 19:55 ` Gregory Fong
2015-02-10 11:32 ` Russell King - ARM Linux
2015-03-23 9:08 ` Gregory Fong
2015-03-25 11:49 ` Mel Gorman [this message]
2015-03-26 11:46 ` Russell King - ARM Linux
2015-03-26 12:30 ` Mel Gorman
2015-03-26 13:22 ` Russell King - ARM Linux
2015-03-26 13:47 ` Mel Gorman
2015-04-10 4:36 ` Gregory Fong
2015-04-10 5:18 ` Wang, Yalin
2015-04-10 11:24 ` Russell King - ARM Linux
2015-04-13 1:09 ` Gregory Fong
2015-04-13 1:21 ` Gregory Fong
2015-04-13 9:56 ` Russell King - ARM Linux
2015-04-13 10:04 ` Mel Gorman
2015-04-13 10:05 ` Russell King - ARM Linux
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=20150325114945.GK4701@suse.de \
--to=mgorman@suse.de \
--cc=Yalin.Wang@sonymobile.com \
--cc=catalin.marinas@arm.com \
--cc=f.fainelli@gmail.com \
--cc=gregory.0xf0@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=keescook@chromium.org \
--cc=lauraa@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=nico@linaro.org \
--cc=vishnu.ps@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox