lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 0/4] memcg: add support for hwpoison testing
On Mon, Aug 31, 2009 at 08:49:20PM +0800, Balbir Singh wrote:
> * Wu Fengguang <fengguang.wu@intel.com> [2009-08-31 18:26:40]:
>
> > 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!
> >
>
> I took a quick look and the patches seem OKAY to me, but I have
> question, can't we do all of this from user space? The bits about
> id export and import the ids look like they can be replaced by names
> in user space.

You mean to match by cgrp->dentry->d_name.name in kernel hwpoison_inject.c
and do this in user space?

DIR_NAME=hwpoison
mkdir /cgroup/$DIR_NAME
echo $DIR_NAME > /debug/hwpoison/corrupt-filter-memcg

Looks like a good idea!

Thanks,
Fengguang


\
 
 \ /
  Last update: 2009-08-31 15:03    [W:0.531 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site