login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
23
Re: [PATCH 3/3] ia64: Call migration code on correctable errors v6
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: KOSAKI Motohiro
Subject:
Re: [PATCH 3/3] ia64: Call migration code on correctable errors v6
Date: Sunday, June 22, 2008 - 8:25 pm
Hi
quoted text
> +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? --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 3/3] ia64: Call migration code on correctable errors v6
, Russ Anderson
, (Mon Jun 9, 9:20 am)
Re: [PATCH 3/3] ia64: Call migration code on correctable e ...
, KOSAKI Motohiro
, (Sun Jun 22, 8:25 pm)
Re: [PATCH 3/3] ia64: Call migration code on correctable e ...
, Russ Anderson
, (Wed Jun 25, 3:25 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Dave Jones
Re: OT: character encodings (was: Linux 2.6.20-rc4)
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 23/36] PM: Convert wakeup flag accessors to inline functions
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
James Henstridge
Re: VCS comparison table
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Claudio Jeker
Re: Vlan Tag on Vlan Tag (l2tunneling)
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Tomas Bodzar
bsd: uvm_mapent_alloc: out of static map entries
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Linux Kernel Mailing List
[ARM] 5185/1: Fix spi num_chipselect for lubbock
Linux Kernel Mailing List
swsusp: provide users with a hint about the no_console_suspend option
Colocation donated by:
Syndicate