linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch 14/15] mm/vmstat.c: walk the zone in pageblock_nr_pages steps
@ 2017-11-30 22:15 akpm
  2017-12-01  7:44 ` Joonsoo Kim
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2017-11-30 22:15 UTC (permalink / raw)
  To: linux-mm, akpm, zhongjiang, iamjoonsoo.kim

From: zhong jiang <zhongjiang@huawei.com>
Subject: mm/vmstat.c: walk the zone in pageblock_nr_pages steps

when walking the zone, we can happens to the holes. we should not
align MAX_ORDER_NR_PAGES, so it can skip the normal memory.

In addition, pagetypeinfo_showmixedcount_print reflect fragmentization.
we hope to get more accurate data. therefore, I decide to fix it.

Link: http://lkml.kernel.org/r/1469502526-24486-2-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_owner.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/page_owner.c~mm-walk-the-zone-in-pageblock_nr_pages-steps mm/page_owner.c
--- a/mm/page_owner.c~mm-walk-the-zone-in-pageblock_nr_pages-steps
+++ a/mm/page_owner.c
@@ -274,7 +274,7 @@ void pagetypeinfo_showmixedcount_print(s
 	 */
 	for (; pfn < end_pfn; ) {
 		if (!pfn_valid(pfn)) {
-			pfn = ALIGN(pfn + 1, MAX_ORDER_NR_PAGES);
+			pfn = ALIGN(pfn + 1, pageblock_nr_pages);
 			continue;
 		}
 
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 14/15] mm/vmstat.c: walk the zone in pageblock_nr_pages steps
  2017-11-30 22:15 [patch 14/15] mm/vmstat.c: walk the zone in pageblock_nr_pages steps akpm
@ 2017-12-01  7:44 ` Joonsoo Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Joonsoo Kim @ 2017-12-01  7:44 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, zhongjiang

On Thu, Nov 30, 2017 at 02:15:55PM -0800, akpm@linux-foundation.org wrote:
> From: zhong jiang <zhongjiang@huawei.com>
> Subject: mm/vmstat.c: walk the zone in pageblock_nr_pages steps
> 
> when walking the zone, we can happens to the holes. we should not
> align MAX_ORDER_NR_PAGES, so it can skip the normal memory.

Even if this change is applied, we could skip the normal memory in
some corner cases.

However, pagetypeinfo_showblockcount_print() that is highly related to
this function also jumps to the next pageblock when it found invalid
pfn so this patch make the code more consistent.

Therefore,

Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-01  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 22:15 [patch 14/15] mm/vmstat.c: walk the zone in pageblock_nr_pages steps akpm
2017-12-01  7:44 ` Joonsoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).