All of lore.kernel.org
 help / color / mirror / Atom feed
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 (take 3)
Date: Thu, 23 Apr 2009 16:10:47 +0800	[thread overview]
Message-ID: <20090423081047.GA18898@localhost> (raw)
In-Reply-To: <20090423074848.GJ13896@one.firstfloor.org>

On Thu, Apr 23, 2009 at 03:48:48PM +0800, Andi Kleen wrote:
> On Thu, Apr 23, 2009 at 10:26:25AM +0800, Wu Fengguang wrote:
> > Andi and KOSAKI: can we hopefully reach harmony of opinions on this version?
> 
> Haven't read the patch sorry, just comments on the text.
> 
> > 
> > Export 9 page flags in /proc/kpageflags, and 8 more for kernel developers.
> > 
> > 1) for kernel hackers (on CONFIG_DEBUG_KERNEL)
> >    - all available page flags are exported, and
> >    - exported as is
> 
> So the interface changes based on that option? That would
> be unfortunate if true.

To be exact, it's "extend the view" on CONFIG_DEBUG_KERNEL.  The
meanings won't change, you simply see more flags that didn't turn up
when !CONFIG_DEBUG_KERNEL.

> > 2) for admins and end users
> >    - only the more `well known' flags are exported:
> > 	11. KPF_MMAP		(pseudo flag) memory mapped page
> > 	12. KPF_ANON		(pseudo flag) memory mapped page (anonymous)
> > 	13. KPF_SWAPCACHE	page is in swap cache
> > 	14. KPF_SWAPBACKED	page is swap/RAM backed
> > 	15. KPF_COMPOUND_HEAD	(*)
> > 	16. KPF_COMPOUND_TAIL	(*)
> > 	17. KPF_UNEVICTABLE	page is in the unevictable LRU list
> > 	18. KPF_POISON		hardware detected corruption
> > 	19. KPF_NOPAGE		(pseudo flag) no page frame at the address
> 
> I think DIRTY should be in that list.

It has been there.  ERROR, DIRTY and ACTIVE were exported at the time
this interface was initially introduced:

        #define KPF_LOCKED              0
==>     #define KPF_ERROR               1
        #define KPF_REFERENCED          2
        #define KPF_UPTODATE            3
==>     #define KPF_DIRTY               4
        #define KPF_LRU                 5
==>     #define KPF_ACTIVE              6
        #define KPF_SLAB                7
        #define KPF_WRITEBACK           8
        #define KPF_RECLAIM             9
        #define KPF_BUDDY               10

> > 
> > 	(*) For compound pages, exporting _both_ head/tail info enables
> > 	    users to tell where a compound page starts/ends, and its order.
> > 
> >    - limit flags to their typical usage scenario, as indicated by KOSAKI:
> > 	- LRU pages: only export relevant flags
> > 		- PG_lru
> > 		- PG_unevictable
> > 		- PG_active
> 
> And active too because it's already exported in /proc/meminfo

ditto
 
> > 		- PG_dirty
> > 		- PG_uptodate
> > 		- PG_writeback
> > 	- SLAB pages: mask out overloaded flags:
> > 		- PG_error
> 
> Error should be exported too, it has straight forward semantics 
> and could be useful to the admin.

ditto
 
> > 	- admins may wonder where all the compound pages gone - the use of
> > 	  compound pages in SLUB might have some real world relevance, so that
> > 	  end users want to be aware of this behavior
> 
> I'm not sure why it uses compound pages at all. It would be nicer
> if compound pages were limited to huge pages, and then start/tail
> wouldn't be needed.

Good idea.

Would you recommend a good way to identify huge pages?
Test by page order, or by (dtor == free_huge_page)?      

Thanks,
Fengguang

WARNING: multiple messages have this Message-ID (diff)
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 (take 3)
Date: Thu, 23 Apr 2009 16:10:47 +0800	[thread overview]
Message-ID: <20090423081047.GA18898@localhost> (raw)
In-Reply-To: <20090423074848.GJ13896@one.firstfloor.org>

On Thu, Apr 23, 2009 at 03:48:48PM +0800, Andi Kleen wrote:
> On Thu, Apr 23, 2009 at 10:26:25AM +0800, Wu Fengguang wrote:
> > Andi and KOSAKI: can we hopefully reach harmony of opinions on this version?
> 
> Haven't read the patch sorry, just comments on the text.
> 
> > 
> > Export 9 page flags in /proc/kpageflags, and 8 more for kernel developers.
> > 
> > 1) for kernel hackers (on CONFIG_DEBUG_KERNEL)
> >    - all available page flags are exported, and
> >    - exported as is
> 
> So the interface changes based on that option? That would
> be unfortunate if true.

To be exact, it's "extend the view" on CONFIG_DEBUG_KERNEL.  The
meanings won't change, you simply see more flags that didn't turn up
when !CONFIG_DEBUG_KERNEL.

> > 2) for admins and end users
> >    - only the more `well known' flags are exported:
> > 	11. KPF_MMAP		(pseudo flag) memory mapped page
> > 	12. KPF_ANON		(pseudo flag) memory mapped page (anonymous)
> > 	13. KPF_SWAPCACHE	page is in swap cache
> > 	14. KPF_SWAPBACKED	page is swap/RAM backed
> > 	15. KPF_COMPOUND_HEAD	(*)
> > 	16. KPF_COMPOUND_TAIL	(*)
> > 	17. KPF_UNEVICTABLE	page is in the unevictable LRU list
> > 	18. KPF_POISON		hardware detected corruption
> > 	19. KPF_NOPAGE		(pseudo flag) no page frame at the address
> 
> I think DIRTY should be in that list.

It has been there.  ERROR, DIRTY and ACTIVE were exported at the time
this interface was initially introduced:

        #define KPF_LOCKED              0
==>     #define KPF_ERROR               1
        #define KPF_REFERENCED          2
        #define KPF_UPTODATE            3
==>     #define KPF_DIRTY               4
        #define KPF_LRU                 5
==>     #define KPF_ACTIVE              6
        #define KPF_SLAB                7
        #define KPF_WRITEBACK           8
        #define KPF_RECLAIM             9
        #define KPF_BUDDY               10

> > 
> > 	(*) For compound pages, exporting _both_ head/tail info enables
> > 	    users to tell where a compound page starts/ends, and its order.
> > 
> >    - limit flags to their typical usage scenario, as indicated by KOSAKI:
> > 	- LRU pages: only export relevant flags
> > 		- PG_lru
> > 		- PG_unevictable
> > 		- PG_active
> 
> And active too because it's already exported in /proc/meminfo

ditto
 
> > 		- PG_dirty
> > 		- PG_uptodate
> > 		- PG_writeback
> > 	- SLAB pages: mask out overloaded flags:
> > 		- PG_error
> 
> Error should be exported too, it has straight forward semantics 
> and could be useful to the admin.

ditto
 
> > 	- admins may wonder where all the compound pages gone - the use of
> > 	  compound pages in SLUB might have some real world relevance, so that
> > 	  end users want to be aware of this behavior
> 
> I'm not sure why it uses compound pages at all. It would be nicer
> if compound pages were limited to huge pages, and then start/tail
> wouldn't be needed.

Good idea.

Would you recommend a good way to identify huge pages?
Test by page order, or by (dtor == free_huge_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>

  reply	other threads:[~2009-04-23  8:11 UTC|newest]

Thread overview: 44+ 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:22 ` Wu Fengguang
2009-04-14  4:36 ` Wu Fengguang
2009-04-14  4:37 ` KOSAKI Motohiro
2009-04-14  4:37   ` KOSAKI Motohiro
2009-04-14  6:41   ` Wu Fengguang
2009-04-14  6:41     ` Wu Fengguang
2009-04-14  6:54     ` KOSAKI Motohiro
2009-04-14  6:54       ` KOSAKI Motohiro
2009-04-14  7:11       ` Andi Kleen
2009-04-14  7:11         ` Andi Kleen
2009-04-14  7:17         ` KOSAKI Motohiro
2009-04-14  7:17           ` KOSAKI Motohiro
2009-04-15 13:18         ` Wu Fengguang
2009-04-15 13:18           ` Wu Fengguang
2009-04-15 13:57           ` Andi Kleen
2009-04-15 13:57             ` Andi Kleen
2009-04-16  2:41             ` Wu Fengguang
2009-04-16  2:41               ` Wu Fengguang
2009-04-16  3:54               ` Andi Kleen
2009-04-16  3:54                 ` Andi Kleen
2009-04-16  4:43                 ` Wu Fengguang
2009-04-16  4:43                   ` Wu Fengguang
2009-04-16  2:26           ` KOSAKI Motohiro
2009-04-16  2:26             ` KOSAKI Motohiro
2009-04-16  3:49             ` Wu Fengguang
2009-04-16  3:49               ` Wu Fengguang
2009-04-16  6:30               ` 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  2:26               ` Wu Fengguang
2009-04-23  7:48               ` Andi Kleen
2009-04-23  7:48                 ` Andi Kleen
2009-04-23  8:10                 ` Wu Fengguang [this message]
2009-04-23  8:10                   ` Wu Fengguang
2009-04-23  8:54                   ` Andi Kleen
2009-04-23  8:54                     ` Andi Kleen
2009-04-23 11:21                     ` Wu Fengguang
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:22         ` Wu Fengguang
2009-04-14  7:42         ` KOSAKI Motohiro
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=20090423081047.GA18898@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 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.