public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Use forw_bcast_list_lock	always in disabled interrupt context
Date: Thu, 17 Dec 2009 15:34:47 +0100	[thread overview]
Message-ID: <20091217143447.GA13081@WGT634U> (raw)
In-Reply-To: <20091217122544.GM4648@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]

On Thu, Dec 17, 2009 at 01:25:44PM +0100, Andrew Lunn wrote:
> This reminds me of something i keep intending to do, but never get
> around to.
> 
> It would be nice to have a LOCKING.TXT document, with the following
> Table of Contents.
> 
> 1) What locks we have and what they protect.
> 
> 2) What different contexts different parts of the code run in.
>
> These two sections provide the basis for the following sections.
> 
> 3) Which locking primitives, ie spin_lock() or spin_lock_irqsave()
> should be used for each lock.
> 
> 4) A list of what order locks should be taken in, when taking multiple
> locks, so as to avoid deadlocks.

Yes, would be nice to have something like that, but Simon will change some of
the stuff with the next (maybe not deadlocking) patch to remove the big
b.a.t.m.a.n. lock. And I heard that Simon also wanted to change the way the
packets get send... which probably changes context of each lock.

> When finding this bug, did you take any notes etc, which could
> contribute to such a document?

Sry, I have no notes. I was just sitting next to Marek while discussing what we
can do to provide a better working situation for you. This patch was just used
to test the changes to git-svn and the pre-commit hooks of svn. The patch was
only produced using the help of much to less sleep and some developer tea.

The documentation about the context in which each lock/function is used isn't
really there for the kernel. As there are some upcoming changes we should wait
until they are submitted. They should be generated while checking for new
deadlocks introduced by them.

Best regards,
	Sven

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2009-12-17 14:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 12:11 [B.A.T.M.A.N.] [PATCH] batman-adv: Use forw_bcast_list_lock always in disabled interrupt context Sven Eckelmann
2009-12-17 12:25 ` Andrew Lunn
2009-12-17 14:34   ` Sven Eckelmann [this message]
2009-12-17 14:47     ` Sven Eckelmann
2009-12-17 13:11 ` Marek Lindner

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=20091217143447.GA13081@WGT634U \
    --to=sven.eckelmann@gmx.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    /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