All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Barry K. Nathan" <barryn@pobox.com>
Cc: Valdis.Kletnieks@vt.edu, Andrew Morton <akpm@osdl.org>,
	arjan@linux.intel.com, linux-kernel@vger.kernel.org,
	reiserfs-dev@namesys.com, Hans Reiser <reiser@namesys.com>
Subject: Re: 2.6.17-rc5-mm3: bad unlock ordering (reiser4?)
Date: Mon, 5 Jun 2006 08:54:44 +0200	[thread overview]
Message-ID: <20060605065444.GA27445@elte.hu> (raw)
In-Reply-To: <986ed62e0606041503v701f8882la4cbead47ae3982f@mail.gmail.com>


* Barry K. Nathan <barryn@pobox.com> wrote:

> Assuming it's a false positive: Since this stops the tracer, it means 
> that if an actual deadlock possibility is detected later [I'm assuming 
> that detection of those doesn't get shut down by the bad-lock-ordering 
> detection either], useful information could be missing from 
> /proc/latency_trace, [...]

reporting the first one only is necessary, because the validator cannot 
trust a system's dependency info that it sees as incorrect. Deadlock 
possibilities are quite rare in a kernel that is "in balance". Right now 
we are not "in balance" yet, because the validator has only been added a 
couple of days ago. The flurry of initial fixes will die down quickly.

you can fix the reiser4 false positive (it's likely a false positive) by 
changing the spin_unlock() to spin_unlock_non_nested(). The patch below 
should do that for this specific instance.

Ob'Reiser4'Cleanup:

	spin_unlock(&(mgr->tmgr_lock));

why isnt that:

	spin_unlock(&mgr->tmgr_lock);

? fs/reiser4/*.c is infested with that, the string '(&(' occurs 199 (!) 
times.

also:

        if (atomic_read(&node->d_count) != 0) {
                return 0;
        }

why the braces, when on the next line it's not done:

        if (blocknr_is_fake(jnode_get_block(node)))
                return 0;

it looks quite inconsistent. Also, just a quick look at just about any 
file in reiser4/*.c shows alot of other coding style inconsistencies.

	Ingo

Index: linux/fs/reiser4/txnmgr.h
===================================================================
--- linux.orig/fs/reiser4/txnmgr.h
+++ linux/fs/reiser4/txnmgr.h
@@ -613,7 +613,7 @@ static inline void spin_unlock_txnmgr(tx
 	LOCK_CNT_DEC(spin_locked_txnmgr);
 	LOCK_CNT_DEC(spin_locked);
 
-	spin_unlock(&(mgr->tmgr_lock));
+	spin_unlock_non_nested(&(mgr->tmgr_lock));
 }
 
 typedef enum {

  parent reply	other threads:[~2006-06-05  6:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-04 12:04 2.6.17-rc5-mm3: bad unlock ordering (reiser4?) Barry K. Nathan
2006-06-04 14:00 ` Barry K. Nathan
2006-06-04 20:33 ` Andrew Morton
2006-06-04 20:56   ` Valdis.Kletnieks
2006-06-04 21:34     ` Ingo Molnar
2006-06-04 22:03       ` Barry K. Nathan
2006-06-05  2:46         ` Hans Reiser
2006-06-05  6:54         ` Ingo Molnar [this message]
2006-06-05  7:37           ` Ingo Molnar
2006-06-05 11:22             ` Alexander Zarochentsev
2006-06-05 12:50               ` Ingo Molnar
2006-06-05 23:56                 ` Hans Reiser
2006-06-05  7:58           ` Barry K. Nathan
2006-06-05  8:12             ` Ingo Molnar
2006-06-05  9:00               ` Barry K. Nathan
2006-06-09 21:39               ` Hans Reiser
2006-06-09 21:36           ` Hans Reiser

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=20060605065444.GA27445@elte.hu \
    --to=mingo@elte.hu \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=barryn@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiser@namesys.com \
    --cc=reiserfs-dev@namesys.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.