From: Randy Dunlap <randy.dunlap@oracle.com>
To: Alex Chiang <achiang@hp.com>
Cc: akpm@linux-foundation.org, Haicheng Li <haicheng.li@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andi Kleen <andi@firstfloor.org>,
fengguang.wu@intel.com
Subject: Re: [PATCH] page-types: kernel pageflags mode
Date: Fri, 4 Dec 2009 14:17:33 -0800 [thread overview]
Message-ID: <20091204141733.b756039c.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20091204212606.29258.98531.stgit@bob.kio>
On Fri, 04 Dec 2009 14:29:48 -0700 Alex Chiang wrote:
> An earlier commit taught page-types the -d|--describe argument, which
> allows the user to describe page flags passed on the command line:
>
> # ./Documentation/vm/page-types -d 0x4000
> 0x0000000000004000 ______________b___________________ swapbacked
>
> In -d mode, page-types expects the page flag bits in the order generated
> by the kernel function get_uflags().
>
> However, those bits are rearranged compared to what is actually stored
> in struct page->flags. A kernel developer dumping a page's flags
> using printk, e.g., may get misleading results in -d mode.
>
> Teach page-types the -k mode, which parses and describes the bits in
> the internal kernel order:
>
> # ./Documentation/vm/page-types -k 0x4000
> 0x0000000000004000 ______________H_________ compound_head
>
> Note that the recommended way to build page-types is from the top-level
> kernel source directory. This ensures that it will get the same CONFIG_*
> defines used to build the kernel source.
>
> # make Documentation/vm/
>
> The implication is that attempting to use page-types -k on a kernel
> with different CONFIG_* settings may lead to surprising and misleading
> results. To retain sanity, always use the page-types built out of the
> kernel tree you are actually testing.
>
> Cc: fengguang.wu@intel.com
> Cc: Haicheng Li <haicheng.li@intel.com>
> Cc: Andi Kleen <andi@firstfloor.org>
> Cc: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Alex Chiang <achiang@hp.com>
> ---
>
> Applies on top of mmotm.
>
> Documentation/vm/Makefile | 2 +
> Documentation/vm/page-types.c | 117 +++++++++++++++++++++++++++++++++++++++--
> 2 files changed, 113 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile
> index 5bd269b..1bebc43 100644
> --- a/Documentation/vm/Makefile
> +++ b/Documentation/vm/Makefile
> @@ -1,6 +1,8 @@
> # kbuild trick to avoid linker error. Can be omitted if a module is built.
> obj- := dummy.o
>
> +HOSTCFLAGS_page-types.o += $(LINUXINCLUDE)
> +
> # List of programs to build
> hostprogs-y := slabinfo page-types
I can ack the Makefile part. Thanks for the patch.
Not that I expect this patch to change for this, but I think that we
need to move tools (like this one) from Documentation/ to tools/ and
possibly move examples from Documentation/ to samples/ or tools/.
---
~Randy
--
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>
next prev parent reply other threads:[~2009-12-04 22:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 21:29 Alex Chiang
2009-12-04 22:17 ` Randy Dunlap [this message]
2009-12-06 3:46 ` [RFC] print symbolic page flag names in bad_page() Wu Fengguang
2009-12-06 23:00 ` Andi Kleen
2009-12-07 2:01 ` Alex Chiang
2009-12-07 2:02 ` Wu Fengguang
2009-12-07 5:38 ` Ingo Molnar
2009-12-07 9:30 ` Mel Gorman
2009-12-16 12:14 ` Wu Fengguang
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=20091204141733.b756039c.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=achiang@hp.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=fengguang.wu@intel.com \
--cc=haicheng.li@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox