public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv3 2/3] batman-adv: Remove unnecessary hardif_list_lock
Date: Mon, 2 May 2011 21:15:47 +0200	[thread overview]
Message-ID: <201105022115.48413.sven@narfation.org> (raw)
In-Reply-To: <20110502171645.GB12500@Sellars>

[-- Attachment #1: Type: Text/Plain, Size: 2435 bytes --]

Linus Lüssing wrote:
> Looks quite good and seems to make sense to avoid the
> double-locking. Tested it here and together with patch 1/3 fixes
> the initial issue, too.
> 
> Just one minor thing:
> ----
> [58518.225154] batman_adv: bat0: The MTU of interface eth1 is too
> small (1500) to handle the transport of batman-adv packets.
> Packets going over this interface will be fragmented on layer2
> which could impact the performance. Setting the MTU to 1527 would
> solve the problem.
> [58518.278111] RTNL: assertion failed at
> /home/mesh-node/incoming/batman-adv-git-builddir/hard-interface.c
> (136)
> [58518.293167] Pid: 6366, comm: bash Not tainted 2.6.38+ #4
> [58518.299142] Call Trace:
> [58518.300953]  [<f8cb91f3>] primary_if_select+0x2f/0x9f
> [batman_adv]
> [58518.447844]  [<f8cb8e9c>] ? rcu_read_unlock+0x1c/0x1e
> [batman_adv]
> [58518.452572]  [<f8cb9146>] ? primary_if_get_selected+0x6a/0x71
> [batman_adv]
> [58518.455759]  [<f8cb92c6>] hardif_activate_interface+0x63/0x91
> [batman_adv]
> [58518.459168]  [<f8cb98e4>] hardif_enable_interface+0x1cc/0x21e
> [batman_adv]
> [58518.462481]  [<f8cb7bca>] store_mesh_iface+0xed/0x113
> [batman_adv]
> [58518.465564]  [<f8cb7add>] ? store_aggregated_ogms+0x28/0x28
> [batman_adv]
> [58518.468714]  [<c11e1121>] kobj_attr_store+0x1a/0x22
> [58518.472277]  [<c11481dc>] sysfs_write_file+0xbc/0xe7
> [58518.613128]  [<c1148120>] ? sysfs_open_file+0x205/0x205
> [58518.616400]  [<c10ff7a7>] vfs_write+0x84/0xde
> [58518.660437]  [<c10ff89a>] sys_write+0x3b/0x60
> [58518.667248]  [<c151fd9d>] syscall_call+0x7/0xb
> [58518.672117] batman_adv: bat0: Interface activated: eth1
> ----
> 
> So maybe it makes sense to add the assertion in
> primary_if_select() in patch 3/3 instead?

No, the problem is that I changed the patch after I noticed that it wasn't 
made for the current master - and only tested after all patches were applied. 
I would like to add rtnl_lock/rtnl_unlock around primary_if_get_selected() 
instead.

> Hmm, and I'm wondering if it might make sense to also document it
> with a little comment above the struct list_head hardif_list;,
> like:
> /* List additions and deletions have to be rtnl_lock()'ed,
>  * list traversals just rcu-locked */
> (or is that overdoing it?)

Ok, will steal this comment from your mail - ok, change it slightly to present 
it as my own work.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-05-02 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-30 16:56 [B.A.T.M.A.N.] [PATCHv2 1/3] batman-adv: Fix crash on module shutdown with multiple ifaces Sven Eckelmann
2011-04-30 16:56 ` [B.A.T.M.A.N.] [PATCHv2 2/3] batman-adv: Remove unnecessary hardif_list_lock Sven Eckelmann
2011-04-30 20:54   ` [B.A.T.M.A.N.] [PATCHv3 " Sven Eckelmann
2011-05-02 17:16     ` Linus Lüssing
2011-05-02 19:15       ` Sven Eckelmann [this message]
2011-04-30 16:57 ` [B.A.T.M.A.N.] [PATCHv2 3/3] batman-adv: Avoid deadlock between rtnl_lock and s_active Sven Eckelmann
2011-05-02 17:27   ` Linus Lüssing
2011-05-02 18:05     ` Linus Lüssing

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=201105022115.48413.sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.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