linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/4] memcg: add support for hwpoison testing
@ 2009-08-31 10:26 Wu Fengguang
  2009-08-31 10:26 ` [RFC][PATCH 1/4] memcg: show memory.id in cgroupfs Wu Fengguang
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Wu Fengguang @ 2009-08-31 10:26 UTC (permalink / raw)
  To: Balbir Singh
  Cc: Andi Kleen, Andrew Morton, LKML, KAMEZAWA Hiroyuki,
	KOSAKI Motohiro, Rik van Riel, Mel Gorman, lizf, nishimura,
	menage, linux-mm

Hi all,

In hardware poison testing, we want to inject hwpoison errors to pages
of a collection of selected tasks, so that random tasks (eg. init) won't
be killed in stress tests and lead to test failure.

Memory cgroup provides an ideal tool for tracking and testing these target
process pages. All we have to do is to
- export the memory cgroup id via cgroupfs
- export two functions/structs for hwpoison_inject.c

This might be an unexpected usage of memory cgroup. The last patch and this
script demonstrates how the exported interfaces are to be used to limit the
scope of hwpoison injection.

	test -d /cgroup/hwpoison && rmdir /cgroup/hwpoison
	mkdir /cgroup/hwpoison

	usemem -m 100 -s 100 &   # eat 100MB and sleep 100s
	echo `pidof usemem` > /cgroup/hwpoison/tasks

==>     memcg_id=$(</cgroup/hwpoison/memory.id)
==>     echo $memcg_id > /debug/hwpoison/corrupt-filter-memcg

	# hwpoison all pfn
	pfn=0
	while true
	do      
		let pfn=pfn+1
		echo $pfn > /debug/hwpoison/corrupt-pfn
		if [ $? -ne 0 ]; then
			break
		fi
	done

Comments are welcome, thanks!

Cheers,
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>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-09-02  2:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31 10:26 [RFC][PATCH 0/4] memcg: add support for hwpoison testing Wu Fengguang
2009-08-31 10:26 ` [RFC][PATCH 1/4] memcg: show memory.id in cgroupfs Wu Fengguang
2009-08-31 10:26 ` [RFC][PATCH 2/4] memcg: rename and export try_get_mem_cgroup_from_page() Wu Fengguang
2009-08-31 10:26 ` [RFC][PATCH 3/4] memcg: add accessor to mem_cgroup.css Wu Fengguang
2009-08-31 10:26 ` [RFC][PATCH 4/4] HWPOISON: memory cgroup based hwpoison injection filtering Wu Fengguang
2009-08-31 12:49 ` [RFC][PATCH 0/4] memcg: add support for hwpoison testing Balbir Singh
2009-08-31 12:59   ` Wu Fengguang
2009-08-31 23:46 ` KAMEZAWA Hiroyuki
2009-09-01  2:25   ` Wu Fengguang
2009-09-01  2:32     ` KAMEZAWA Hiroyuki
2009-09-01  6:46       ` Wu Fengguang
2009-09-01  7:12         ` KAMEZAWA Hiroyuki
2009-09-01  8:55           ` Wu Fengguang
2009-09-01 16:31             ` Balbir Singh
2009-09-02  2:47               ` Wu Fengguang

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).