From: Russ Anderson <rja@sgi.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tony Luck <tony.luck@intel.com>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 3/3] ia64: Call migration code on correctable errors v6
Date: Wed, 25 Jun 2008 22:25:53 +0000 [thread overview]
Message-ID: <20080625222553.GA29402@sgi.com> (raw)
In-Reply-To: <20080623121721.37CA.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Mon, Jun 23, 2008 at 12:25:40PM +0900, KOSAKI Motohiro wrote:
> Hi
>
> > +static ssize_t
> > +badpage_show(struct kobject *kobj,
> > + struct kobj_attribute *attr, char *buf)
> > +
> > +{
> > + struct page *page, *page2;
> > + int i = 0, cnt = 0;
> > + char *bufend = buf + PAGE_SIZE;
> > +
> > + cnt = snprintf(buf, bufend - (buf + cnt),
> > + "Bad RAM: %d kB, %d pages marked bad\n"
> > + "List of bad physical pages\n",
> > + total_badpages << (PAGE_SHIFT - 10), total_badpages);
> > +
> > + list_for_each_entry_safe(page, page2, &badpagelist, lru) {
> > + if (bufend - (buf + cnt) < 20)
> > + break; /* Avoid overflowing the buffer */
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt),
> > + " 0x%011lx", page_to_phys(page));
> > + if (!(++i % 5))
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> > + }
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> > +
> > + return cnt;
> > +}
>
> it seems /proc/meminfo is better.
> because badpage is architecture independent concept.
>
> nonsense?
The original patch used /proc/ (/proc/meminfo had badpage summary info
and /proc/badram had detailed info. It was suggested that /sys was
a better place.
FWIW, I'm more than happy to put it anywhere deemed "best" by
the community. It is currently /sys/kernel/badram.
Thanks,
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
WARNING: multiple messages have this Message-ID (diff)
From: Russ Anderson <rja@sgi.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Tony Luck <tony.luck@intel.com>,
Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 3/3] ia64: Call migration code on correctable errors v6
Date: Wed, 25 Jun 2008 17:25:53 -0500 [thread overview]
Message-ID: <20080625222553.GA29402@sgi.com> (raw)
In-Reply-To: <20080623121721.37CA.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Mon, Jun 23, 2008 at 12:25:40PM +0900, KOSAKI Motohiro wrote:
> Hi
>
> > +static ssize_t
> > +badpage_show(struct kobject *kobj,
> > + struct kobj_attribute *attr, char *buf)
> > +
> > +{
> > + struct page *page, *page2;
> > + int i = 0, cnt = 0;
> > + char *bufend = buf + PAGE_SIZE;
> > +
> > + cnt = snprintf(buf, bufend - (buf + cnt),
> > + "Bad RAM: %d kB, %d pages marked bad\n"
> > + "List of bad physical pages\n",
> > + total_badpages << (PAGE_SHIFT - 10), total_badpages);
> > +
> > + list_for_each_entry_safe(page, page2, &badpagelist, lru) {
> > + if (bufend - (buf + cnt) < 20)
> > + break; /* Avoid overflowing the buffer */
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt),
> > + " 0x%011lx", page_to_phys(page));
> > + if (!(++i % 5))
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> > + }
> > + cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> > +
> > + return cnt;
> > +}
>
> it seems /proc/meminfo is better.
> because badpage is architecture independent concept.
>
> nonsense?
The original patch used /proc/ (/proc/meminfo had badpage summary info
and /proc/badram had detailed info. It was suggested that /sys was
a better place.
FWIW, I'm more than happy to put it anywhere deemed "best" by
the community. It is currently /sys/kernel/badram.
Thanks,
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
next prev parent reply other threads:[~2008-06-25 22:25 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 0:44 [PATCH 3/3] ia64: Call migration code on correctable errors v2 Russ Anderson
2008-05-02 0:44 ` Russ Anderson
2008-05-02 1:22 ` Christoph Lameter
2008-05-02 1:22 ` Christoph Lameter
2008-05-02 2:43 ` Russ Anderson
2008-05-02 2:43 ` Russ Anderson
2008-05-02 9:58 ` Pekka Enberg
2008-05-02 9:58 ` Pekka Enberg
2008-05-02 16:40 ` Russ Anderson
2008-05-02 16:40 ` Russ Anderson
2008-05-02 16:57 ` Pekka J Enberg
2008-05-02 16:57 ` Pekka J Enberg
2008-05-02 17:30 ` Russ Anderson
2008-05-02 17:30 ` Russ Anderson
2008-05-02 17:45 ` Andi Kleen
2008-05-02 17:45 ` Andi Kleen
2008-05-02 18:50 ` Russ Anderson
2008-05-02 18:50 ` Russ Anderson
2008-05-02 19:33 ` Andi Kleen
2008-05-02 19:33 ` Andi Kleen
2008-05-02 20:27 ` Russ Anderson
2008-05-02 20:27 ` Russ Anderson
2008-05-09 15:11 ` [PATCH 3/3] ia64: Call migration code on correctable errors v3 Russ Anderson
2008-05-09 15:11 ` Russ Anderson
2008-05-09 20:52 ` Andrew Morton
2008-05-09 20:52 ` Andrew Morton
2008-05-09 21:03 ` Christoph Lameter
2008-05-09 21:03 ` Christoph Lameter
2008-05-09 21:07 ` Russ Anderson
2008-05-09 21:07 ` Russ Anderson
2008-05-13 23:05 ` [PATCH 3/3] ia64: Call migration code on correctable errors v4 Russ Anderson
2008-05-13 23:05 ` Russ Anderson
2008-05-16 19:23 ` [PATCH 3/3] ia64: Call migration code on correctable errors v5 Russ Anderson
2008-05-16 19:23 ` Russ Anderson
2008-05-16 23:15 ` Christoph Lameter
2008-05-16 23:15 ` Christoph Lameter
2008-06-09 16:20 ` [PATCH 3/3] ia64: Call migration code on correctable errors v6 Russ Anderson
2008-06-09 16:20 ` Russ Anderson
2008-06-23 3:25 ` KOSAKI Motohiro
2008-06-23 3:25 ` KOSAKI Motohiro
2008-06-25 22:25 ` Russ Anderson [this message]
2008-06-25 22:25 ` Russ Anderson
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=20080625222553.GA29402@sgi.com \
--to=rja@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.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.