This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[RFC 2/5] Memory subsystem fault injection tapset
- From: Anup C Shan <anupcshan at gmail dot com>
- To: systemtap at sources dot redhat dot com
- Cc: kghoshnitk at gmail dot com, akinobu dot mita at gmail dot com, k-tanaka at ce dot jp dot nec dot com
- Date: Fri, 11 Jul 2008 15:36:44 +0530
- Subject: [RFC 2/5] Memory subsystem fault injection tapset
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=NyQYA2kBJyBb17WvSzTpoQfc0Ft59jgv06kAanleWo4=; b=WsM8HByRCNct8K3JiLEqjPogkD+leaU37G+hUfF44alldQoZtN8bvhGkDGBEPDqNAc y1YJ6J6JjX2nruWQiugxJb2qAMs5gI4nQppvWSD1Lu57PRyzsiJaWWbgV1lpasyoSrN0 yfWDYrfPmmX2Up+gj/s2tbzyXg9deK5yUiEvI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=LC5dGQeXxBTKBVZ4JKa86VtSclKEYGl41uNIocGgtRHRvMMiKQaO1fjACjCdggygP1 z8ZEiBgaKki2aHCY+VFUB5KGQ9SiO/905CkkO1vPeEF1UUf7nb0xbBJka+jbnzPxKF3q N9aLrRifbCwnuZxZx5Uvf3kETywI/qQZjE9TE=
- References: <48773047.1050906@gmail.com>
/*
* This tapset contains functions and parameters specific to the
* memory management subsystem of the kernel.
*/
function fij_add_gfp_wait_param()
{
fij_add_option("ignore_gfp_wait",1,
"inject failures only into non-sleep allocations")
}
function fij_get_gfp_wait()
%{
THIS->__retvalue = __GFP_WAIT;
%}
function fij_should_fail_gfp_wait(flags:long)
{
GFPWAIT = fij_get_gfp_wait()
if (fij_params["ignore_gfp_wait"] == 1) {
if (flags&GFPWAIT) {
fij_logger(100,
sprintf("Skipping on ignore_gfp_wait %d",
flags&GFPWAIT))
return 0
} else
fij_logger(100,
sprintf("Continuing on ignore_gfp_wait %d",
flags&GFPWAIT))
}
return 1
}
function fij_add_gfp_highmem_param()
{
fij_add_option("ignore_gfp_highmem",1,
"1 => inject failures highmem/user allocations")
}
function fij_get_gfp_highmem()
%{
THIS->__retvalue = __GFP_HIGHMEM;
%}
function fij_should_fail_gfp_highmem(flags:long)
{
GFPHIGHMEM = fij_get_gfp_highmem()
if (fij_params["ignore_gfp_highmem"] == 1) {
if (flags&GFPHIGHMEM) {
fij_logger(100,
sprintf("Skipping on ignore_gfp_highmem %d",
flags&GFPHIGHMEM))
return 0
} else
fij_logger(100,
sprintf("Continuing on ignore_gfp_highmem %d"
,flags&GFPHIGHMEM))
}
return 1
}