public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: Don Mullis <dwm@meer.net>
Cc: akpm <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2 -mm] fault-injection: lightweight code-coverage maximizer
Date: Tue, 28 Nov 2006 18:18:11 +0900	[thread overview]
Message-ID: <20061128091811.GA2004@APFDCB5C> (raw)
In-Reply-To: <1164700290.2894.93.camel@localhost.localdomain>

On Mon, Nov 27, 2006 at 11:51:30PM -0800, Don Mullis wrote:
> Allow all non-unique call stacks, as judged by pushed sequence of EIPs,
> to be to be ignored as failure candidates.
> 
> Upon keying in
> 	echo 1 >probability
> 	echo 3 >verbose
> 	echo -1 >times
> a few dozen stacks are printk'ed, then system responsiveness
> recovers to normal.  Similarly, starting a non-trivial program
> will print a few stacks before responsiveness recovers.

What kind of test did you do?

> Intent is to make code-coverage-maximizing test lightweight, perhaps
> light enough to remain enabled during the course of the developer's
> interactive testing of new code.
> 
> Enabled by default. (/debug/fail*/stacktrace-depth > 0)

This doesn't maximize code coverage. It makes fault-injector reject
any failures which have same stacktrace before.

So it should not be default.

> +static bool fail_uniquestack(struct fault_attr *attr)
> +{
> +	u32 oldhash;
> +	u32 newhash;
> +	uint offset = 0;
> +
> +	newhash = unique_stack_p(attr);
> +
> +	for ( oldhash = newhash; oldhash != 0; offset++) {
> +		oldhash = atomic_xchg(
> +			&attr->uniquestack_hash_table[
> +				(newhash+offset)%ARRAY_SIZE(attr->uniquestack_hash_table)],
> +			oldhash);
> +		if (oldhash == newhash)
> +			return false;
> +		if (offset >= ARRAY_SIZE(attr->uniquestack_hash_table)) {
> +			printk(KERN_NOTICE
> +			       "FAULT_INJECTION: table overflow -- "
> +			       "fault injection disabled\n");
> +			return false;
> +		}
> +	}

Updating array in this way is not safe (SMP or interrupt).


  reply	other threads:[~2006-11-28  9:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28  7:44 [PATCH 1/2 -mm] fault-injection: safer defaults, trivial optimization, cleanup Don Mullis
2006-11-28  7:51 ` [PATCH 2/2 -mm] fault-injection: lightweight code-coverage maximizer Don Mullis
2006-11-28  9:18   ` Akinobu Mita [this message]
2006-11-28 20:14     ` Don Mullis
2006-11-29  2:37       ` Akinobu Mita
2006-11-29 19:47         ` Don Mullis
2006-11-28 21:37 ` [PATCH 1/2 -mm] fault-injection: safer defaults, trivial optimization, cleanup Andrew Morton
2006-11-28 22:50   ` Don Mullis
2006-11-29  0:05     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061128091811.GA2004@APFDCB5C \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@osdl.org \
    --cc=dwm@meer.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox