From: Johannes Weiner <hannes@cmpxchg.org>
To: Gavin Shan <shangw@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mm/buddy: dump PG_compound_lock page flag
Date: Mon, 14 May 2012 22:51:34 +0200 [thread overview]
Message-ID: <20120514205134.GD1406@cmpxchg.org> (raw)
In-Reply-To: <1336991213-9149-1-git-send-email-shangw@linux.vnet.ibm.com>
On Mon, May 14, 2012 at 06:26:53PM +0800, Gavin Shan wrote:
> The array pageflag_names[] is doing the conversion from page flag
> into the corresponding names so that the meaingful string again
> the corresponding page flag can be printed. The mechniasm is used
> while dumping the specified page frame. However, the array missed
> PG_compound_lock. So PG_compound_lock page flag would be printed
> as ditigal number instead of meaningful string.
>
> The patch fixes that and print "compound_lock" for PG_compound_lock
> page flag.
>
> Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
This on top?
---
From: Johannes Weiner <hannes@cmpxchg.org>
Subject: [patch] mm: page_alloc: catch out-of-date list of page flag names
String tables with names of enum items are always prone to go out of
sync with the enums themselves. Ensure during compile time that the
name table of page flags has the same size as the page flags enum.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9325913..65ae58d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5986,6 +5986,8 @@ static void dump_page_flags(unsigned long flags)
unsigned long mask;
int i;
+ BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) - 1 != __NR_PAGEFLAGS);
+
printk(KERN_ALERT "page flags: %#lx(", flags);
/* remove zone id */
--
1.7.10.1
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-05-14 20:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 10:26 [PATCH] mm/buddy: dump PG_compound_lock page flag Gavin Shan
2012-05-14 20:51 ` Johannes Weiner [this message]
2012-05-15 9:21 ` Gavin Shan
2012-05-15 22:18 ` Andrew Morton
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=20120514205134.GD1406@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shangw@linux.vnet.ibm.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 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.