mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Shi Weihua <shiwh@cn.fujitsu.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Mel Gorman <mel@csn.ul.ie>, LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] on memoryless node, /proc/pagetypeinfo is displayed slightly funny output.  take2
Date: Tue, 29 Apr 2008 17:17:32 +0900	[thread overview]
Message-ID: <20080429171457.3543.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <4816D881.8060005@cn.fujitsu.com>

> > Index: b/mm/vmstat.c
> > ===================================================================
> > --- a/mm/vmstat.c       2008-04-29 16:48:58.000000000 +0900
> > +++ b/mm/vmstat.c       2008-04-29 16:58:33.000000000 +0900
> > @@ -638,6 +638,10 @@ static int pagetypeinfo_show(struct seq_
> >  {
> >         pg_data_t *pgdat = (pg_data_t *)arg;
> > 
> > +       /* check memoryless ndoe*/
> 
> ndoe -> node ?

Agghhh!
you are right ;-)

fixed version is here.


=================================================================
on memoryless node, /proc/pagetypeinfo is displayed slightly funny output.
this patch fix it.


output example (header is outputed, but no data is outputed)
--------------------------------------------------------------
Page block order: 14
Pages per block:  16384

Free pages count per migrate type at order       0      1      2      3      4      5    \
  6      7      8      9     10     11     12     13     14     15     16

Number of blocks type     Unmovable  Reclaimable      Movable      Reserve      Isolate
Page block order: 14
Pages per block:  16384

Free pages count per migrate type at order       0      1      2      3      4      5    \
  6      7      8      9     10     11     12     13     14     15     16


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
CC: Mel Gorman <mel@csn.ul.ie>
---
 mm/vmstat.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: b/mm/vmstat.c
===================================================================
--- a/mm/vmstat.c       2008-04-29 16:48:58.000000000 +0900
+++ b/mm/vmstat.c       2008-04-29 16:58:33.000000000 +0900
@@ -638,6 +638,10 @@ static int pagetypeinfo_show(struct seq_
 {
        pg_data_t *pgdat = (pg_data_t *)arg;

+       /* check memoryless node */
+       if (!node_state(pgdat->node_id, N_HIGH_MEMORY))
+               return 0;
+
        seq_printf(m, "Page block order: %d\n", pageblock_order);
        seq_printf(m, "Pages per block:  %lu\n", pageblock_nr_pages);
        seq_putc(m, '\n');



  reply	other threads:[~2008-04-29  8:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29  7:40 [PATCH] on memoryless node, /proc/pagetypeinfo is displayed slightly funny output KOSAKI Motohiro
2008-04-29  8:12 ` Shi Weihua
2008-04-29  8:17   ` KOSAKI Motohiro [this message]
2008-04-29 10:43     ` [PATCH] on memoryless node, /proc/pagetypeinfo is displayed slightly funny output. take2 Mel Gorman
2008-04-29 11:11       ` 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=20080429171457.3543.KOSAKI.MOTOHIRO@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=shiwh@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®