From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7840 invoked by alias); 11 Jul 2008 10:08:21 -0000 Received: (qmail 7831 invoked by uid 22791); 11 Jul 2008 10:08:20 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ti-out-0910.google.com (HELO ti-out-0910.google.com) (209.85.142.189) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jul 2008 10:07:49 +0000 Received: by ti-out-0910.google.com with SMTP id y6so1766240tia.18 for ; Fri, 11 Jul 2008 03:07:47 -0700 (PDT) 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= Received: by 10.110.41.17 with SMTP id o17mr5881672tio.18.1215770866726; Fri, 11 Jul 2008 03:07:46 -0700 (PDT) Received: from ?9.124.35.39? ( [59.145.136.1]) by mx.google.com with ESMTPS id 14sm758179tim.16.2008.07.11.03.07.42 (version=SSLv3 cipher=RC4-MD5); Fri, 11 Jul 2008 03:07:45 -0700 (PDT) Message-ID: <487730B4.5070106@gmail.com> Date: Fri, 11 Jul 2008 10:08:00 -0000 From: Anup C Shan User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: systemtap@sources.redhat.com CC: kghoshnitk@gmail.com, akinobu.mita@gmail.com, k-tanaka@ce.jp.nec.com Subject: [RFC 2/5] Memory subsystem fault injection tapset References: <48773047.1050906@gmail.com> In-Reply-To: <48773047.1050906@gmail.com> Content-Type: multipart/mixed; boundary="------------030506050703050505060101" X-Virus-Checked: Checked by ClamAV on sourceware.org Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00140.txt.bz2 This is a multi-part message in MIME format. --------------030506050703050505060101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1 --------------030506050703050505060101 Content-Type: text/plain; name="mm-faultinject.stp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mm-faultinject.stp" Content-length: 1270 /* * 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 } --------------030506050703050505060101--