From: Wu Fengguang <fengguang.wu@intel.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH] proc: export more page flags in /proc/kpageflags
Date: Thu, 16 Apr 2009 12:43:06 +0800 [thread overview]
Message-ID: <20090416044306.GA21153@localhost> (raw)
In-Reply-To: <20090416035443.GH14687@one.firstfloor.org>
On Thu, Apr 16, 2009 at 11:54:43AM +0800, Andi Kleen wrote:
> On Thu, Apr 16, 2009 at 10:41:33AM +0800, Wu Fengguang wrote:
> > On Wed, Apr 15, 2009 at 09:57:49PM +0800, Andi Kleen wrote:
> > > > That's pretty good separations. I guess it would be convenient to make the
> > > > extra kernel flags available under CONFIG_DEBUG_KERNEL?
> > >
> > > Yes.
> > >
> > > BTW an alternative would be just someone implementing a suitable
> > > command/macro in crash(1) and tell the kernel hackers to run that on
> > > /proc/kcore. That would have the advantage to not require code.
> >
> > Hmm, that would be horrible to code/maintain. i
>
> Actually the bits are enums and crash is able to read C type
> information.
Great! That dismissed my main concern with crash.
> > One major purpose of
> > /proc/kpageflags is to export the unstable kernel page flag bits as
> > stable ones to user space.
>
> That's the first case ("administrator"), but not the second one
> ("kernel hacker")
>
> BTW not saying that crash is the best solution for this, but
> it's certainly an serious alternative for the kernel hacker
> case.
OK.
> > Note that the exact internal flag bits can
> > not only change slowly with kernel versions, but more likely with
> > different kconfig combinations.
>
> Really? The numbers should be the same, at least for a given
> architecture with 32bit/64bit.
For example, the presence of CONFIG_PAGEFLAGS_EXTENDED will shift
all the following flag bits by 1.
#ifdef CONFIG_PAGEFLAGS_EXTENDED
PG_head, /* A head page */
PG_tail, /* A tail page */
#else
PG_compound, /* A compound page */
#endif
PG_swapcache, /* Swap page: swp_entry_t in private */
PG_mappedtodisk, /* Has blocks allocated on-disk */
PG_reclaim, /* To be reclaimed asap */
PG_buddy, /* Page is free, on buddy lists */
PG_swapbacked, /* Page is backed by RAM/swap */
#ifdef CONFIG_UNEVICTABLE_LRU
PG_unevictable, /* Page is "unevictable" */
#endif
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
PG_mlocked, /* Page is vma mlocked */
#endif
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
PG_uncached, /* Page has been mapped as uncached */
#endif
__NR_PAGEFLAGS,
> > Followed are their detailed locations. Did we found a bug? ;-)
>
> I think all pages > 0 in a larger page are tails. But I don't
> claim to understand all the finer details of compound pages.
Right. Tail pages will outnumber head pages. But I found that the
tail page _ranges_ greatly outnumber head pages. There should be
exactly one tail page range for one head page.
Thanks,
Fengguang
--
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-04-16 4:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 4:22 [RFC][PATCH] proc: export more page flags in /proc/kpageflags Wu Fengguang
2009-04-14 4:36 ` Wu Fengguang
2009-04-14 4:37 ` KOSAKI Motohiro
2009-04-14 6:41 ` Wu Fengguang
2009-04-14 6:54 ` KOSAKI Motohiro
2009-04-14 7:11 ` Andi Kleen
2009-04-14 7:17 ` KOSAKI Motohiro
2009-04-15 13:18 ` Wu Fengguang
2009-04-15 13:57 ` Andi Kleen
2009-04-16 2:41 ` Wu Fengguang
2009-04-16 3:54 ` Andi Kleen
2009-04-16 4:43 ` Wu Fengguang [this message]
2009-04-16 2:26 ` KOSAKI Motohiro
2009-04-16 3:49 ` Wu Fengguang
2009-04-16 6:30 ` Wu Fengguang
2009-04-23 2:26 ` [RFC][PATCH] proc: export more page flags in /proc/kpageflags (take 3) Wu Fengguang
2009-04-23 7:48 ` Andi Kleen
2009-04-23 8:10 ` Wu Fengguang
2009-04-23 8:54 ` Andi Kleen
2009-04-23 11:21 ` Wu Fengguang
2009-04-25 1:59 ` Wu Fengguang
2009-04-14 7:22 ` [RFC][PATCH] proc: export more page flags in /proc/kpageflags Wu Fengguang
2009-04-14 7:42 ` KOSAKI Motohiro
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=20090416044306.GA21153@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=kosaki.motohiro@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).