Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] NET: slip, fix ldisc->open retval
From: Alan Cox @ 2011-05-08 18:25 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: matvejchikov, Jeff Dike, Linux Netdev List
In-Reply-To: <4DC6D4CF.2080006@hartkopp.net>

> Looks reasonable to me.

Ditto
> 
> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>

> Alan?

Acked-by: Alan Cox <alan@linux.intel.com>

^ permalink raw reply

* Re: [PATCH] NET: slip, fix ldisc->open retval
From: Oliver Hartkopp @ 2011-05-08 17:37 UTC (permalink / raw)
  To: matvejchikov, Alan Cox, Jeff Dike; +Cc: Linux Netdev List
In-Reply-To: <BANLkTinWqaoMNHbOb5PbZzewQafWhBfY4Q@mail.gmail.com>

On 06.05.2011 18:23, Matvejchikov Ilya wrote:
> TTY layer expects 0 if the ldisc->open operation succeeded.
> 
> Signed-off-by : Matvejchikov Ilya <matvejchikov@gmail.com>
> ---
>  drivers/net/slip.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/slip.c b/drivers/net/slip.c
> index 86cbb9e..8ec1a9a 100644
> --- a/drivers/net/slip.c
> +++ b/drivers/net/slip.c
> @@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *tty)
>  	/* Done.  We have linked the TTY line to a channel. */
>  	rtnl_unlock();
>  	tty->receive_room = 65536;	/* We don't flow control */
> -	return sl->dev->base_addr;
> +
> +	/* TTY layer expects 0 on success */
> +	return 0;
> 
>  err_free_bufs:
>  	sl_free_bufs(sl);

sl->dev->base_addr holds the index into the pointer array of the slip devices.
This is a value >= 0.

The return values of tty_ldisc_open in drivers/tty/tty_ldisc.c are checking
for errors with '< 0' but in some cases they check for '!= 0' which is
correctly addressed in this patch.

Looks reasonable to me.

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>

Alan?

There is also a slip_open() in arch/um/drivers/slip_user.c which also returns
positive numbers (filedescriptors) having the same issue ... Jeff?

Once this patch is accepted, i would send a similar patch for
drivers/net/can/slcan.c too.

Regards,
Oliver

^ permalink raw reply

* [PATCHv6 2/2] tg3: Allow ethtool to enable/disable loopback.
From: Mahesh Bandewar @ 2011-05-08 16:51 UTC (permalink / raw)
  To: Matt Carlson, David Miller
  Cc: netdev, Michael Chan, Tom Herbert, Mahesh Bandewar
In-Reply-To: <1304749117-1989-1-git-send-email-maheshb@google.com>

This patch adds tg3_set_features() to handle loopback mode. Currently the
capability is added for the devices which support internal MAC loopback mode.
So when enabled, it enables internal-MAC loopback.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
Changes since v5:
 (a) Removed TG3_FLAG_LOOPBACK_ENABLED flag.

Changes since v4:
 (a) Added TG3_FLAG_LOOPBACK_ENABLED flag to keep loopback state in driver's 
     private data-structure.
 (b) Corrected the loopback implementation by using tp->mac_mode.
 (c) Forced Link up when in loopback mode. 

Changes since v3:
 (a) Corrected the condition (|| => &&) where loopback capability is added.
 (b) set_features() always returns 0.
 (c) Clear the loopback bit in ndo_open callback to avoid discrepancy.

Changes since v2:
 Implemtned Joe Perches's style change.

Changes since v1:
 Implemented Matt Carlson's suggestions.
  (a) Enable this capability on the devices which are capable of MAC-loopback
      mode.
  (b) check if the device is running before making changes.
  (c) check bits before making changes.

 drivers/net/tg3.c |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 7c7c9a8..9f77533 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3373,8 +3373,8 @@ relink:
 		tg3_phy_copper_begin(tp);
 
 		tg3_readphy(tp, MII_BMSR, &bmsr);
-		if (!tg3_readphy(tp, MII_BMSR, &bmsr) &&
-		    (bmsr & BMSR_LSTATUS))
+		if ((!tg3_readphy(tp, MII_BMSR, &bmsr) && (bmsr & BMSR_LSTATUS)) ||
+		    (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
 			current_link_up = 1;
 	}
 
@@ -6309,6 +6309,42 @@ dma_error:
 	return NETDEV_TX_OK;
 }
 
+static void tg3_set_loopback(struct net_device *dev, u32 features)
+{
+	struct tg3 *tp = netdev_priv(dev);
+
+	if (features & NETIF_F_LOOPBACK) {
+		if (tp->mac_mode & MAC_MODE_PORT_INT_LPBACK)
+			return;
+
+		/*
+		 * Clear MAC_MODE_HALF_DUPLEX or you won't get packets back in
+		 * loopback mode if Half-Duplex mode was negotiated earlier.
+		 */
+		tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX;
+
+		/* Enable internal MAC loopback mode */
+		tp->mac_mode |= MAC_MODE_PORT_INT_LPBACK;
+		spin_lock_bh(&tp->lock);
+		tw32(MAC_MODE, tp->mac_mode);
+		netif_carrier_on(tp->dev);
+		spin_unlock_bh(&tp->lock);
+		netdev_info(dev, "Internal MAC loopback mode enabled.\n");
+	} else {
+		if (!(tp->mac_mode & MAC_MODE_PORT_INT_LPBACK))
+			return;
+
+		/* Disable internal MAC loopback mode */
+		tp->mac_mode &= ~MAC_MODE_PORT_INT_LPBACK;
+		spin_lock_bh(&tp->lock);
+		tw32(MAC_MODE, tp->mac_mode);
+		/* Force link status check */
+		tg3_setup_phy(tp, 1);
+		spin_unlock_bh(&tp->lock);
+		netdev_info(dev, "Internal MAC loopback mode disabled.\n");
+	}
+}
+
 static u32 tg3_fix_features(struct net_device *dev, u32 features)
 {
 	struct tg3 *tp = netdev_priv(dev);
@@ -6319,6 +6355,16 @@ static u32 tg3_fix_features(struct net_device *dev, u32 features)
 	return features;
 }
 
+static int tg3_set_features(struct net_device *dev, u32 features)
+{
+	u32 changed = dev->features ^ features;
+
+	if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
+		tg3_set_loopback(dev, features);
+
+	return 0;
+}
+
 static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp,
 			       int new_mtu)
 {
@@ -9485,6 +9531,13 @@ static int tg3_open(struct net_device *dev)
 
 	netif_tx_start_all_queues(dev);
 
+	/*
+	 * Reset loopback feature if it was turned on while the device was down
+	 * make sure that it's installed properly now.
+	 */
+	if (dev->features & NETIF_F_LOOPBACK)
+		tg3_set_loopback(dev, dev->features);
+
 	return 0;
 
 err_out3:
@@ -15029,6 +15082,7 @@ static const struct net_device_ops tg3_netdev_ops = {
 	.ndo_tx_timeout		= tg3_tx_timeout,
 	.ndo_change_mtu		= tg3_change_mtu,
 	.ndo_fix_features	= tg3_fix_features,
+	.ndo_set_features	= tg3_set_features,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= tg3_poll_controller,
 #endif
@@ -15045,6 +15099,7 @@ static const struct net_device_ops tg3_netdev_ops_dma_bug = {
 	.ndo_do_ioctl		= tg3_ioctl,
 	.ndo_tx_timeout		= tg3_tx_timeout,
 	.ndo_change_mtu		= tg3_change_mtu,
+	.ndo_set_features	= tg3_set_features,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= tg3_poll_controller,
 #endif
@@ -15242,6 +15297,16 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
 	dev->features |= hw_features;
 	dev->vlan_features |= hw_features;
 
+	/*
+	 * Add loopback capability only for a subset of devices that support
+	 * MAC-LOOPBACK. Eventually this need to be enhanced to allow INT-PHY
+	 * loopback for the remaining devices.
+	 */
+	if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5780 &&
+	    !tg3_flag(tp, CPMU_PRESENT))
+		/* Add the loopback capability */
+		dev->hw_features |= NETIF_F_LOOPBACK;
+
 	if (tp->pci_chip_rev_id == CHIPREV_ID_5705_A1 &&
 	    !tg3_flag(tp, TSO_CAPABLE) &&
 	    !(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH)) {
-- 
1.7.3.1


^ permalink raw reply related

* Re: [PATCHv5 2/2] tg3: Allow ethtool to enable/disable loopback.
From: Mahesh Bandewar @ 2011-05-08 16:50 UTC (permalink / raw)
  To: Michał Mirosław
  Cc: Matt Carlson, David Miller, netdev, Michael Chan, Tom Herbert
In-Reply-To: <20110507074321.GB4522@rere.qmqm.pl>

On Sat, May 7, 2011 at 12:43 AM, Michał Mirosław
<mirq-linux@rere.qmqm.pl> wrote:
> On Fri, May 06, 2011 at 11:18:37PM -0700, Mahesh Bandewar wrote:
>> This patch adds tg3_set_features() to handle loopback mode. Currently the
>> capability is added for the devices which support internal MAC loopback mode.
>> So when enabled, it enables internal-MAC loopback.
> [...]
>> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
>> index 7c7c9a8..b7270c2 100644
>> --- a/drivers/net/tg3.c
>> +++ b/drivers/net/tg3.c
> [...]
>> @@ -6319,6 +6356,24 @@ static u32 tg3_fix_features(struct net_device *dev, u32 features)
>>       return features;
>>  }
>>
>> +static int tg3_set_features(struct net_device *dev, u32 features)
>> +{
>> +     struct tg3 *tp = netdev_priv(dev);
>> +     u32 changed = dev->features ^ features;
>> +
>> +     if (changed & NETIF_F_LOOPBACK) {
>> +             if (tg3_flag(tp, LOOPBACK_ENABLED))
>> +                     tg3_flag_clear(tp, LOOPBACK_ENABLED);
>> +             else
>> +                     tg3_flag_set(tp, LOOPBACK_ENABLED);
>> +
>> +             if (netif_running(dev))
>> +                     tg3_set_loopback(dev);
>> +     }
>> +
>> +     return 0;
>> +}
>> +
>>  static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp,
>>                              int new_mtu)
>>  {
>> @@ -9485,6 +9540,13 @@ static int tg3_open(struct net_device *dev)
>>
>>       netif_tx_start_all_queues(dev);
>>
>> +     /*
>> +      * Reset loopback feature if it was turned on while the device was down
>> +      * make sure that it's installed properly now.
>> +      */
>> +     if (tg3_flag(tp, LOOPBACK_ENABLED))
>> +             tg3_set_loopback(dev);
>> +
>>       return 0;
>>
>>  err_out3:
> [...]
>
> So, you've just implemented what I said about enabling loopback at the end
> of tg3_open(), but you also added (redundant) flag that mirrors
> dev->features & NETIF_F_LOOPBACK. Why?
>
I had tried it before but it failed and I thought the device is not
ready at the end of ndo_open call back, but in fact my change itself
was causing the discrepancy in driver's private data structure. This I
found while debugging the change and corrected by using tp->mac_mode
for the current state of that reg instead of reading it from the reg
into a local variable. I agree, as a side effect of this a redundant
flag got created, which I'll remove. Thanks for pointing it out.

Regards,
--mahesh..

> Best Regards,
> Michał Mirosław
>

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 15:48 UTC (permalink / raw)
  To: Alex Bligh; +Cc: Eric Dumazet, netdev
In-Reply-To: <AB9DE9E04289CF29CA79CC67@Ximines.local>

On Sun, May 08, 2011 at 04:17:42PM +0100, Alex Bligh wrote:
> Paul,
> 
> >>No, I waited a few minutes after boot for the system to stabilize, and
> >>all CPUs were definitely online.
> >>
> >>The patch to the kernel I am running is below.
> >
> >OK, interesting...
> >
> >My guess is that you need to be using ktime_get_ts().  Isn't ktime_get()
> >subject to various sorts of adjustment?
> 
> It's Eric's code, not mine, but:
> 
> kernel/time/timekeeping.c suggests they do the same thing
> (adjust xtime by wall_to_monotonic), just one returns a
> struct timespec and the other returns a ktime_t.
> 
> >>>> There is nothing much going on these systems (idle, no other users,
> >>>> just normal system daemons).
> >>>
> >>> And normal system daemons might cause this, right?
> >>
> >>Yes. Everything is normal, except I did
> >>service udev stop
> >>unshare -n bash
> >>which together stop the system running interface scripts when
> >>interfaces are created (as upstart and upstart-udev-bridge are
> >>now integrated, you can't kill upstart, so you have to rely on
> >>unshare -n to stop the events being propagated). That's just
> >>to avoid measuring the time it takes to execute the scripts.
> >
> >OK, so you really could be seeing grace periods started by these system
> >daemons.
> 
> In 50% of 200 calls? That seems pretty unlikely. I think it's more
> likely to be the 6 jiffies per call to ensure cpus are idle,
> plus the 3 calls per interface destroy.
> 
> If 6 jiffies per call to ensure cpus are idle is a fact of life,
> then the question goes back to why interface removal is waiting
> for rcu readers to be released synchronously, as opposed to
> doing the update bits synchronously, then doing the reclaim
> element (freeing the memory) afterwards using call_rcu.

This would speed things up considerably, assuming that there is no
other reason to block for an RCU grace period.

							Thanx, Paul

^ permalink raw reply

* [PATCH 8/8] batman-adv: remove duplicate code from function is_bidirectional_neigh()
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Daniele Furlan <daniele.furlan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

In function is_bidirectional_neigh the code that find out the one hop
neighbor is duplicated.

Signed-off-by: Daniele Furlan <daniele.furlan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/routing.c |   74 +++++++++++++++------------------------------
 1 files changed, 25 insertions(+), 49 deletions(-)

diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 7648b92..bb1c3ec 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -169,65 +169,41 @@ static int is_bidirectional_neigh(struct orig_node *orig_node,
 	uint8_t orig_eq_count, neigh_rq_count, tq_own;
 	int tq_asym_penalty, ret = 0;
 
-	if (orig_node == orig_neigh_node) {
-		rcu_read_lock();
-		hlist_for_each_entry_rcu(tmp_neigh_node, node,
-					 &orig_node->neigh_list, list) {
+	/* find corresponding one hop neighbor */
+	rcu_read_lock();
+	hlist_for_each_entry_rcu(tmp_neigh_node, node,
+				 &orig_neigh_node->neigh_list, list) {
 
-			if (!compare_eth(tmp_neigh_node->addr,
-					 orig_neigh_node->orig))
-				continue;
+		if (!compare_eth(tmp_neigh_node->addr, orig_neigh_node->orig))
+			continue;
 
-			if (tmp_neigh_node->if_incoming != if_incoming)
-				continue;
+		if (tmp_neigh_node->if_incoming != if_incoming)
+			continue;
 
-			if (!atomic_inc_not_zero(&tmp_neigh_node->refcount))
-				continue;
+		if (!atomic_inc_not_zero(&tmp_neigh_node->refcount))
+			continue;
 
-			neigh_node = tmp_neigh_node;
-		}
-		rcu_read_unlock();
+		neigh_node = tmp_neigh_node;
+		break;
+	}
+	rcu_read_unlock();
 
-		if (!neigh_node)
-			neigh_node = create_neighbor(orig_node,
-						     orig_neigh_node,
-						     orig_neigh_node->orig,
-						     if_incoming);
-		if (!neigh_node)
-			goto out;
+	if (!neigh_node)
+		neigh_node = create_neighbor(orig_neigh_node,
+					     orig_neigh_node,
+					     orig_neigh_node->orig,
+					     if_incoming);
 
+	if (!neigh_node)
+		goto out;
+
+	/* if orig_node is direct neighbour update neigh_node last_valid */
+	if (orig_node == orig_neigh_node)
 		neigh_node->last_valid = jiffies;
-	} else {
-		/* find packet count of corresponding one hop neighbor */
-		rcu_read_lock();
-		hlist_for_each_entry_rcu(tmp_neigh_node, node,
-					 &orig_neigh_node->neigh_list, list) {
-
-			if (!compare_eth(tmp_neigh_node->addr,
-					 orig_neigh_node->orig))
-				continue;
-
-			if (tmp_neigh_node->if_incoming != if_incoming)
-				continue;
-
-			if (!atomic_inc_not_zero(&tmp_neigh_node->refcount))
-				continue;
-
-			neigh_node = tmp_neigh_node;
-		}
-		rcu_read_unlock();
-
-		if (!neigh_node)
-			neigh_node = create_neighbor(orig_neigh_node,
-						     orig_neigh_node,
-						     orig_neigh_node->orig,
-						     if_incoming);
-		if (!neigh_node)
-			goto out;
-	}
 
 	orig_node->last_valid = jiffies;
 
+	/* find packet count of corresponding one hop neighbor */
 	spin_lock_bh(&orig_node->ogm_cnt_lock);
 	orig_eq_count = orig_neigh_node->bcast_own_sum[if_incoming->if_num];
 	neigh_rq_count = neigh_node->real_packet_count;
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 7/8] batman-adv: Remove multiline comments from line ending
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

It is slightly irritating that comments after a long line span over
multiple lines without any code. It is easier to put them before the
actual code and reduce the number of lines which the eye has to read.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/main.h           |   40 ++++++++++++++++++++------------------
 net/batman-adv/packet.h         |    3 +-
 net/batman-adv/soft-interface.c |    4 +-
 net/batman-adv/types.h          |   10 ++++----
 4 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 9ef6ef9..148b49e 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -34,16 +34,18 @@
 
 #define TQ_MAX_VALUE 255
 #define JITTER 20
-#define TTL 50			  /* Time To Live of broadcast messages */
 
-#define PURGE_TIMEOUT 200	/* purge originators after time in seconds if no
-				   * valid packet comes in -> TODO: check
-				   * influence on TQ_LOCAL_WINDOW_SIZE */
+ /* Time To Live of broadcast messages */
+#define TTL 50
+
+/* purge originators after time in seconds if no valid packet comes in
+ * -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */
+#define PURGE_TIMEOUT 200
 #define TT_LOCAL_TIMEOUT 3600 /* in seconds */
 
-#define TQ_LOCAL_WINDOW_SIZE 64	  /* sliding packet range of received originator
-				   * messages in squence numbers (should be a
-				   * multiple of our word size) */
+/* sliding packet range of received originator messages in squence numbers
+ * (should be a multiple of our word size) */
+#define TQ_LOCAL_WINDOW_SIZE 64
 #define TQ_GLOBAL_WINDOW_SIZE 5
 #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1
 #define TQ_LOCAL_BIDRECT_RECV_MINIMUM 1
@@ -55,21 +57,20 @@
 
 #define VIS_INTERVAL 5000	/* 5 seconds */
 
-/* how much worse secondary interfaces may be to
- * to be considered as bonding candidates */
-
+/* how much worse secondary interfaces may be to be considered as bonding
+ * candidates */
 #define BONDING_TQ_THRESHOLD	50
 
-#define MAX_AGGREGATION_BYTES 512 /* should not be bigger than 512 bytes or
-				   * change the size of
-				   * forw_packet->direct_link_flags */
+/* should not be bigger than 512 bytes or change the size of
+ * forw_packet->direct_link_flags */
+#define MAX_AGGREGATION_BYTES 512
 #define MAX_AGGREGATION_MS 100
 
 #define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */
 
+/* don't reset again within 30 seconds */
 #define RESET_PROTECTION_MS 30000
 #define EXPECTED_SEQNO_RANGE	65536
-/* don't reset again within 30 seconds */
 
 #define MESH_INACTIVE 0
 #define MESH_ACTIVE 1
@@ -84,12 +85,13 @@
 #ifdef pr_fmt
 #undef pr_fmt
 #endif
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* Append 'batman-adv: ' before
-					     * kernel messages */
+/* Append 'batman-adv: ' before kernel messages */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#define DBG_BATMAN 1	/* all messages related to routing / flooding /
-			 * broadcasting / etc */
-#define DBG_ROUTES 2	/* route or tt entry added / changed / deleted */
+/* all messages related to routing / flooding / broadcasting / etc */
+#define DBG_BATMAN 1
+/* route or tt entry added / changed / deleted */
+#define DBG_ROUTES 2
 #define DBG_ALL 3
 
 
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index c225c3a..eda9965 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -128,8 +128,7 @@ struct vis_packet {
 	uint8_t  entries;	 /* number of entries behind this struct */
 	uint32_t seqno;		 /* sequence number */
 	uint8_t  ttl;		 /* TTL */
-	uint8_t  vis_orig[6];	 /* originator that informs about its
-				  * neighbors */
+	uint8_t  vis_orig[6];	 /* originator that announces its neighbors */
 	uint8_t  target_orig[6]; /* who should receive this packet */
 	uint8_t  sender_orig[6]; /* who sent or rebroadcasted this packet */
 } __packed;
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index d6aaf9f..8e962e3 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -793,8 +793,8 @@ static void interface_setup(struct net_device *dev)
 	 * have not been initialized yet
 	 */
 	dev->mtu = ETH_DATA_LEN;
-	dev->hard_header_len = BAT_HEADER_LEN; /* reserve more space in the
-						* skbuff for our header */
+	/* reserve more space in the skbuff for our header */
+	dev->hard_header_len = BAT_HEADER_LEN;
 
 	/* generate random address */
 	random_ether_addr(dev_addr);
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 6b6c32e..fab70e8 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -89,11 +89,11 @@ struct orig_node {
 	struct hlist_node hash_entry;
 	struct bat_priv *bat_priv;
 	unsigned long last_frag_packet;
-	spinlock_t ogm_cnt_lock; /* protects: bcast_own, bcast_own_sum,
-				  * neigh_node->real_bits,
-				  * neigh_node->real_packet_count */
-	spinlock_t bcast_seqno_lock; /* protects bcast_bits,
-				      *	 last_bcast_seqno */
+	/* ogm_cnt_lock protects: bcast_own, bcast_own_sum,
+	 * neigh_node->real_bits, neigh_node->real_packet_count */
+	spinlock_t ogm_cnt_lock;
+	/* bcast_seqno_lock protects bcast_bits, last_bcast_seqno */
+	spinlock_t bcast_seqno_lock;
 	atomic_t bond_candidates;
 	struct list_head bond_list;
 };
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 6/8] batman-adv: rename everything from *hna* into *tt* (translation table)
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>

To be coherent, all the functions/variables/constants have been renamed
to the TranslationTable style

Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 Documentation/networking/batman-adv.txt |   11 +-
 net/batman-adv/aggregation.c            |   16 +-
 net/batman-adv/aggregation.h            |    4 +-
 net/batman-adv/bat_debugfs.c            |    4 +-
 net/batman-adv/hard-interface.c         |    6 +-
 net/batman-adv/main.c                   |   14 +-
 net/batman-adv/main.h                   |    4 +-
 net/batman-adv/originator.c             |    8 +-
 net/batman-adv/packet.h                 |    2 +-
 net/batman-adv/routing.c                |   70 +++---
 net/batman-adv/routing.h                |    6 +-
 net/batman-adv/send.c                   |   16 +-
 net/batman-adv/send.h                   |    2 +-
 net/batman-adv/soft-interface.c         |   10 +-
 net/batman-adv/translation-table.c      |  415 ++++++++++++++++---------------
 net/batman-adv/translation-table.h      |   24 +-
 net/batman-adv/types.h                  |   24 +-
 net/batman-adv/unicast.c                |    2 +-
 net/batman-adv/vis.c                    |   18 +-
 19 files changed, 329 insertions(+), 327 deletions(-)

diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 18afcd8..713f7c0 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -1,4 +1,4 @@
-[state: 27-01-2011]
+[state: 17-04-2011]
 
 BATMAN-ADV
 ----------
@@ -19,6 +19,7 @@ duce the overhead to a minimum. It does not depend on any (other)
 network driver, and can be used on wifi as well as ethernet  lan,
 vpn,  etc ... (anything with ethernet-style layer 2).
 
+
 CONFIGURATION
 -------------
 
@@ -160,13 +161,13 @@ face.  Each  entry can/has to have the following values:
 -> "TQ mac  value"  -  src mac's link quality towards mac address
                        of a neighbor originator's interface which
                        is being used for routing
--> "HNA mac" - HNA announced by source mac
+-> "TT mac" - TT announced by source mac
 -> "PRIMARY" - this  is a primary interface
 -> "SEC mac" - secondary mac address of source
                (requires preceding PRIMARY)
 
 The TQ value has a range from 4 to 255 with 255 being  the  best.
-The HNA entries are showing which hosts are connected to the mesh
+The TT entries are showing which hosts are connected to the mesh
 via bat0 or being bridged into the mesh network.  The PRIMARY/SEC
 values are only applied on primary interfaces
 
@@ -199,7 +200,7 @@ abled  during run time. Following log_levels are defined:
 
 0 - All  debug  output  disabled
 1 - Enable messages related to routing / flooding / broadcasting
-2 - Enable route or hna added / changed / deleted
+2 - Enable route or tt entry added / changed / deleted
 3 - Enable all messages
 
 The debug output can be changed at runtime  using  the  file
@@ -207,7 +208,7 @@ The debug output can be changed at runtime  using  the  file
 
 # echo 2 > /sys/class/net/bat0/mesh/log_level
 
-will enable debug messages for when routes or HNAs change.
+will enable debug messages for when routes or TTs change.
 
 
 BATCTL
diff --git a/net/batman-adv/aggregation.c b/net/batman-adv/aggregation.c
index c11788c..9b94590 100644
--- a/net/batman-adv/aggregation.c
+++ b/net/batman-adv/aggregation.c
@@ -24,10 +24,10 @@
 #include "send.h"
 #include "routing.h"
 
-/* calculate the size of the hna information for a given packet */
-static int hna_len(struct batman_packet *batman_packet)
+/* calculate the size of the tt information for a given packet */
+static int tt_len(struct batman_packet *batman_packet)
 {
-	return batman_packet->num_hna * ETH_ALEN;
+	return batman_packet->num_tt * ETH_ALEN;
 }
 
 /* return true if new_packet can be aggregated with forw_packet */
@@ -250,7 +250,7 @@ void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff,
 {
 	struct batman_packet *batman_packet;
 	int buff_pos = 0;
-	unsigned char *hna_buff;
+	unsigned char *tt_buff;
 
 	batman_packet = (struct batman_packet *)packet_buff;
 
@@ -259,14 +259,14 @@ void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff,
 		   orig_interval. */
 		batman_packet->seqno = ntohl(batman_packet->seqno);
 
-		hna_buff = packet_buff + buff_pos + BAT_PACKET_LEN;
+		tt_buff = packet_buff + buff_pos + BAT_PACKET_LEN;
 		receive_bat_packet(ethhdr, batman_packet,
-				   hna_buff, hna_len(batman_packet),
+				   tt_buff, tt_len(batman_packet),
 				   if_incoming);
 
-		buff_pos += BAT_PACKET_LEN + hna_len(batman_packet);
+		buff_pos += BAT_PACKET_LEN + tt_len(batman_packet);
 		batman_packet = (struct batman_packet *)
 			(packet_buff + buff_pos);
 	} while (aggregated_packet(buff_pos, packet_len,
-				   batman_packet->num_hna));
+				   batman_packet->num_tt));
 }
diff --git a/net/batman-adv/aggregation.h b/net/batman-adv/aggregation.h
index 0622042..7e6d72f 100644
--- a/net/batman-adv/aggregation.h
+++ b/net/batman-adv/aggregation.h
@@ -25,9 +25,9 @@
 #include "main.h"
 
 /* is there another aggregated packet here? */
-static inline int aggregated_packet(int buff_pos, int packet_len, int num_hna)
+static inline int aggregated_packet(int buff_pos, int packet_len, int num_tt)
 {
-	int next_buff_pos = buff_pos + BAT_PACKET_LEN + (num_hna * ETH_ALEN);
+	int next_buff_pos = buff_pos + BAT_PACKET_LEN + (num_tt * ETH_ALEN);
 
 	return (next_buff_pos <= packet_len) &&
 		(next_buff_pos <= MAX_AGGREGATION_BYTES);
diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c
index 0e9d435..abaeec5 100644
--- a/net/batman-adv/bat_debugfs.c
+++ b/net/batman-adv/bat_debugfs.c
@@ -241,13 +241,13 @@ static int softif_neigh_open(struct inode *inode, struct file *file)
 static int transtable_global_open(struct inode *inode, struct file *file)
 {
 	struct net_device *net_dev = (struct net_device *)inode->i_private;
-	return single_open(file, hna_global_seq_print_text, net_dev);
+	return single_open(file, tt_global_seq_print_text, net_dev);
 }
 
 static int transtable_local_open(struct inode *inode, struct file *file)
 {
 	struct net_device *net_dev = (struct net_device *)inode->i_private;
-	return single_open(file, hna_local_seq_print_text, net_dev);
+	return single_open(file, tt_local_seq_print_text, net_dev);
 }
 
 static int vis_data_open(struct inode *inode, struct file *file)
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 7e2f772..dfbfccc 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -154,10 +154,10 @@ static void primary_if_select(struct bat_priv *bat_priv,
 	primary_if_update_addr(bat_priv);
 
 	/***
-	 * hacky trick to make sure that we send the HNA information via
+	 * hacky trick to make sure that we send the TT information via
 	 * our new primary interface
 	 */
-	atomic_set(&bat_priv->hna_local_changed, 1);
+	atomic_set(&bat_priv->tt_local_changed, 1);
 }
 
 static bool hardif_is_iface_up(struct hard_iface *hard_iface)
@@ -339,7 +339,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface, char *iface_name)
 	batman_packet->flags = 0;
 	batman_packet->ttl = 2;
 	batman_packet->tq = TQ_MAX_VALUE;
-	batman_packet->num_hna = 0;
+	batman_packet->num_tt = 0;
 
 	hard_iface->if_num = bat_priv->num_ifaces;
 	bat_priv->num_ifaces++;
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 7edf8d7..0a7cee0 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -84,8 +84,8 @@ int mesh_init(struct net_device *soft_iface)
 
 	spin_lock_init(&bat_priv->forw_bat_list_lock);
 	spin_lock_init(&bat_priv->forw_bcast_list_lock);
-	spin_lock_init(&bat_priv->hna_lhash_lock);
-	spin_lock_init(&bat_priv->hna_ghash_lock);
+	spin_lock_init(&bat_priv->tt_lhash_lock);
+	spin_lock_init(&bat_priv->tt_ghash_lock);
 	spin_lock_init(&bat_priv->gw_list_lock);
 	spin_lock_init(&bat_priv->vis_hash_lock);
 	spin_lock_init(&bat_priv->vis_list_lock);
@@ -100,13 +100,13 @@ int mesh_init(struct net_device *soft_iface)
 	if (originator_init(bat_priv) < 1)
 		goto err;
 
-	if (hna_local_init(bat_priv) < 1)
+	if (tt_local_init(bat_priv) < 1)
 		goto err;
 
-	if (hna_global_init(bat_priv) < 1)
+	if (tt_global_init(bat_priv) < 1)
 		goto err;
 
-	hna_local_add(soft_iface, soft_iface->dev_addr);
+	tt_local_add(soft_iface, soft_iface->dev_addr);
 
 	if (vis_init(bat_priv) < 1)
 		goto err;
@@ -137,8 +137,8 @@ void mesh_free(struct net_device *soft_iface)
 	gw_node_purge(bat_priv);
 	originator_free(bat_priv);
 
-	hna_local_free(bat_priv);
-	hna_global_free(bat_priv);
+	tt_local_free(bat_priv);
+	tt_global_free(bat_priv);
 
 	softif_neigh_purge(bat_priv);
 
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index ace7285..9ef6ef9 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -39,7 +39,7 @@
 #define PURGE_TIMEOUT 200	/* purge originators after time in seconds if no
 				   * valid packet comes in -> TODO: check
 				   * influence on TQ_LOCAL_WINDOW_SIZE */
-#define LOCAL_HNA_TIMEOUT 3600 /* in seconds */
+#define TT_LOCAL_TIMEOUT 3600 /* in seconds */
 
 #define TQ_LOCAL_WINDOW_SIZE 64	  /* sliding packet range of received originator
 				   * messages in squence numbers (should be a
@@ -89,7 +89,7 @@
 
 #define DBG_BATMAN 1	/* all messages related to routing / flooding /
 			 * broadcasting / etc */
-#define DBG_ROUTES 2	/* route or hna added / changed / deleted */
+#define DBG_ROUTES 2	/* route or tt entry added / changed / deleted */
 #define DBG_ALL 3
 
 
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index 51af91b..080ec883 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -142,7 +142,7 @@ static void orig_node_free_rcu(struct rcu_head *rcu)
 	spin_unlock_bh(&orig_node->neigh_list_lock);
 
 	frag_list_free(&orig_node->frag_list);
-	hna_global_del_orig(orig_node->bat_priv, orig_node,
+	tt_global_del_orig(orig_node->bat_priv, orig_node,
 			    "originator timed out");
 
 	kfree(orig_node->bcast_own);
@@ -220,7 +220,7 @@ struct orig_node *get_orig_node(struct bat_priv *bat_priv, uint8_t *addr)
 	orig_node->bat_priv = bat_priv;
 	memcpy(orig_node->orig, addr, ETH_ALEN);
 	orig_node->router = NULL;
-	orig_node->hna_buff = NULL;
+	orig_node->tt_buff = NULL;
 	orig_node->bcast_seqno_reset = jiffies - 1
 					- msecs_to_jiffies(RESET_PROTECTION_MS);
 	orig_node->batman_seqno_reset = jiffies - 1
@@ -331,8 +331,8 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
 							&best_neigh_node)) {
 			update_routes(bat_priv, orig_node,
 				      best_neigh_node,
-				      orig_node->hna_buff,
-				      orig_node->hna_buff_len);
+				      orig_node->tt_buff,
+				      orig_node->tt_buff_len);
 		}
 	}
 
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index e757187..c225c3a 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -61,7 +61,7 @@ struct batman_packet {
 	uint8_t  orig[6];
 	uint8_t  prev_sender[6];
 	uint8_t  ttl;
-	uint8_t  num_hna;
+	uint8_t  num_tt;
 	uint8_t  gw_flags;  /* flags related to gateway class */
 	uint8_t  align;
 } __packed;
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index d8cde2b..7648b92 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -64,28 +64,28 @@ void slide_own_bcast_window(struct hard_iface *hard_iface)
 	}
 }
 
-static void update_HNA(struct bat_priv *bat_priv, struct orig_node *orig_node,
-		       unsigned char *hna_buff, int hna_buff_len)
+static void update_TT(struct bat_priv *bat_priv, struct orig_node *orig_node,
+		       unsigned char *tt_buff, int tt_buff_len)
 {
-	if ((hna_buff_len != orig_node->hna_buff_len) ||
-	    ((hna_buff_len > 0) &&
-	     (orig_node->hna_buff_len > 0) &&
-	     (memcmp(orig_node->hna_buff, hna_buff, hna_buff_len) != 0))) {
+	if ((tt_buff_len != orig_node->tt_buff_len) ||
+	    ((tt_buff_len > 0) &&
+	     (orig_node->tt_buff_len > 0) &&
+	     (memcmp(orig_node->tt_buff, tt_buff, tt_buff_len) != 0))) {
 
-		if (orig_node->hna_buff_len > 0)
-			hna_global_del_orig(bat_priv, orig_node,
-					    "originator changed hna");
+		if (orig_node->tt_buff_len > 0)
+			tt_global_del_orig(bat_priv, orig_node,
+					    "originator changed tt");
 
-		if ((hna_buff_len > 0) && (hna_buff))
-			hna_global_add_orig(bat_priv, orig_node,
-					    hna_buff, hna_buff_len);
+		if ((tt_buff_len > 0) && (tt_buff))
+			tt_global_add_orig(bat_priv, orig_node,
+					    tt_buff, tt_buff_len);
 	}
 }
 
 static void update_route(struct bat_priv *bat_priv,
 			 struct orig_node *orig_node,
 			 struct neigh_node *neigh_node,
-			 unsigned char *hna_buff, int hna_buff_len)
+			 unsigned char *tt_buff, int tt_buff_len)
 {
 	struct neigh_node *curr_router;
 
@@ -96,7 +96,7 @@ static void update_route(struct bat_priv *bat_priv,
 
 		bat_dbg(DBG_ROUTES, bat_priv, "Deleting route towards: %pM\n",
 			orig_node->orig);
-		hna_global_del_orig(bat_priv, orig_node,
+		tt_global_del_orig(bat_priv, orig_node,
 				    "originator timed out");
 
 	/* route added */
@@ -105,8 +105,8 @@ static void update_route(struct bat_priv *bat_priv,
 		bat_dbg(DBG_ROUTES, bat_priv,
 			"Adding route towards: %pM (via %pM)\n",
 			orig_node->orig, neigh_node->addr);
-		hna_global_add_orig(bat_priv, orig_node,
-				    hna_buff, hna_buff_len);
+		tt_global_add_orig(bat_priv, orig_node,
+				    tt_buff, tt_buff_len);
 
 	/* route changed */
 	} else {
@@ -135,8 +135,8 @@ static void update_route(struct bat_priv *bat_priv,
 
 
 void update_routes(struct bat_priv *bat_priv, struct orig_node *orig_node,
-		   struct neigh_node *neigh_node, unsigned char *hna_buff,
-		   int hna_buff_len)
+		   struct neigh_node *neigh_node, unsigned char *tt_buff,
+		   int tt_buff_len)
 {
 	struct neigh_node *router = NULL;
 
@@ -147,10 +147,10 @@ void update_routes(struct bat_priv *bat_priv, struct orig_node *orig_node,
 
 	if (router != neigh_node)
 		update_route(bat_priv, orig_node, neigh_node,
-			     hna_buff, hna_buff_len);
-	/* may be just HNA changed */
+			     tt_buff, tt_buff_len);
+	/* may be just TT changed */
 	else
-		update_HNA(bat_priv, orig_node, hna_buff, hna_buff_len);
+		update_TT(bat_priv, orig_node, tt_buff, tt_buff_len);
 
 out:
 	if (router)
@@ -387,14 +387,14 @@ static void update_orig(struct bat_priv *bat_priv,
 			struct ethhdr *ethhdr,
 			struct batman_packet *batman_packet,
 			struct hard_iface *if_incoming,
-			unsigned char *hna_buff, int hna_buff_len,
+			unsigned char *tt_buff, int tt_buff_len,
 			char is_duplicate)
 {
 	struct neigh_node *neigh_node = NULL, *tmp_neigh_node = NULL;
 	struct neigh_node *router = NULL;
 	struct orig_node *orig_node_tmp;
 	struct hlist_node *node;
-	int tmp_hna_buff_len;
+	int tmp_tt_buff_len;
 	uint8_t bcast_own_sum_orig, bcast_own_sum_neigh;
 
 	bat_dbg(DBG_BATMAN, bat_priv, "update_originator(): "
@@ -459,18 +459,18 @@ static void update_orig(struct bat_priv *bat_priv,
 
 	bonding_candidate_add(orig_node, neigh_node);
 
-	tmp_hna_buff_len = (hna_buff_len > batman_packet->num_hna * ETH_ALEN ?
-			    batman_packet->num_hna * ETH_ALEN : hna_buff_len);
+	tmp_tt_buff_len = (tt_buff_len > batman_packet->num_tt * ETH_ALEN ?
+			    batman_packet->num_tt * ETH_ALEN : tt_buff_len);
 
 	/* if this neighbor already is our next hop there is nothing
 	 * to change */
 	router = orig_node_get_router(orig_node);
 	if (router == neigh_node)
-		goto update_hna;
+		goto update_tt;
 
 	/* if this neighbor does not offer a better TQ we won't consider it */
 	if (router && (router->tq_avg > neigh_node->tq_avg))
-		goto update_hna;
+		goto update_tt;
 
 	/* if the TQ is the same and the link not more symetric we
 	 * won't consider it either */
@@ -488,16 +488,16 @@ static void update_orig(struct bat_priv *bat_priv,
 		spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock);
 
 		if (bcast_own_sum_orig >= bcast_own_sum_neigh)
-			goto update_hna;
+			goto update_tt;
 	}
 
 	update_routes(bat_priv, orig_node, neigh_node,
-		      hna_buff, tmp_hna_buff_len);
+		      tt_buff, tmp_tt_buff_len);
 	goto update_gw;
 
-update_hna:
+update_tt:
 	update_routes(bat_priv, orig_node, router,
-		      hna_buff, tmp_hna_buff_len);
+		      tt_buff, tmp_tt_buff_len);
 
 update_gw:
 	if (orig_node->gw_flags != batman_packet->gw_flags)
@@ -621,7 +621,7 @@ out:
 
 void receive_bat_packet(struct ethhdr *ethhdr,
 			struct batman_packet *batman_packet,
-			unsigned char *hna_buff, int hna_buff_len,
+			unsigned char *tt_buff, int tt_buff_len,
 			struct hard_iface *if_incoming)
 {
 	struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
@@ -818,14 +818,14 @@ void receive_bat_packet(struct ethhdr *ethhdr,
 	     ((orig_node->last_real_seqno == batman_packet->seqno) &&
 	      (orig_node->last_ttl - 3 <= batman_packet->ttl))))
 		update_orig(bat_priv, orig_node, ethhdr, batman_packet,
-			    if_incoming, hna_buff, hna_buff_len, is_duplicate);
+			    if_incoming, tt_buff, tt_buff_len, is_duplicate);
 
 	/* is single hop (direct) neighbor */
 	if (is_single_hop_neigh) {
 
 		/* mark direct link on incoming interface */
 		schedule_forward_packet(orig_node, ethhdr, batman_packet,
-					1, hna_buff_len, if_incoming);
+					1, tt_buff_len, if_incoming);
 
 		bat_dbg(DBG_BATMAN, bat_priv, "Forwarding packet: "
 			"rebroadcast neighbor packet with direct link flag\n");
@@ -848,7 +848,7 @@ void receive_bat_packet(struct ethhdr *ethhdr,
 	bat_dbg(DBG_BATMAN, bat_priv,
 		"Forwarding packet: rebroadcast originator packet\n");
 	schedule_forward_packet(orig_node, ethhdr, batman_packet,
-				0, hna_buff_len, if_incoming);
+				0, tt_buff_len, if_incoming);
 
 out_neigh:
 	if ((orig_neigh_node) && (!is_single_hop_neigh))
diff --git a/net/batman-adv/routing.h b/net/batman-adv/routing.h
index b5a064c..870f298 100644
--- a/net/batman-adv/routing.h
+++ b/net/batman-adv/routing.h
@@ -25,11 +25,11 @@
 void slide_own_bcast_window(struct hard_iface *hard_iface);
 void receive_bat_packet(struct ethhdr *ethhdr,
 				struct batman_packet *batman_packet,
-				unsigned char *hna_buff, int hna_buff_len,
+				unsigned char *tt_buff, int tt_buff_len,
 				struct hard_iface *if_incoming);
 void update_routes(struct bat_priv *bat_priv, struct orig_node *orig_node,
-		   struct neigh_node *neigh_node, unsigned char *hna_buff,
-		   int hna_buff_len);
+		   struct neigh_node *neigh_node, unsigned char *tt_buff,
+		   int tt_buff_len);
 int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if);
 int recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if);
 int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if);
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index 02b541a..f30d0c6 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -121,7 +121,7 @@ static void send_packet_to_if(struct forw_packet *forw_packet,
 	/* adjust all flags and log packets */
 	while (aggregated_packet(buff_pos,
 				 forw_packet->packet_len,
-				 batman_packet->num_hna)) {
+				 batman_packet->num_tt)) {
 
 		/* we might have aggregated direct link packets with an
 		 * ordinary base packet */
@@ -146,7 +146,7 @@ static void send_packet_to_if(struct forw_packet *forw_packet,
 			hard_iface->net_dev->dev_addr);
 
 		buff_pos += sizeof(struct batman_packet) +
-			(batman_packet->num_hna * ETH_ALEN);
+			(batman_packet->num_tt * ETH_ALEN);
 		packet_num++;
 		batman_packet = (struct batman_packet *)
 			(forw_packet->skb->data + buff_pos);
@@ -222,7 +222,7 @@ static void rebuild_batman_packet(struct bat_priv *bat_priv,
 	struct batman_packet *batman_packet;
 
 	new_len = sizeof(struct batman_packet) +
-			(bat_priv->num_local_hna * ETH_ALEN);
+			(bat_priv->num_local_tt * ETH_ALEN);
 	new_buff = kmalloc(new_len, GFP_ATOMIC);
 
 	/* keep old buffer if kmalloc should fail */
@@ -231,7 +231,7 @@ static void rebuild_batman_packet(struct bat_priv *bat_priv,
 		       sizeof(struct batman_packet));
 		batman_packet = (struct batman_packet *)new_buff;
 
-		batman_packet->num_hna = hna_local_fill_buffer(bat_priv,
+		batman_packet->num_tt = tt_local_fill_buffer(bat_priv,
 				new_buff + sizeof(struct batman_packet),
 				new_len - sizeof(struct batman_packet));
 
@@ -266,8 +266,8 @@ void schedule_own_packet(struct hard_iface *hard_iface)
 	if (hard_iface->if_status == IF_TO_BE_ACTIVATED)
 		hard_iface->if_status = IF_ACTIVE;
 
-	/* if local hna has changed and interface is a primary interface */
-	if ((atomic_read(&bat_priv->hna_local_changed)) &&
+	/* if local tt has changed and interface is a primary interface */
+	if ((atomic_read(&bat_priv->tt_local_changed)) &&
 	    (hard_iface == primary_if))
 		rebuild_batman_packet(bat_priv, hard_iface);
 
@@ -309,7 +309,7 @@ void schedule_own_packet(struct hard_iface *hard_iface)
 void schedule_forward_packet(struct orig_node *orig_node,
 			     struct ethhdr *ethhdr,
 			     struct batman_packet *batman_packet,
-			     uint8_t directlink, int hna_buff_len,
+			     uint8_t directlink, int tt_buff_len,
 			     struct hard_iface *if_incoming)
 {
 	struct bat_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
@@ -369,7 +369,7 @@ void schedule_forward_packet(struct orig_node *orig_node,
 	send_time = forward_send_time();
 	add_bat_packet_to_list(bat_priv,
 			       (unsigned char *)batman_packet,
-			       sizeof(struct batman_packet) + hna_buff_len,
+			       sizeof(struct batman_packet) + tt_buff_len,
 			       if_incoming, 0, send_time);
 }
 
diff --git a/net/batman-adv/send.h b/net/batman-adv/send.h
index 7b2ff19..247172d 100644
--- a/net/batman-adv/send.h
+++ b/net/batman-adv/send.h
@@ -29,7 +29,7 @@ void schedule_own_packet(struct hard_iface *hard_iface);
 void schedule_forward_packet(struct orig_node *orig_node,
 			     struct ethhdr *ethhdr,
 			     struct batman_packet *batman_packet,
-			     uint8_t directlink, int hna_buff_len,
+			     uint8_t directlink, int tt_buff_len,
 			     struct hard_iface *if_outgoing);
 int add_bcast_packet_to_list(struct bat_priv *bat_priv, struct sk_buff *skb);
 void send_outstanding_bat_packet(struct work_struct *work);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 9301e21..d6aaf9f 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -543,11 +543,11 @@ static int interface_set_mac_addr(struct net_device *dev, void *p)
 	if (!is_valid_ether_addr(addr->sa_data))
 		return -EADDRNOTAVAIL;
 
-	/* only modify hna-table if it has been initialised before */
+	/* only modify transtable if it has been initialised before */
 	if (atomic_read(&bat_priv->mesh_state) == MESH_ACTIVE) {
-		hna_local_remove(bat_priv, dev->dev_addr,
+		tt_local_remove(bat_priv, dev->dev_addr,
 				 "mac address changed");
-		hna_local_add(dev, addr->sa_data);
+		tt_local_add(dev, addr->sa_data);
 	}
 
 	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
@@ -605,7 +605,7 @@ int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
 		goto dropped;
 
 	/* TODO: check this for locks */
-	hna_local_add(soft_iface, ethhdr->h_source);
+	tt_local_add(soft_iface, ethhdr->h_source);
 
 	if (is_multicast_ether_addr(ethhdr->h_dest)) {
 		ret = gw_is_target(bat_priv, skb);
@@ -843,7 +843,7 @@ struct net_device *softif_create(char *name)
 
 	atomic_set(&bat_priv->mesh_state, MESH_INACTIVE);
 	atomic_set(&bat_priv->bcast_seqno, 1);
-	atomic_set(&bat_priv->hna_local_changed, 0);
+	atomic_set(&bat_priv->tt_local_changed, 0);
 
 	bat_priv->primary_if = NULL;
 	bat_priv->num_ifaces = 0;
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index f931830..7b72966 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -26,40 +26,40 @@
 #include "hash.h"
 #include "originator.h"
 
-static void hna_local_purge(struct work_struct *work);
-static void _hna_global_del_orig(struct bat_priv *bat_priv,
-				 struct hna_global_entry *hna_global_entry,
+static void tt_local_purge(struct work_struct *work);
+static void _tt_global_del_orig(struct bat_priv *bat_priv,
+				 struct tt_global_entry *tt_global_entry,
 				 char *message);
 
 /* returns 1 if they are the same mac addr */
-static int compare_lhna(struct hlist_node *node, void *data2)
+static int compare_ltt(struct hlist_node *node, void *data2)
 {
-	void *data1 = container_of(node, struct hna_local_entry, hash_entry);
+	void *data1 = container_of(node, struct tt_local_entry, hash_entry);
 
 	return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
 }
 
 /* returns 1 if they are the same mac addr */
-static int compare_ghna(struct hlist_node *node, void *data2)
+static int compare_gtt(struct hlist_node *node, void *data2)
 {
-	void *data1 = container_of(node, struct hna_global_entry, hash_entry);
+	void *data1 = container_of(node, struct tt_global_entry, hash_entry);
 
 	return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
 }
 
-static void hna_local_start_timer(struct bat_priv *bat_priv)
+static void tt_local_start_timer(struct bat_priv *bat_priv)
 {
-	INIT_DELAYED_WORK(&bat_priv->hna_work, hna_local_purge);
-	queue_delayed_work(bat_event_workqueue, &bat_priv->hna_work, 10 * HZ);
+	INIT_DELAYED_WORK(&bat_priv->tt_work, tt_local_purge);
+	queue_delayed_work(bat_event_workqueue, &bat_priv->tt_work, 10 * HZ);
 }
 
-static struct hna_local_entry *hna_local_hash_find(struct bat_priv *bat_priv,
+static struct tt_local_entry *tt_local_hash_find(struct bat_priv *bat_priv,
 						   void *data)
 {
-	struct hashtable_t *hash = bat_priv->hna_local_hash;
+	struct hashtable_t *hash = bat_priv->tt_local_hash;
 	struct hlist_head *head;
 	struct hlist_node *node;
-	struct hna_local_entry *hna_local_entry, *hna_local_entry_tmp = NULL;
+	struct tt_local_entry *tt_local_entry, *tt_local_entry_tmp = NULL;
 	int index;
 
 	if (!hash)
@@ -69,26 +69,26 @@ static struct hna_local_entry *hna_local_hash_find(struct bat_priv *bat_priv,
 	head = &hash->table[index];
 
 	rcu_read_lock();
-	hlist_for_each_entry_rcu(hna_local_entry, node, head, hash_entry) {
-		if (!compare_eth(hna_local_entry, data))
+	hlist_for_each_entry_rcu(tt_local_entry, node, head, hash_entry) {
+		if (!compare_eth(tt_local_entry, data))
 			continue;
 
-		hna_local_entry_tmp = hna_local_entry;
+		tt_local_entry_tmp = tt_local_entry;
 		break;
 	}
 	rcu_read_unlock();
 
-	return hna_local_entry_tmp;
+	return tt_local_entry_tmp;
 }
 
-static struct hna_global_entry *hna_global_hash_find(struct bat_priv *bat_priv,
+static struct tt_global_entry *tt_global_hash_find(struct bat_priv *bat_priv,
 						     void *data)
 {
-	struct hashtable_t *hash = bat_priv->hna_global_hash;
+	struct hashtable_t *hash = bat_priv->tt_global_hash;
 	struct hlist_head *head;
 	struct hlist_node *node;
-	struct hna_global_entry *hna_global_entry;
-	struct hna_global_entry *hna_global_entry_tmp = NULL;
+	struct tt_global_entry *tt_global_entry;
+	struct tt_global_entry *tt_global_entry_tmp = NULL;
 	int index;
 
 	if (!hash)
@@ -98,125 +98,125 @@ static struct hna_global_entry *hna_global_hash_find(struct bat_priv *bat_priv,
 	head = &hash->table[index];
 
 	rcu_read_lock();
-	hlist_for_each_entry_rcu(hna_global_entry, node, head, hash_entry) {
-		if (!compare_eth(hna_global_entry, data))
+	hlist_for_each_entry_rcu(tt_global_entry, node, head, hash_entry) {
+		if (!compare_eth(tt_global_entry, data))
 			continue;
 
-		hna_global_entry_tmp = hna_global_entry;
+		tt_global_entry_tmp = tt_global_entry;
 		break;
 	}
 	rcu_read_unlock();
 
-	return hna_global_entry_tmp;
+	return tt_global_entry_tmp;
 }
 
-int hna_local_init(struct bat_priv *bat_priv)
+int tt_local_init(struct bat_priv *bat_priv)
 {
-	if (bat_priv->hna_local_hash)
+	if (bat_priv->tt_local_hash)
 		return 1;
 
-	bat_priv->hna_local_hash = hash_new(1024);
+	bat_priv->tt_local_hash = hash_new(1024);
 
-	if (!bat_priv->hna_local_hash)
+	if (!bat_priv->tt_local_hash)
 		return 0;
 
-	atomic_set(&bat_priv->hna_local_changed, 0);
-	hna_local_start_timer(bat_priv);
+	atomic_set(&bat_priv->tt_local_changed, 0);
+	tt_local_start_timer(bat_priv);
 
 	return 1;
 }
 
-void hna_local_add(struct net_device *soft_iface, uint8_t *addr)
+void tt_local_add(struct net_device *soft_iface, uint8_t *addr)
 {
 	struct bat_priv *bat_priv = netdev_priv(soft_iface);
-	struct hna_local_entry *hna_local_entry;
-	struct hna_global_entry *hna_global_entry;
+	struct tt_local_entry *tt_local_entry;
+	struct tt_global_entry *tt_global_entry;
 	int required_bytes;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
-	hna_local_entry = hna_local_hash_find(bat_priv, addr);
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
+	tt_local_entry = tt_local_hash_find(bat_priv, addr);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 
-	if (hna_local_entry) {
-		hna_local_entry->last_seen = jiffies;
+	if (tt_local_entry) {
+		tt_local_entry->last_seen = jiffies;
 		return;
 	}
 
 	/* only announce as many hosts as possible in the batman-packet and
-	   space in batman_packet->num_hna That also should give a limit to
+	   space in batman_packet->num_tt That also should give a limit to
 	   MAC-flooding. */
-	required_bytes = (bat_priv->num_local_hna + 1) * ETH_ALEN;
+	required_bytes = (bat_priv->num_local_tt + 1) * ETH_ALEN;
 	required_bytes += BAT_PACKET_LEN;
 
 	if ((required_bytes > ETH_DATA_LEN) ||
 	    (atomic_read(&bat_priv->aggregated_ogms) &&
 	     required_bytes > MAX_AGGREGATION_BYTES) ||
-	    (bat_priv->num_local_hna + 1 > 255)) {
+	    (bat_priv->num_local_tt + 1 > 255)) {
 		bat_dbg(DBG_ROUTES, bat_priv,
-			"Can't add new local hna entry (%pM): "
-			"number of local hna entries exceeds packet size\n",
+			"Can't add new local tt entry (%pM): "
+			"number of local tt entries exceeds packet size\n",
 			addr);
 		return;
 	}
 
 	bat_dbg(DBG_ROUTES, bat_priv,
-		"Creating new local hna entry: %pM\n", addr);
+		"Creating new local tt entry: %pM\n", addr);
 
-	hna_local_entry = kmalloc(sizeof(struct hna_local_entry), GFP_ATOMIC);
-	if (!hna_local_entry)
+	tt_local_entry = kmalloc(sizeof(struct tt_local_entry), GFP_ATOMIC);
+	if (!tt_local_entry)
 		return;
 
-	memcpy(hna_local_entry->addr, addr, ETH_ALEN);
-	hna_local_entry->last_seen = jiffies;
+	memcpy(tt_local_entry->addr, addr, ETH_ALEN);
+	tt_local_entry->last_seen = jiffies;
 
 	/* the batman interface mac address should never be purged */
 	if (compare_eth(addr, soft_iface->dev_addr))
-		hna_local_entry->never_purge = 1;
+		tt_local_entry->never_purge = 1;
 	else
-		hna_local_entry->never_purge = 0;
+		tt_local_entry->never_purge = 0;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 
-	hash_add(bat_priv->hna_local_hash, compare_lhna, choose_orig,
-		 hna_local_entry, &hna_local_entry->hash_entry);
-	bat_priv->num_local_hna++;
-	atomic_set(&bat_priv->hna_local_changed, 1);
+	hash_add(bat_priv->tt_local_hash, compare_ltt, choose_orig,
+		 tt_local_entry, &tt_local_entry->hash_entry);
+	bat_priv->num_local_tt++;
+	atomic_set(&bat_priv->tt_local_changed, 1);
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 
 	/* remove address from global hash if present */
-	spin_lock_bh(&bat_priv->hna_ghash_lock);
+	spin_lock_bh(&bat_priv->tt_ghash_lock);
 
-	hna_global_entry = hna_global_hash_find(bat_priv, addr);
+	tt_global_entry = tt_global_hash_find(bat_priv, addr);
 
-	if (hna_global_entry)
-		_hna_global_del_orig(bat_priv, hna_global_entry,
-				     "local hna received");
+	if (tt_global_entry)
+		_tt_global_del_orig(bat_priv, tt_global_entry,
+				     "local tt received");
 
-	spin_unlock_bh(&bat_priv->hna_ghash_lock);
+	spin_unlock_bh(&bat_priv->tt_ghash_lock);
 }
 
-int hna_local_fill_buffer(struct bat_priv *bat_priv,
+int tt_local_fill_buffer(struct bat_priv *bat_priv,
 			  unsigned char *buff, int buff_len)
 {
-	struct hashtable_t *hash = bat_priv->hna_local_hash;
-	struct hna_local_entry *hna_local_entry;
+	struct hashtable_t *hash = bat_priv->tt_local_hash;
+	struct tt_local_entry *tt_local_entry;
 	struct hlist_node *node;
 	struct hlist_head *head;
 	int i, count = 0;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 
 	for (i = 0; i < hash->size; i++) {
 		head = &hash->table[i];
 
 		rcu_read_lock();
-		hlist_for_each_entry_rcu(hna_local_entry, node,
+		hlist_for_each_entry_rcu(tt_local_entry, node,
 					 head, hash_entry) {
 			if (buff_len < (count + 1) * ETH_ALEN)
 				break;
 
-			memcpy(buff + (count * ETH_ALEN), hna_local_entry->addr,
+			memcpy(buff + (count * ETH_ALEN), tt_local_entry->addr,
 			       ETH_ALEN);
 
 			count++;
@@ -224,20 +224,20 @@ int hna_local_fill_buffer(struct bat_priv *bat_priv,
 		rcu_read_unlock();
 	}
 
-	/* if we did not get all new local hnas see you next time  ;-) */
-	if (count == bat_priv->num_local_hna)
-		atomic_set(&bat_priv->hna_local_changed, 0);
+	/* if we did not get all new local tts see you next time  ;-) */
+	if (count == bat_priv->num_local_tt)
+		atomic_set(&bat_priv->tt_local_changed, 0);
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 	return count;
 }
 
-int hna_local_seq_print_text(struct seq_file *seq, void *offset)
+int tt_local_seq_print_text(struct seq_file *seq, void *offset)
 {
 	struct net_device *net_dev = (struct net_device *)seq->private;
 	struct bat_priv *bat_priv = netdev_priv(net_dev);
-	struct hashtable_t *hash = bat_priv->hna_local_hash;
-	struct hna_local_entry *hna_local_entry;
+	struct hashtable_t *hash = bat_priv->tt_local_hash;
+	struct tt_local_entry *tt_local_entry;
 	struct hard_iface *primary_if;
 	struct hlist_node *node;
 	struct hlist_head *head;
@@ -261,10 +261,10 @@ int hna_local_seq_print_text(struct seq_file *seq, void *offset)
 	}
 
 	seq_printf(seq, "Locally retrieved addresses (from %s) "
-		   "announced via HNA:\n",
+		   "announced via TT:\n",
 		   net_dev->name);
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 
 	buf_size = 1;
 	/* Estimate length for: " * xx:xx:xx:xx:xx:xx\n" */
@@ -279,7 +279,7 @@ int hna_local_seq_print_text(struct seq_file *seq, void *offset)
 
 	buff = kmalloc(buf_size, GFP_ATOMIC);
 	if (!buff) {
-		spin_unlock_bh(&bat_priv->hna_lhash_lock);
+		spin_unlock_bh(&bat_priv->tt_lhash_lock);
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -291,15 +291,15 @@ int hna_local_seq_print_text(struct seq_file *seq, void *offset)
 		head = &hash->table[i];
 
 		rcu_read_lock();
-		hlist_for_each_entry_rcu(hna_local_entry, node,
+		hlist_for_each_entry_rcu(tt_local_entry, node,
 					 head, hash_entry) {
 			pos += snprintf(buff + pos, 22, " * %pM\n",
-					hna_local_entry->addr);
+					tt_local_entry->addr);
 		}
 		rcu_read_unlock();
 	}
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 
 	seq_printf(seq, "%s", buff);
 	kfree(buff);
@@ -309,180 +309,180 @@ out:
 	return ret;
 }
 
-static void _hna_local_del(struct hlist_node *node, void *arg)
+static void _tt_local_del(struct hlist_node *node, void *arg)
 {
 	struct bat_priv *bat_priv = (struct bat_priv *)arg;
-	void *data = container_of(node, struct hna_local_entry, hash_entry);
+	void *data = container_of(node, struct tt_local_entry, hash_entry);
 
 	kfree(data);
-	bat_priv->num_local_hna--;
-	atomic_set(&bat_priv->hna_local_changed, 1);
+	bat_priv->num_local_tt--;
+	atomic_set(&bat_priv->tt_local_changed, 1);
 }
 
-static void hna_local_del(struct bat_priv *bat_priv,
-			  struct hna_local_entry *hna_local_entry,
+static void tt_local_del(struct bat_priv *bat_priv,
+			  struct tt_local_entry *tt_local_entry,
 			  char *message)
 {
-	bat_dbg(DBG_ROUTES, bat_priv, "Deleting local hna entry (%pM): %s\n",
-		hna_local_entry->addr, message);
+	bat_dbg(DBG_ROUTES, bat_priv, "Deleting local tt entry (%pM): %s\n",
+		tt_local_entry->addr, message);
 
-	hash_remove(bat_priv->hna_local_hash, compare_lhna, choose_orig,
-		    hna_local_entry->addr);
-	_hna_local_del(&hna_local_entry->hash_entry, bat_priv);
+	hash_remove(bat_priv->tt_local_hash, compare_ltt, choose_orig,
+		    tt_local_entry->addr);
+	_tt_local_del(&tt_local_entry->hash_entry, bat_priv);
 }
 
-void hna_local_remove(struct bat_priv *bat_priv,
+void tt_local_remove(struct bat_priv *bat_priv,
 		      uint8_t *addr, char *message)
 {
-	struct hna_local_entry *hna_local_entry;
+	struct tt_local_entry *tt_local_entry;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 
-	hna_local_entry = hna_local_hash_find(bat_priv, addr);
+	tt_local_entry = tt_local_hash_find(bat_priv, addr);
 
-	if (hna_local_entry)
-		hna_local_del(bat_priv, hna_local_entry, message);
+	if (tt_local_entry)
+		tt_local_del(bat_priv, tt_local_entry, message);
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 }
 
-static void hna_local_purge(struct work_struct *work)
+static void tt_local_purge(struct work_struct *work)
 {
 	struct delayed_work *delayed_work =
 		container_of(work, struct delayed_work, work);
 	struct bat_priv *bat_priv =
-		container_of(delayed_work, struct bat_priv, hna_work);
-	struct hashtable_t *hash = bat_priv->hna_local_hash;
-	struct hna_local_entry *hna_local_entry;
+		container_of(delayed_work, struct bat_priv, tt_work);
+	struct hashtable_t *hash = bat_priv->tt_local_hash;
+	struct tt_local_entry *tt_local_entry;
 	struct hlist_node *node, *node_tmp;
 	struct hlist_head *head;
 	unsigned long timeout;
 	int i;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 
 	for (i = 0; i < hash->size; i++) {
 		head = &hash->table[i];
 
-		hlist_for_each_entry_safe(hna_local_entry, node, node_tmp,
+		hlist_for_each_entry_safe(tt_local_entry, node, node_tmp,
 					  head, hash_entry) {
-			if (hna_local_entry->never_purge)
+			if (tt_local_entry->never_purge)
 				continue;
 
-			timeout = hna_local_entry->last_seen;
-			timeout += LOCAL_HNA_TIMEOUT * HZ;
+			timeout = tt_local_entry->last_seen;
+			timeout += TT_LOCAL_TIMEOUT * HZ;
 
 			if (time_before(jiffies, timeout))
 				continue;
 
-			hna_local_del(bat_priv, hna_local_entry,
+			tt_local_del(bat_priv, tt_local_entry,
 				      "address timed out");
 		}
 	}
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
-	hna_local_start_timer(bat_priv);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
+	tt_local_start_timer(bat_priv);
 }
 
-void hna_local_free(struct bat_priv *bat_priv)
+void tt_local_free(struct bat_priv *bat_priv)
 {
-	if (!bat_priv->hna_local_hash)
+	if (!bat_priv->tt_local_hash)
 		return;
 
-	cancel_delayed_work_sync(&bat_priv->hna_work);
-	hash_delete(bat_priv->hna_local_hash, _hna_local_del, bat_priv);
-	bat_priv->hna_local_hash = NULL;
+	cancel_delayed_work_sync(&bat_priv->tt_work);
+	hash_delete(bat_priv->tt_local_hash, _tt_local_del, bat_priv);
+	bat_priv->tt_local_hash = NULL;
 }
 
-int hna_global_init(struct bat_priv *bat_priv)
+int tt_global_init(struct bat_priv *bat_priv)
 {
-	if (bat_priv->hna_global_hash)
+	if (bat_priv->tt_global_hash)
 		return 1;
 
-	bat_priv->hna_global_hash = hash_new(1024);
+	bat_priv->tt_global_hash = hash_new(1024);
 
-	if (!bat_priv->hna_global_hash)
+	if (!bat_priv->tt_global_hash)
 		return 0;
 
 	return 1;
 }
 
-void hna_global_add_orig(struct bat_priv *bat_priv,
+void tt_global_add_orig(struct bat_priv *bat_priv,
 			 struct orig_node *orig_node,
-			 unsigned char *hna_buff, int hna_buff_len)
+			 unsigned char *tt_buff, int tt_buff_len)
 {
-	struct hna_global_entry *hna_global_entry;
-	struct hna_local_entry *hna_local_entry;
-	int hna_buff_count = 0;
-	unsigned char *hna_ptr;
+	struct tt_global_entry *tt_global_entry;
+	struct tt_local_entry *tt_local_entry;
+	int tt_buff_count = 0;
+	unsigned char *tt_ptr;
 
-	while ((hna_buff_count + 1) * ETH_ALEN <= hna_buff_len) {
-		spin_lock_bh(&bat_priv->hna_ghash_lock);
+	while ((tt_buff_count + 1) * ETH_ALEN <= tt_buff_len) {
+		spin_lock_bh(&bat_priv->tt_ghash_lock);
 
-		hna_ptr = hna_buff + (hna_buff_count * ETH_ALEN);
-		hna_global_entry = hna_global_hash_find(bat_priv, hna_ptr);
+		tt_ptr = tt_buff + (tt_buff_count * ETH_ALEN);
+		tt_global_entry = tt_global_hash_find(bat_priv, tt_ptr);
 
-		if (!hna_global_entry) {
-			spin_unlock_bh(&bat_priv->hna_ghash_lock);
+		if (!tt_global_entry) {
+			spin_unlock_bh(&bat_priv->tt_ghash_lock);
 
-			hna_global_entry =
-				kmalloc(sizeof(struct hna_global_entry),
+			tt_global_entry =
+				kmalloc(sizeof(struct tt_global_entry),
 					GFP_ATOMIC);
 
-			if (!hna_global_entry)
+			if (!tt_global_entry)
 				break;
 
-			memcpy(hna_global_entry->addr, hna_ptr, ETH_ALEN);
+			memcpy(tt_global_entry->addr, tt_ptr, ETH_ALEN);
 
 			bat_dbg(DBG_ROUTES, bat_priv,
-				"Creating new global hna entry: "
+				"Creating new global tt entry: "
 				"%pM (via %pM)\n",
-				hna_global_entry->addr, orig_node->orig);
+				tt_global_entry->addr, orig_node->orig);
 
-			spin_lock_bh(&bat_priv->hna_ghash_lock);
-			hash_add(bat_priv->hna_global_hash, compare_ghna,
-				 choose_orig, hna_global_entry,
-				 &hna_global_entry->hash_entry);
+			spin_lock_bh(&bat_priv->tt_ghash_lock);
+			hash_add(bat_priv->tt_global_hash, compare_gtt,
+				 choose_orig, tt_global_entry,
+				 &tt_global_entry->hash_entry);
 
 		}
 
-		hna_global_entry->orig_node = orig_node;
-		spin_unlock_bh(&bat_priv->hna_ghash_lock);
+		tt_global_entry->orig_node = orig_node;
+		spin_unlock_bh(&bat_priv->tt_ghash_lock);
 
 		/* remove address from local hash if present */
-		spin_lock_bh(&bat_priv->hna_lhash_lock);
+		spin_lock_bh(&bat_priv->tt_lhash_lock);
 
-		hna_ptr = hna_buff + (hna_buff_count * ETH_ALEN);
-		hna_local_entry = hna_local_hash_find(bat_priv, hna_ptr);
+		tt_ptr = tt_buff + (tt_buff_count * ETH_ALEN);
+		tt_local_entry = tt_local_hash_find(bat_priv, tt_ptr);
 
-		if (hna_local_entry)
-			hna_local_del(bat_priv, hna_local_entry,
-				      "global hna received");
+		if (tt_local_entry)
+			tt_local_del(bat_priv, tt_local_entry,
+				      "global tt received");
 
-		spin_unlock_bh(&bat_priv->hna_lhash_lock);
+		spin_unlock_bh(&bat_priv->tt_lhash_lock);
 
-		hna_buff_count++;
+		tt_buff_count++;
 	}
 
 	/* initialize, and overwrite if malloc succeeds */
-	orig_node->hna_buff = NULL;
-	orig_node->hna_buff_len = 0;
+	orig_node->tt_buff = NULL;
+	orig_node->tt_buff_len = 0;
 
-	if (hna_buff_len > 0) {
-		orig_node->hna_buff = kmalloc(hna_buff_len, GFP_ATOMIC);
-		if (orig_node->hna_buff) {
-			memcpy(orig_node->hna_buff, hna_buff, hna_buff_len);
-			orig_node->hna_buff_len = hna_buff_len;
+	if (tt_buff_len > 0) {
+		orig_node->tt_buff = kmalloc(tt_buff_len, GFP_ATOMIC);
+		if (orig_node->tt_buff) {
+			memcpy(orig_node->tt_buff, tt_buff, tt_buff_len);
+			orig_node->tt_buff_len = tt_buff_len;
 		}
 	}
 }
 
-int hna_global_seq_print_text(struct seq_file *seq, void *offset)
+int tt_global_seq_print_text(struct seq_file *seq, void *offset)
 {
 	struct net_device *net_dev = (struct net_device *)seq->private;
 	struct bat_priv *bat_priv = netdev_priv(net_dev);
-	struct hashtable_t *hash = bat_priv->hna_global_hash;
-	struct hna_global_entry *hna_global_entry;
+	struct hashtable_t *hash = bat_priv->tt_global_hash;
+	struct tt_global_entry *tt_global_entry;
 	struct hard_iface *primary_if;
 	struct hlist_node *node;
 	struct hlist_head *head;
@@ -505,10 +505,11 @@ int hna_global_seq_print_text(struct seq_file *seq, void *offset)
 		goto out;
 	}
 
-	seq_printf(seq, "Globally announced HNAs received via the mesh %s\n",
+	seq_printf(seq,
+		   "Globally announced TT entries received via the mesh %s\n",
 		   net_dev->name);
 
-	spin_lock_bh(&bat_priv->hna_ghash_lock);
+	spin_lock_bh(&bat_priv->tt_ghash_lock);
 
 	buf_size = 1;
 	/* Estimate length for: " * xx:xx:xx:xx:xx:xx via xx:xx:xx:xx:xx:xx\n"*/
@@ -523,7 +524,7 @@ int hna_global_seq_print_text(struct seq_file *seq, void *offset)
 
 	buff = kmalloc(buf_size, GFP_ATOMIC);
 	if (!buff) {
-		spin_unlock_bh(&bat_priv->hna_ghash_lock);
+		spin_unlock_bh(&bat_priv->tt_ghash_lock);
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -534,17 +535,17 @@ int hna_global_seq_print_text(struct seq_file *seq, void *offset)
 		head = &hash->table[i];
 
 		rcu_read_lock();
-		hlist_for_each_entry_rcu(hna_global_entry, node,
+		hlist_for_each_entry_rcu(tt_global_entry, node,
 					 head, hash_entry) {
 			pos += snprintf(buff + pos, 44,
 					" * %pM via %pM\n",
-					hna_global_entry->addr,
-					hna_global_entry->orig_node->orig);
+					tt_global_entry->addr,
+					tt_global_entry->orig_node->orig);
 		}
 		rcu_read_unlock();
 	}
 
-	spin_unlock_bh(&bat_priv->hna_ghash_lock);
+	spin_unlock_bh(&bat_priv->tt_ghash_lock);
 
 	seq_printf(seq, "%s", buff);
 	kfree(buff);
@@ -554,84 +555,84 @@ out:
 	return ret;
 }
 
-static void _hna_global_del_orig(struct bat_priv *bat_priv,
-				 struct hna_global_entry *hna_global_entry,
+static void _tt_global_del_orig(struct bat_priv *bat_priv,
+				 struct tt_global_entry *tt_global_entry,
 				 char *message)
 {
 	bat_dbg(DBG_ROUTES, bat_priv,
-		"Deleting global hna entry %pM (via %pM): %s\n",
-		hna_global_entry->addr, hna_global_entry->orig_node->orig,
+		"Deleting global tt entry %pM (via %pM): %s\n",
+		tt_global_entry->addr, tt_global_entry->orig_node->orig,
 		message);
 
-	hash_remove(bat_priv->hna_global_hash, compare_ghna, choose_orig,
-		    hna_global_entry->addr);
-	kfree(hna_global_entry);
+	hash_remove(bat_priv->tt_global_hash, compare_gtt, choose_orig,
+		    tt_global_entry->addr);
+	kfree(tt_global_entry);
 }
 
-void hna_global_del_orig(struct bat_priv *bat_priv,
+void tt_global_del_orig(struct bat_priv *bat_priv,
 			 struct orig_node *orig_node, char *message)
 {
-	struct hna_global_entry *hna_global_entry;
-	int hna_buff_count = 0;
-	unsigned char *hna_ptr;
+	struct tt_global_entry *tt_global_entry;
+	int tt_buff_count = 0;
+	unsigned char *tt_ptr;
 
-	if (orig_node->hna_buff_len == 0)
+	if (orig_node->tt_buff_len == 0)
 		return;
 
-	spin_lock_bh(&bat_priv->hna_ghash_lock);
+	spin_lock_bh(&bat_priv->tt_ghash_lock);
 
-	while ((hna_buff_count + 1) * ETH_ALEN <= orig_node->hna_buff_len) {
-		hna_ptr = orig_node->hna_buff + (hna_buff_count * ETH_ALEN);
-		hna_global_entry = hna_global_hash_find(bat_priv, hna_ptr);
+	while ((tt_buff_count + 1) * ETH_ALEN <= orig_node->tt_buff_len) {
+		tt_ptr = orig_node->tt_buff + (tt_buff_count * ETH_ALEN);
+		tt_global_entry = tt_global_hash_find(bat_priv, tt_ptr);
 
-		if ((hna_global_entry) &&
-		    (hna_global_entry->orig_node == orig_node))
-			_hna_global_del_orig(bat_priv, hna_global_entry,
+		if ((tt_global_entry) &&
+		    (tt_global_entry->orig_node == orig_node))
+			_tt_global_del_orig(bat_priv, tt_global_entry,
 					     message);
 
-		hna_buff_count++;
+		tt_buff_count++;
 	}
 
-	spin_unlock_bh(&bat_priv->hna_ghash_lock);
+	spin_unlock_bh(&bat_priv->tt_ghash_lock);
 
-	orig_node->hna_buff_len = 0;
-	kfree(orig_node->hna_buff);
-	orig_node->hna_buff = NULL;
+	orig_node->tt_buff_len = 0;
+	kfree(orig_node->tt_buff);
+	orig_node->tt_buff = NULL;
 }
 
-static void hna_global_del(struct hlist_node *node, void *arg)
+static void tt_global_del(struct hlist_node *node, void *arg)
 {
-	void *data = container_of(node, struct hna_global_entry, hash_entry);
+	void *data = container_of(node, struct tt_global_entry, hash_entry);
 
 	kfree(data);
 }
 
-void hna_global_free(struct bat_priv *bat_priv)
+void tt_global_free(struct bat_priv *bat_priv)
 {
-	if (!bat_priv->hna_global_hash)
+	if (!bat_priv->tt_global_hash)
 		return;
 
-	hash_delete(bat_priv->hna_global_hash, hna_global_del, NULL);
-	bat_priv->hna_global_hash = NULL;
+	hash_delete(bat_priv->tt_global_hash, tt_global_del, NULL);
+	bat_priv->tt_global_hash = NULL;
 }
 
 struct orig_node *transtable_search(struct bat_priv *bat_priv, uint8_t *addr)
 {
-	struct hna_global_entry *hna_global_entry;
+	struct tt_global_entry *tt_global_entry;
 	struct orig_node *orig_node = NULL;
 
-	spin_lock_bh(&bat_priv->hna_ghash_lock);
-	hna_global_entry = hna_global_hash_find(bat_priv, addr);
+	spin_lock_bh(&bat_priv->tt_ghash_lock);
+	tt_global_entry = tt_global_hash_find(bat_priv, addr);
 
-	if (!hna_global_entry)
+	if (!tt_global_entry)
 		goto out;
 
-	if (!atomic_inc_not_zero(&hna_global_entry->orig_node->refcount))
+	if (!atomic_inc_not_zero(&tt_global_entry->orig_node->refcount))
 		goto out;
 
-	orig_node = hna_global_entry->orig_node;
+	orig_node = tt_global_entry->orig_node;
 
 out:
-	spin_unlock_bh(&bat_priv->hna_ghash_lock);
+	spin_unlock_bh(&bat_priv->tt_ghash_lock);
 	return orig_node;
 }
diff --git a/net/batman-adv/translation-table.h b/net/batman-adv/translation-table.h
index f19931c..46152c3 100644
--- a/net/batman-adv/translation-table.h
+++ b/net/batman-adv/translation-table.h
@@ -22,22 +22,22 @@
 #ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
 #define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
 
-int hna_local_init(struct bat_priv *bat_priv);
-void hna_local_add(struct net_device *soft_iface, uint8_t *addr);
-void hna_local_remove(struct bat_priv *bat_priv,
+int tt_local_init(struct bat_priv *bat_priv);
+void tt_local_add(struct net_device *soft_iface, uint8_t *addr);
+void tt_local_remove(struct bat_priv *bat_priv,
 		      uint8_t *addr, char *message);
-int hna_local_fill_buffer(struct bat_priv *bat_priv,
+int tt_local_fill_buffer(struct bat_priv *bat_priv,
 			  unsigned char *buff, int buff_len);
-int hna_local_seq_print_text(struct seq_file *seq, void *offset);
-void hna_local_free(struct bat_priv *bat_priv);
-int hna_global_init(struct bat_priv *bat_priv);
-void hna_global_add_orig(struct bat_priv *bat_priv,
+int tt_local_seq_print_text(struct seq_file *seq, void *offset);
+void tt_local_free(struct bat_priv *bat_priv);
+int tt_global_init(struct bat_priv *bat_priv);
+void tt_global_add_orig(struct bat_priv *bat_priv,
 			 struct orig_node *orig_node,
-			 unsigned char *hna_buff, int hna_buff_len);
-int hna_global_seq_print_text(struct seq_file *seq, void *offset);
-void hna_global_del_orig(struct bat_priv *bat_priv,
+			 unsigned char *tt_buff, int tt_buff_len);
+int tt_global_seq_print_text(struct seq_file *seq, void *offset);
+void tt_global_del_orig(struct bat_priv *bat_priv,
 			 struct orig_node *orig_node, char *message);
-void hna_global_free(struct bat_priv *bat_priv);
+void tt_global_free(struct bat_priv *bat_priv);
 struct orig_node *transtable_search(struct bat_priv *bat_priv, uint8_t *addr);
 
 #endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 9ae507a..6b6c32e 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -75,8 +75,8 @@ struct orig_node {
 	unsigned long batman_seqno_reset;
 	uint8_t gw_flags;
 	uint8_t flags;
-	unsigned char *hna_buff;
-	int16_t hna_buff_len;
+	unsigned char *tt_buff;
+	int16_t tt_buff_len;
 	uint32_t last_real_seqno;
 	uint8_t last_ttl;
 	unsigned long bcast_bits[NUM_WORDS];
@@ -155,21 +155,21 @@ struct bat_priv {
 	struct hlist_head softif_neigh_vids;
 	struct list_head vis_send_list;
 	struct hashtable_t *orig_hash;
-	struct hashtable_t *hna_local_hash;
-	struct hashtable_t *hna_global_hash;
+	struct hashtable_t *tt_local_hash;
+	struct hashtable_t *tt_global_hash;
 	struct hashtable_t *vis_hash;
 	spinlock_t forw_bat_list_lock; /* protects forw_bat_list */
 	spinlock_t forw_bcast_list_lock; /* protects  */
-	spinlock_t hna_lhash_lock; /* protects hna_local_hash */
-	spinlock_t hna_ghash_lock; /* protects hna_global_hash */
+	spinlock_t tt_lhash_lock; /* protects tt_local_hash */
+	spinlock_t tt_ghash_lock; /* protects tt_global_hash */
 	spinlock_t gw_list_lock; /* protects gw_list and curr_gw */
 	spinlock_t vis_hash_lock; /* protects vis_hash */
 	spinlock_t vis_list_lock; /* protects vis_info::recv_list */
 	spinlock_t softif_neigh_lock; /* protects soft-interface neigh list */
 	spinlock_t softif_neigh_vid_lock; /* protects soft-interface vid list */
-	int16_t num_local_hna;
-	atomic_t hna_local_changed;
-	struct delayed_work hna_work;
+	int16_t num_local_tt;
+	atomic_t tt_local_changed;
+	struct delayed_work tt_work;
 	struct delayed_work orig_work;
 	struct delayed_work vis_work;
 	struct gw_node __rcu *curr_gw;  /* rcu protected pointer */
@@ -192,14 +192,14 @@ struct socket_packet {
 	struct icmp_packet_rr icmp_packet;
 };
 
-struct hna_local_entry {
+struct tt_local_entry {
 	uint8_t addr[ETH_ALEN];
 	unsigned long last_seen;
 	char never_purge;
 	struct hlist_node hash_entry;
 };
 
-struct hna_global_entry {
+struct tt_global_entry {
 	uint8_t addr[ETH_ALEN];
 	struct orig_node *orig_node;
 	struct hlist_node hash_entry;
@@ -262,7 +262,7 @@ struct vis_info {
 struct vis_info_entry {
 	uint8_t  src[ETH_ALEN];
 	uint8_t  dest[ETH_ALEN];
-	uint8_t  quality;	/* quality = 0 means HNA */
+	uint8_t  quality;	/* quality = 0 client */
 } __packed;
 
 struct recvlist_node {
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index b46cbf1..19c3daf 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -300,7 +300,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv)
 			goto find_router;
 	}
 
-	/* check for hna host - increases orig_node refcount */
+	/* check for tt host - increases orig_node refcount */
 	orig_node = transtable_search(bat_priv, ethhdr->h_dest);
 
 find_router:
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c
index c8f571d..c39f20c 100644
--- a/net/batman-adv/vis.c
+++ b/net/batman-adv/vis.c
@@ -194,7 +194,7 @@ static ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry,
 {
 	/* maximal length: max(4+17+2, 3+17+1+3+2) == 26 */
 	if (primary && entry->quality == 0)
-		return sprintf(buff, "HNA %pM, ", entry->dest);
+		return sprintf(buff, "TT %pM, ", entry->dest);
 	else if (compare_eth(entry->src, src))
 		return sprintf(buff, "TQ %pM %d, ", entry->dest,
 			       entry->quality);
@@ -622,7 +622,7 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
 	struct vis_info *info = (struct vis_info *)bat_priv->my_vis_info;
 	struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data;
 	struct vis_info_entry *entry;
-	struct hna_local_entry *hna_local_entry;
+	struct tt_local_entry *tt_local_entry;
 	int best_tq = -1, i;
 
 	info->first_seen = jiffies;
@@ -678,29 +678,29 @@ next:
 		rcu_read_unlock();
 	}
 
-	hash = bat_priv->hna_local_hash;
+	hash = bat_priv->tt_local_hash;
 
-	spin_lock_bh(&bat_priv->hna_lhash_lock);
+	spin_lock_bh(&bat_priv->tt_lhash_lock);
 	for (i = 0; i < hash->size; i++) {
 		head = &hash->table[i];
 
-		hlist_for_each_entry(hna_local_entry, node, head, hash_entry) {
+		hlist_for_each_entry(tt_local_entry, node, head, hash_entry) {
 			entry = (struct vis_info_entry *)
 					skb_put(info->skb_packet,
 						sizeof(*entry));
 			memset(entry->src, 0, ETH_ALEN);
-			memcpy(entry->dest, hna_local_entry->addr, ETH_ALEN);
-			entry->quality = 0; /* 0 means HNA */
+			memcpy(entry->dest, tt_local_entry->addr, ETH_ALEN);
+			entry->quality = 0; /* 0 means TT */
 			packet->entries++;
 
 			if (vis_packet_full(info)) {
-				spin_unlock_bh(&bat_priv->hna_lhash_lock);
+				spin_unlock_bh(&bat_priv->tt_lhash_lock);
 				return 0;
 			}
 		}
 	}
 
-	spin_unlock_bh(&bat_priv->hna_lhash_lock);
+	spin_unlock_bh(&bat_priv->tt_lhash_lock);
 	return 0;
 
 unlock:
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 5/8] batman-adv: Fix refcount imbalance in find_router
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Marek Lindner
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>

Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/routing.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 49f5715..d8cde2b 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -1213,7 +1213,7 @@ struct neigh_node *find_router(struct bat_priv *bat_priv,
 
 	router = orig_node_get_router(orig_node);
 	if (!router)
-		return NULL;
+		goto err;
 
 	/* without bonding, the first node should
 	 * always choose the default router. */
@@ -1222,10 +1222,8 @@ struct neigh_node *find_router(struct bat_priv *bat_priv,
 	rcu_read_lock();
 	/* select default router to output */
 	router_orig = router->orig_node;
-	if (!router_orig) {
-		rcu_read_unlock();
-		return NULL;
-	}
+	if (!router_orig)
+		goto err_unlock;
 
 	if ((!recv_if) && (!bonding_enabled))
 		goto return_router;
@@ -1268,6 +1266,12 @@ struct neigh_node *find_router(struct bat_priv *bat_priv,
 return_router:
 	rcu_read_unlock();
 	return router;
+err_unlock:
+	rcu_read_unlock();
+err:
+	if (router)
+		neigh_node_free_ref(router);
+	return NULL;
 }
 
 static int check_unicast_packet(struct sk_buff *skb, int hdr_size)
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 4/8] batman-adv: Avoid deadlock between rtnl_lock and s_active
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

The hard_if_event is called by the notifier with rtnl_lock and tries to
remove sysfs entries when a NETDEV_UNREGISTER event is received. This
will automatically take the s_active lock.

The s_active lock is also used when a new interface is added to a meshif
through sysfs. In that situation we cannot wait for the rntl_lock before
creating the actual batman-adv interface to prevent a deadlock. It is
still possible to try to get the rtnl_lock and immediately abort the
current operation when the trylock call failed.

Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/bat_sysfs.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c
index 85ba20d..497a070 100644
--- a/net/batman-adv/bat_sysfs.c
+++ b/net/batman-adv/bat_sysfs.c
@@ -488,24 +488,24 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
 	    (strncmp(hard_iface->soft_iface->name, buff, IFNAMSIZ) == 0))
 		goto out;
 
+	if (!rtnl_trylock()) {
+		ret = -ERESTARTSYS;
+		goto out;
+	}
+
 	if (status_tmp == IF_NOT_IN_USE) {
-		rtnl_lock();
 		hardif_disable_interface(hard_iface);
-		rtnl_unlock();
-		goto out;
+		goto unlock;
 	}
 
 	/* if the interface already is in use */
-	if (hard_iface->if_status != IF_NOT_IN_USE) {
-		rtnl_lock();
+	if (hard_iface->if_status != IF_NOT_IN_USE)
 		hardif_disable_interface(hard_iface);
-		rtnl_unlock();
-	}
 
-	rtnl_lock();
 	ret = hardif_enable_interface(hard_iface, buff);
+
+unlock:
 	rtnl_unlock();
-
 out:
 	hardif_free_ref(hard_iface);
 	return ret;
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 3/8] batman-adv: Remove unnecessary hardif_list_lock
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

hardif_list_lock is unneccessary because we already ensure that no
multiple admin operations can take place through rtnl_lock.
hardif_list_lock only adds additional overhead and complexity.

Critical functions now check whether they are called with rtnl_lock
using ASSERT_RTNL.

It indirectly fixes the problem that orig_hash_del_if() expects that
only one interface is deleted from hardif_list at a time, but
hardif_remove_interfaces() removes all at once and then calls
orig_hash_del_if().

Reported-by: Linus Lüssing <linus.luessing-S0/GAf8tV78@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/bat_sysfs.c      |    2 ++
 net/batman-adv/hard-interface.c |   30 +++++++-----------------------
 net/batman-adv/main.c           |    3 +++
 net/batman-adv/soft-interface.c |    2 +-
 4 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c
index e449bf6..85ba20d 100644
--- a/net/batman-adv/bat_sysfs.c
+++ b/net/batman-adv/bat_sysfs.c
@@ -502,7 +502,9 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
 		rtnl_unlock();
 	}
 
+	rtnl_lock();
 	ret = hardif_enable_interface(hard_iface, buff);
+	rtnl_unlock();
 
 out:
 	hardif_free_ref(hard_iface);
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 3e888f1..7e2f772 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -31,9 +31,6 @@
 
 #include <linux/if_arp.h>
 
-/* protect update critical side of hardif_list - but not the content */
-static DEFINE_SPINLOCK(hardif_list_lock);
-
 
 static int batman_skb_recv(struct sk_buff *skb,
 			   struct net_device *dev,
@@ -136,7 +133,7 @@ static void primary_if_select(struct bat_priv *bat_priv,
 	struct hard_iface *curr_hard_iface;
 	struct batman_packet *batman_packet;
 
-	spin_lock_bh(&hardif_list_lock);
+	ASSERT_RTNL();
 
 	if (new_hard_iface && !atomic_inc_not_zero(&new_hard_iface->refcount))
 		new_hard_iface = NULL;
@@ -148,7 +145,7 @@ static void primary_if_select(struct bat_priv *bat_priv,
 		hardif_free_ref(curr_hard_iface);
 
 	if (!new_hard_iface)
-		goto out;
+		return;
 
 	batman_packet = (struct batman_packet *)(new_hard_iface->packet_buff);
 	batman_packet->flags = PRIMARIES_FIRST_HOP;
@@ -161,9 +158,6 @@ static void primary_if_select(struct bat_priv *bat_priv,
 	 * our new primary interface
 	 */
 	atomic_set(&bat_priv->hna_local_changed, 1);
-
-out:
-	spin_unlock_bh(&hardif_list_lock);
 }
 
 static bool hardif_is_iface_up(struct hard_iface *hard_iface)
@@ -456,6 +450,8 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
 	struct hard_iface *hard_iface;
 	int ret;
 
+	ASSERT_RTNL();
+
 	ret = is_valid_iface(net_dev);
 	if (ret != 1)
 		goto out;
@@ -482,10 +478,7 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
 	atomic_set(&hard_iface->refcount, 2);
 
 	check_known_mac_addr(hard_iface->net_dev);
-
-	spin_lock(&hardif_list_lock);
 	list_add_tail_rcu(&hard_iface->list, &hardif_list);
-	spin_unlock(&hardif_list_lock);
 
 	return hard_iface;
 
@@ -499,6 +492,8 @@ out:
 
 static void hardif_remove_interface(struct hard_iface *hard_iface)
 {
+	ASSERT_RTNL();
+
 	/* first deactivate interface */
 	if (hard_iface->if_status != IF_NOT_IN_USE)
 		hardif_disable_interface(hard_iface);
@@ -514,20 +509,11 @@ static void hardif_remove_interface(struct hard_iface *hard_iface)
 void hardif_remove_interfaces(void)
 {
 	struct hard_iface *hard_iface, *hard_iface_tmp;
-	struct list_head if_queue;
 
-	INIT_LIST_HEAD(&if_queue);
-
-	spin_lock(&hardif_list_lock);
+	rtnl_lock();
 	list_for_each_entry_safe(hard_iface, hard_iface_tmp,
 				 &hardif_list, list) {
 		list_del_rcu(&hard_iface->list);
-		list_add_tail(&hard_iface->list, &if_queue);
-	}
-	spin_unlock(&hardif_list_lock);
-
-	rtnl_lock();
-	list_for_each_entry_safe(hard_iface, hard_iface_tmp, &if_queue, list) {
 		hardif_remove_interface(hard_iface);
 	}
 	rtnl_unlock();
@@ -556,9 +542,7 @@ static int hard_if_event(struct notifier_block *this,
 		hardif_deactivate_interface(hard_iface);
 		break;
 	case NETDEV_UNREGISTER:
-		spin_lock(&hardif_list_lock);
 		list_del_rcu(&hard_iface->list);
-		spin_unlock(&hardif_list_lock);
 
 		hardif_remove_interface(hard_iface);
 		break;
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 705e8be..7edf8d7 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -33,6 +33,9 @@
 #include "vis.h"
 #include "hash.h"
 
+
+/* List manipulations on hardif_list have to be rtnl_lock()'ed,
+ * list traversals just rcu-locked */
 struct list_head hardif_list;
 
 unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 8cb13a0..9301e21 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -819,7 +819,7 @@ struct net_device *softif_create(char *name)
 		goto out;
 	}
 
-	ret = register_netdev(soft_iface);
+	ret = register_netdevice(soft_iface);
 	if (ret < 0) {
 		pr_err("Unable to register the batman interface '%s': %i\n",
 		       name, ret);
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 2/8] batman-adv: multi vlan support for bridge loop detection
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Marek Lindner
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>

The bridge loop detection for batman-adv allows the bat0 interface
to be bridged into an ethernet segment which other batman-adv nodes
are connected to. In order to also allow multiple VLANs on top of
the bat0 interface to be bridged into the ethernet segment this
patch extends the aforementioned bridge loop detection.

Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/main.c           |    3 +-
 net/batman-adv/soft-interface.c |  407 ++++++++++++++++++++++++++++-----------
 net/batman-adv/types.h          |   19 ++-
 3 files changed, 307 insertions(+), 122 deletions(-)

diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 709b33b..705e8be 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -87,11 +87,12 @@ int mesh_init(struct net_device *soft_iface)
 	spin_lock_init(&bat_priv->vis_hash_lock);
 	spin_lock_init(&bat_priv->vis_list_lock);
 	spin_lock_init(&bat_priv->softif_neigh_lock);
+	spin_lock_init(&bat_priv->softif_neigh_vid_lock);
 
 	INIT_HLIST_HEAD(&bat_priv->forw_bat_list);
 	INIT_HLIST_HEAD(&bat_priv->forw_bcast_list);
 	INIT_HLIST_HEAD(&bat_priv->gw_list);
-	INIT_HLIST_HEAD(&bat_priv->softif_neigh_list);
+	INIT_HLIST_HEAD(&bat_priv->softif_neigh_vids);
 
 	if (originator_init(bat_priv) < 1)
 		goto err;
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index ea5e58c..8cb13a0 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -90,135 +90,251 @@ static void softif_neigh_free_ref(struct softif_neigh *softif_neigh)
 		call_rcu(&softif_neigh->rcu, softif_neigh_free_rcu);
 }
 
-static struct softif_neigh *softif_neigh_get_selected(struct bat_priv *bat_priv)
+static void softif_neigh_vid_free_rcu(struct rcu_head *rcu)
 {
-	struct softif_neigh *neigh;
-
-	rcu_read_lock();
-	neigh = rcu_dereference(bat_priv->softif_neigh);
-
-	if (neigh && !atomic_inc_not_zero(&neigh->refcount))
-		neigh = NULL;
-
-	rcu_read_unlock();
-	return neigh;
-}
-
-static void softif_neigh_select(struct bat_priv *bat_priv,
-				struct softif_neigh *new_neigh)
-{
-	struct softif_neigh *curr_neigh;
-
-	spin_lock_bh(&bat_priv->softif_neigh_lock);
-
-	if (new_neigh && !atomic_inc_not_zero(&new_neigh->refcount))
-		new_neigh = NULL;
-
-	curr_neigh = bat_priv->softif_neigh;
-	rcu_assign_pointer(bat_priv->softif_neigh, new_neigh);
-
-	if (curr_neigh)
-		softif_neigh_free_ref(curr_neigh);
-
-	spin_unlock_bh(&bat_priv->softif_neigh_lock);
-}
-
-static void softif_neigh_deselect(struct bat_priv *bat_priv)
-{
-	softif_neigh_select(bat_priv, NULL);
-}
-
-void softif_neigh_purge(struct bat_priv *bat_priv)
-{
-	struct softif_neigh *softif_neigh, *curr_softif_neigh;
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct softif_neigh *softif_neigh;
 	struct hlist_node *node, *node_tmp;
-	char do_deselect = 0;
+	struct bat_priv *bat_priv;
 
-	curr_softif_neigh = softif_neigh_get_selected(bat_priv);
+	softif_neigh_vid = container_of(rcu, struct softif_neigh_vid, rcu);
+	bat_priv = softif_neigh_vid->bat_priv;
 
 	spin_lock_bh(&bat_priv->softif_neigh_lock);
-
 	hlist_for_each_entry_safe(softif_neigh, node, node_tmp,
-				  &bat_priv->softif_neigh_list, list) {
-
-		if ((!time_after(jiffies, softif_neigh->last_seen +
-				msecs_to_jiffies(SOFTIF_NEIGH_TIMEOUT))) &&
-		    (atomic_read(&bat_priv->mesh_state) == MESH_ACTIVE))
-			continue;
-
-		if (curr_softif_neigh == softif_neigh) {
-			bat_dbg(DBG_ROUTES, bat_priv,
-				 "Current mesh exit point '%pM' vanished "
-				 "(vid: %d).\n",
-				 softif_neigh->addr, softif_neigh->vid);
-			do_deselect = 1;
-		}
-
+				  &softif_neigh_vid->softif_neigh_list, list) {
 		hlist_del_rcu(&softif_neigh->list);
 		softif_neigh_free_ref(softif_neigh);
 	}
-
 	spin_unlock_bh(&bat_priv->softif_neigh_lock);
 
-	/* soft_neigh_deselect() needs to acquire the softif_neigh_lock */
-	if (do_deselect)
-		softif_neigh_deselect(bat_priv);
+	kfree(softif_neigh_vid);
+}
 
-	if (curr_softif_neigh)
-		softif_neigh_free_ref(curr_softif_neigh);
+static void softif_neigh_vid_free_ref(struct softif_neigh_vid *softif_neigh_vid)
+{
+	if (atomic_dec_and_test(&softif_neigh_vid->refcount))
+		call_rcu(&softif_neigh_vid->rcu, softif_neigh_vid_free_rcu);
+}
+
+static struct softif_neigh_vid *softif_neigh_vid_get(struct bat_priv *bat_priv,
+						     short vid)
+{
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct hlist_node *node;
+
+	rcu_read_lock();
+	hlist_for_each_entry_rcu(softif_neigh_vid, node,
+				 &bat_priv->softif_neigh_vids, list) {
+		if (softif_neigh_vid->vid != vid)
+			continue;
+
+		if (!atomic_inc_not_zero(&softif_neigh_vid->refcount))
+			continue;
+
+		goto out;
+	}
+
+	softif_neigh_vid = kzalloc(sizeof(struct softif_neigh_vid),
+				   GFP_ATOMIC);
+	if (!softif_neigh_vid)
+		goto out;
+
+	softif_neigh_vid->vid = vid;
+	softif_neigh_vid->bat_priv = bat_priv;
+
+	/* initialize with 2 - caller decrements counter by one */
+	atomic_set(&softif_neigh_vid->refcount, 2);
+	INIT_HLIST_HEAD(&softif_neigh_vid->softif_neigh_list);
+	INIT_HLIST_NODE(&softif_neigh_vid->list);
+	spin_lock_bh(&bat_priv->softif_neigh_vid_lock);
+	hlist_add_head_rcu(&softif_neigh_vid->list,
+			   &bat_priv->softif_neigh_vids);
+	spin_unlock_bh(&bat_priv->softif_neigh_vid_lock);
+
+out:
+	rcu_read_unlock();
+	return softif_neigh_vid;
 }
 
 static struct softif_neigh *softif_neigh_get(struct bat_priv *bat_priv,
 					     uint8_t *addr, short vid)
 {
-	struct softif_neigh *softif_neigh;
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct softif_neigh *softif_neigh = NULL;
 	struct hlist_node *node;
 
+	softif_neigh_vid = softif_neigh_vid_get(bat_priv, vid);
+	if (!softif_neigh_vid)
+		goto out;
+
 	rcu_read_lock();
 	hlist_for_each_entry_rcu(softif_neigh, node,
-				 &bat_priv->softif_neigh_list, list) {
+				 &softif_neigh_vid->softif_neigh_list,
+				 list) {
 		if (!compare_eth(softif_neigh->addr, addr))
 			continue;
 
-		if (softif_neigh->vid != vid)
-			continue;
-
 		if (!atomic_inc_not_zero(&softif_neigh->refcount))
 			continue;
 
 		softif_neigh->last_seen = jiffies;
-		goto out;
+		goto unlock;
 	}
 
 	softif_neigh = kzalloc(sizeof(struct softif_neigh), GFP_ATOMIC);
 	if (!softif_neigh)
-		goto out;
+		goto unlock;
 
 	memcpy(softif_neigh->addr, addr, ETH_ALEN);
-	softif_neigh->vid = vid;
 	softif_neigh->last_seen = jiffies;
 	/* initialize with 2 - caller decrements counter by one */
 	atomic_set(&softif_neigh->refcount, 2);
 
 	INIT_HLIST_NODE(&softif_neigh->list);
 	spin_lock_bh(&bat_priv->softif_neigh_lock);
-	hlist_add_head_rcu(&softif_neigh->list, &bat_priv->softif_neigh_list);
+	hlist_add_head_rcu(&softif_neigh->list,
+			   &softif_neigh_vid->softif_neigh_list);
 	spin_unlock_bh(&bat_priv->softif_neigh_lock);
 
+unlock:
+	rcu_read_unlock();
 out:
+	if (softif_neigh_vid)
+		softif_neigh_vid_free_ref(softif_neigh_vid);
+	return softif_neigh;
+}
+
+static struct softif_neigh *softif_neigh_get_selected(
+				struct softif_neigh_vid *softif_neigh_vid)
+{
+	struct softif_neigh *softif_neigh;
+
+	rcu_read_lock();
+	softif_neigh = rcu_dereference(softif_neigh_vid->softif_neigh);
+
+	if (softif_neigh && !atomic_inc_not_zero(&softif_neigh->refcount))
+		softif_neigh = NULL;
+
 	rcu_read_unlock();
 	return softif_neigh;
 }
 
+static struct softif_neigh *softif_neigh_vid_get_selected(
+						struct bat_priv *bat_priv,
+						short vid)
+{
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct softif_neigh *softif_neigh = NULL;
+
+	softif_neigh_vid = softif_neigh_vid_get(bat_priv, vid);
+	if (!softif_neigh_vid)
+		goto out;
+
+	softif_neigh = softif_neigh_get_selected(softif_neigh_vid);
+out:
+	if (softif_neigh_vid)
+		softif_neigh_vid_free_ref(softif_neigh_vid);
+	return softif_neigh;
+}
+
+static void softif_neigh_vid_select(struct bat_priv *bat_priv,
+				    struct softif_neigh *new_neigh,
+				    short vid)
+{
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct softif_neigh *curr_neigh;
+
+	softif_neigh_vid = softif_neigh_vid_get(bat_priv, vid);
+	if (!softif_neigh_vid)
+		goto out;
+
+	spin_lock_bh(&bat_priv->softif_neigh_lock);
+
+	if (new_neigh && !atomic_inc_not_zero(&new_neigh->refcount))
+		new_neigh = NULL;
+
+	curr_neigh = softif_neigh_vid->softif_neigh;
+	rcu_assign_pointer(softif_neigh_vid->softif_neigh, new_neigh);
+
+	if ((curr_neigh) && (!new_neigh))
+		bat_dbg(DBG_ROUTES, bat_priv,
+			"Removing mesh exit point on vid: %d (prev: %pM).\n",
+			vid, curr_neigh->addr);
+	else if ((curr_neigh) && (new_neigh))
+		bat_dbg(DBG_ROUTES, bat_priv,
+			"Changing mesh exit point on vid: %d from %pM "
+			"to %pM.\n", vid, curr_neigh->addr, new_neigh->addr);
+	else if ((!curr_neigh) && (new_neigh))
+		bat_dbg(DBG_ROUTES, bat_priv,
+			"Setting mesh exit point on vid: %d to %pM.\n",
+			vid, new_neigh->addr);
+
+	if (curr_neigh)
+		softif_neigh_free_ref(curr_neigh);
+
+	spin_unlock_bh(&bat_priv->softif_neigh_lock);
+
+out:
+	if (softif_neigh_vid)
+		softif_neigh_vid_free_ref(softif_neigh_vid);
+}
+
+static void softif_neigh_vid_deselect(struct bat_priv *bat_priv,
+				      struct softif_neigh_vid *softif_neigh_vid)
+{
+	struct softif_neigh *curr_neigh;
+	struct softif_neigh *softif_neigh = NULL, *softif_neigh_tmp;
+	struct hard_iface *primary_if = NULL;
+	struct hlist_node *node;
+
+	primary_if = primary_if_get_selected(bat_priv);
+	if (!primary_if)
+		goto out;
+
+	/* find new softif_neigh immediately to avoid temporary loops */
+	rcu_read_lock();
+	curr_neigh = rcu_dereference(softif_neigh_vid->softif_neigh);
+
+	hlist_for_each_entry_rcu(softif_neigh_tmp, node,
+				 &softif_neigh_vid->softif_neigh_list,
+				 list) {
+		if (softif_neigh_tmp == curr_neigh)
+			continue;
+
+		/* we got a neighbor but its mac is 'bigger' than ours  */
+		if (memcmp(primary_if->net_dev->dev_addr,
+			   softif_neigh_tmp->addr, ETH_ALEN) < 0)
+			continue;
+
+		if (!atomic_inc_not_zero(&softif_neigh_tmp->refcount))
+			continue;
+
+		softif_neigh = softif_neigh_tmp;
+		goto unlock;
+	}
+
+unlock:
+	rcu_read_unlock();
+out:
+	softif_neigh_vid_select(bat_priv, softif_neigh, softif_neigh_vid->vid);
+
+	if (primary_if)
+		hardif_free_ref(primary_if);
+	if (softif_neigh)
+		softif_neigh_free_ref(softif_neigh);
+}
+
 int softif_neigh_seq_print_text(struct seq_file *seq, void *offset)
 {
 	struct net_device *net_dev = (struct net_device *)seq->private;
 	struct bat_priv *bat_priv = netdev_priv(net_dev);
+	struct softif_neigh_vid *softif_neigh_vid;
 	struct softif_neigh *softif_neigh;
 	struct hard_iface *primary_if;
-	struct hlist_node *node;
+	struct hlist_node *node, *node_tmp;
 	struct softif_neigh *curr_softif_neigh;
-	int ret = 0;
+	int ret = 0, last_seen_secs, last_seen_msecs;
 
 	primary_if = primary_if_get_selected(bat_priv);
 	if (!primary_if) {
@@ -237,17 +353,33 @@ int softif_neigh_seq_print_text(struct seq_file *seq, void *offset)
 
 	seq_printf(seq, "Softif neighbor list (%s)\n", net_dev->name);
 
-	curr_softif_neigh = softif_neigh_get_selected(bat_priv);
 	rcu_read_lock();
-	hlist_for_each_entry_rcu(softif_neigh, node,
-				 &bat_priv->softif_neigh_list, list)
-		seq_printf(seq, "%s %pM (vid: %d)\n",
-				curr_softif_neigh == softif_neigh
-				? "=>" : "  ", softif_neigh->addr,
-				softif_neigh->vid);
+	hlist_for_each_entry_rcu(softif_neigh_vid, node,
+				 &bat_priv->softif_neigh_vids, list) {
+		seq_printf(seq, "     %-15s %s on vid: %d\n",
+			   "Originator", "last-seen", softif_neigh_vid->vid);
+
+		curr_softif_neigh = softif_neigh_get_selected(softif_neigh_vid);
+
+		hlist_for_each_entry_rcu(softif_neigh, node_tmp,
+					 &softif_neigh_vid->softif_neigh_list,
+					 list) {
+			last_seen_secs = jiffies_to_msecs(jiffies -
+						softif_neigh->last_seen) / 1000;
+			last_seen_msecs = jiffies_to_msecs(jiffies -
+						softif_neigh->last_seen) % 1000;
+			seq_printf(seq, "%s %pM  %3i.%03is\n",
+				   curr_softif_neigh == softif_neigh
+				   ? "=>" : "  ", softif_neigh->addr,
+				   last_seen_secs, last_seen_msecs);
+		}
+
+		if (curr_softif_neigh)
+			softif_neigh_free_ref(curr_softif_neigh);
+
+		seq_printf(seq, "\n");
+	}
 	rcu_read_unlock();
-	if (curr_softif_neigh)
-		softif_neigh_free_ref(curr_softif_neigh);
 
 out:
 	if (primary_if)
@@ -255,6 +387,70 @@ out:
 	return ret;
 }
 
+void softif_neigh_purge(struct bat_priv *bat_priv)
+{
+	struct softif_neigh *softif_neigh, *curr_softif_neigh;
+	struct softif_neigh_vid *softif_neigh_vid;
+	struct hlist_node *node, *node_tmp, *node_tmp2;
+	char do_deselect;
+
+	rcu_read_lock();
+	hlist_for_each_entry_rcu(softif_neigh_vid, node,
+				 &bat_priv->softif_neigh_vids, list) {
+		if (!atomic_inc_not_zero(&softif_neigh_vid->refcount))
+			continue;
+
+		curr_softif_neigh = softif_neigh_get_selected(softif_neigh_vid);
+		do_deselect = 0;
+
+		spin_lock_bh(&bat_priv->softif_neigh_lock);
+		hlist_for_each_entry_safe(softif_neigh, node_tmp, node_tmp2,
+					  &softif_neigh_vid->softif_neigh_list,
+					  list) {
+			if ((!time_after(jiffies, softif_neigh->last_seen +
+				msecs_to_jiffies(SOFTIF_NEIGH_TIMEOUT))) &&
+			    (atomic_read(&bat_priv->mesh_state) == MESH_ACTIVE))
+				continue;
+
+			if (curr_softif_neigh == softif_neigh) {
+				bat_dbg(DBG_ROUTES, bat_priv,
+					"Current mesh exit point on vid: %d "
+					"'%pM' vanished.\n",
+					softif_neigh_vid->vid,
+					softif_neigh->addr);
+				do_deselect = 1;
+			}
+
+			hlist_del_rcu(&softif_neigh->list);
+			softif_neigh_free_ref(softif_neigh);
+		}
+		spin_unlock_bh(&bat_priv->softif_neigh_lock);
+
+		/* soft_neigh_vid_deselect() needs to acquire the
+		 * softif_neigh_lock */
+		if (do_deselect)
+			softif_neigh_vid_deselect(bat_priv, softif_neigh_vid);
+
+		if (curr_softif_neigh)
+			softif_neigh_free_ref(curr_softif_neigh);
+
+		softif_neigh_vid_free_ref(softif_neigh_vid);
+	}
+	rcu_read_unlock();
+
+	spin_lock_bh(&bat_priv->softif_neigh_vid_lock);
+	hlist_for_each_entry_safe(softif_neigh_vid, node, node_tmp,
+				  &bat_priv->softif_neigh_vids, list) {
+		if (!hlist_empty(&softif_neigh_vid->softif_neigh_list))
+			continue;
+
+		hlist_del_rcu(&softif_neigh_vid->list);
+		softif_neigh_vid_free_ref(softif_neigh_vid);
+	}
+	spin_unlock_bh(&bat_priv->softif_neigh_vid_lock);
+
+}
+
 static void softif_batman_recv(struct sk_buff *skb, struct net_device *dev,
 			       short vid)
 {
@@ -287,10 +483,7 @@ static void softif_batman_recv(struct sk_buff *skb, struct net_device *dev,
 	if (!softif_neigh)
 		goto out;
 
-	curr_softif_neigh = softif_neigh_get_selected(bat_priv);
-	if (!curr_softif_neigh)
-		goto out;
-
+	curr_softif_neigh = softif_neigh_vid_get_selected(bat_priv, vid);
 	if (curr_softif_neigh == softif_neigh)
 		goto out;
 
@@ -303,33 +496,16 @@ static void softif_batman_recv(struct sk_buff *skb, struct net_device *dev,
 		   softif_neigh->addr, ETH_ALEN) < 0)
 		goto out;
 
-	/* switch to new 'smallest neighbor' */
-	if ((curr_softif_neigh) &&
-	    (memcmp(softif_neigh->addr, curr_softif_neigh->addr,
-							ETH_ALEN) < 0)) {
-		bat_dbg(DBG_ROUTES, bat_priv,
-			"Changing mesh exit point from %pM (vid: %d) "
-			"to %pM (vid: %d).\n",
-			 curr_softif_neigh->addr,
-			 curr_softif_neigh->vid,
-			 softif_neigh->addr, softif_neigh->vid);
-
-		softif_neigh_select(bat_priv, softif_neigh);
-		goto out;
-	}
-
 	/* close own batX device and use softif_neigh as exit node */
-	if ((!curr_softif_neigh) &&
-	    (memcmp(softif_neigh->addr,
-		    primary_if->net_dev->dev_addr, ETH_ALEN) < 0)) {
-		bat_dbg(DBG_ROUTES, bat_priv,
-			"Setting mesh exit point to %pM (vid: %d).\n",
-			softif_neigh->addr, softif_neigh->vid);
-
-		softif_neigh_select(bat_priv, softif_neigh);
+	if (!curr_softif_neigh) {
+		softif_neigh_vid_select(bat_priv, softif_neigh, vid);
 		goto out;
 	}
 
+	/* switch to new 'smallest neighbor' */
+	if (memcmp(softif_neigh->addr, curr_softif_neigh->addr, ETH_ALEN) < 0)
+		softif_neigh_vid_select(bat_priv, softif_neigh, vid);
+
 out:
 	kfree_skb(skb);
 	if (softif_neigh)
@@ -424,8 +600,8 @@ int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
 	 * if we have a another chosen mesh exit node in range
 	 * it will transport the packets to the mesh
 	 */
-	curr_softif_neigh = softif_neigh_get_selected(bat_priv);
-	if ((curr_softif_neigh) && (curr_softif_neigh->vid == vid))
+	curr_softif_neigh = softif_neigh_vid_get_selected(bat_priv, vid);
+	if (curr_softif_neigh)
 		goto dropped;
 
 	/* TODO: check this for locks */
@@ -533,8 +709,8 @@ void interface_rx(struct net_device *soft_iface,
 	 * if we have a another chosen mesh exit node in range
 	 * it will transport the packets to the non-mesh network
 	 */
-	curr_softif_neigh = softif_neigh_get_selected(bat_priv);
-	if (curr_softif_neigh && (curr_softif_neigh->vid == vid)) {
+	curr_softif_neigh = softif_neigh_vid_get_selected(bat_priv, vid);
+	if (curr_softif_neigh) {
 		skb_push(skb, hdr_size);
 		unicast_packet = (struct unicast_packet *)skb->data;
 
@@ -671,7 +847,6 @@ struct net_device *softif_create(char *name)
 
 	bat_priv->primary_if = NULL;
 	bat_priv->num_ifaces = 0;
-	bat_priv->softif_neigh = NULL;
 
 	ret = sysfs_add_meshif(soft_iface);
 	if (ret < 0)
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 947bafc..9ae507a 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -146,14 +146,13 @@ struct bat_priv {
 	atomic_t bcast_queue_left;
 	atomic_t batman_queue_left;
 	char num_ifaces;
-	struct hlist_head softif_neigh_list;
-	struct softif_neigh __rcu *softif_neigh;
 	struct debug_log *debug_log;
 	struct kobject *mesh_obj;
 	struct dentry *debug_dir;
 	struct hlist_head forw_bat_list;
 	struct hlist_head forw_bcast_list;
 	struct hlist_head gw_list;
+	struct hlist_head softif_neigh_vids;
 	struct list_head vis_send_list;
 	struct hashtable_t *orig_hash;
 	struct hashtable_t *hna_local_hash;
@@ -167,6 +166,7 @@ struct bat_priv {
 	spinlock_t vis_hash_lock; /* protects vis_hash */
 	spinlock_t vis_list_lock; /* protects vis_info::recv_list */
 	spinlock_t softif_neigh_lock; /* protects soft-interface neigh list */
+	spinlock_t softif_neigh_vid_lock; /* protects soft-interface vid list */
 	int16_t num_local_hna;
 	atomic_t hna_local_changed;
 	struct delayed_work hna_work;
@@ -270,12 +270,21 @@ struct recvlist_node {
 	uint8_t mac[ETH_ALEN];
 };
 
-struct softif_neigh {
+struct softif_neigh_vid {
 	struct hlist_node list;
-	uint8_t addr[ETH_ALEN];
-	unsigned long last_seen;
+	struct bat_priv *bat_priv;
 	short vid;
 	atomic_t refcount;
+	struct softif_neigh __rcu *softif_neigh;
+	struct rcu_head rcu;
+	struct hlist_head softif_neigh_list;
+};
+
+struct softif_neigh {
+	struct hlist_node list;
+	uint8_t addr[ETH_ALEN];
+	unsigned long last_seen;
+	atomic_t refcount;
 	struct rcu_head rcu;
 };
 
-- 
1.7.5.1

^ permalink raw reply related

* [PATCH 1/8] batman-adv: remove misplaced comment
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Marek Lindner
In-Reply-To: <1304868284-9364-1-git-send-email-sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>

From: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>

Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
Signed-off-by: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
---
 net/batman-adv/originator.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index ef4a9be..51af91b 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -19,8 +19,6 @@
  *
  */
 
-/* increase the reference counter for this originator */
-
 #include "main.h"
 #include "originator.h"
 #include "hash.h"
-- 
1.7.5.1

^ permalink raw reply related

* pull request: batman-adv 2011-05-08
From: Sven Eckelmann @ 2011-05-08 15:24 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r

Hi,

I would like to propose following patches for net-next-2.6/2.6.40. They
include minor cleanups of comments, a big rename patch s/hna/tt/, but
also a remove some duplicated code. The spinlock which protected the
list of possible interfaces for batman-adv was completely replaced by
rtnl_lock because we want to be in sync with the rest of the network
stack and the extra spinlock made everything more complex without giving
any additional feature (and rtnl_lock was already used everywhere).
Related to this patch is also a fix which should prevent a deadlock
between the sysfs code and the event listener. Also the reference
counting in find_router was fixed when an error was detected after the
refcounter was already increased. The only feature is the support for
multiple vlans in the bridge loop detection code.

I will submit a patch to remove the atomic_dec_not_zero from main.h
after Linus accepted the patch you already saw.

thanks,
	Sven


The following changes since commit 32ae9b221e788413ce68feaae2ca39e406211a0a:

  batman-adv: Make bat_priv->primary_if an rcu protected pointer (2011-05-01 22:49:03 +0200)

are available in the git repository at:
  git://git.open-mesh.org/ecsv/linux-merge.git batman-adv/next

Antonio Quartulli (1):
      batman-adv: rename everything from *hna* into *tt* (translation table)

Daniele Furlan (1):
      batman-adv: remove duplicate code from function is_bidirectional_neigh()

Marek Lindner (3):
      batman-adv: remove misplaced comment
      batman-adv: multi vlan support for bridge loop detection
      batman-adv: Fix refcount imbalance in find_router

Sven Eckelmann (3):
      batman-adv: Remove unnecessary hardif_list_lock
      batman-adv: Avoid deadlock between rtnl_lock and s_active
      batman-adv: Remove multiline comments from line ending

 Documentation/networking/batman-adv.txt |   11 +-
 net/batman-adv/aggregation.c            |   16 +-
 net/batman-adv/aggregation.h            |    4 +-
 net/batman-adv/bat_debugfs.c            |    4 +-
 net/batman-adv/bat_sysfs.c              |   16 +-
 net/batman-adv/hard-interface.c         |   36 +--
 net/batman-adv/main.c                   |   20 +-
 net/batman-adv/main.h                   |   42 ++--
 net/batman-adv/originator.c             |   10 +-
 net/batman-adv/packet.h                 |    5 +-
 net/batman-adv/routing.c                |  162 ++++++-------
 net/batman-adv/routing.h                |    6 +-
 net/batman-adv/send.c                   |   16 +-
 net/batman-adv/send.h                   |    2 +-
 net/batman-adv/soft-interface.c         |  409 +++++++++++++++++++++---------
 net/batman-adv/translation-table.c      |  417 ++++++++++++++++---------------
 net/batman-adv/translation-table.h      |   24 +-
 net/batman-adv/types.h                  |   49 +++--
 net/batman-adv/unicast.c                |    2 +-
 net/batman-adv/vis.c                    |   18 +-
 20 files changed, 712 insertions(+), 557 deletions(-)

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Alex Bligh @ 2011-05-08 15:17 UTC (permalink / raw)
  To: paulmck; +Cc: Eric Dumazet, netdev, Alex Bligh
In-Reply-To: <20110508144749.GR2641@linux.vnet.ibm.com>

Paul,

>> No, I waited a few minutes after boot for the system to stabilize, and
>> all CPUs were definitely online.
>>
>> The patch to the kernel I am running is below.
>
> OK, interesting...
>
> My guess is that you need to be using ktime_get_ts().  Isn't ktime_get()
> subject to various sorts of adjustment?

It's Eric's code, not mine, but:

kernel/time/timekeeping.c suggests they do the same thing
(adjust xtime by wall_to_monotonic), just one returns a
struct timespec and the other returns a ktime_t.

>> >> There is nothing much going on these systems (idle, no other users,
>> >> just normal system daemons).
>> >
>> > And normal system daemons might cause this, right?
>>
>> Yes. Everything is normal, except I did
>> service udev stop
>> unshare -n bash
>> which together stop the system running interface scripts when
>> interfaces are created (as upstart and upstart-udev-bridge are
>> now integrated, you can't kill upstart, so you have to rely on
>> unshare -n to stop the events being propagated). That's just
>> to avoid measuring the time it takes to execute the scripts.
>
> OK, so you really could be seeing grace periods started by these system
> daemons.

In 50% of 200 calls? That seems pretty unlikely. I think it's more
likely to be the 6 jiffies per call to ensure cpus are idle,
plus the 3 calls per interface destroy.

If 6 jiffies per call to ensure cpus are idle is a fact of life,
then the question goes back to why interface removal is waiting
for rcu readers to be released synchronously, as opposed to
doing the update bits synchronously, then doing the reclaim
element (freeing the memory) afterwards using call_rcu.

-- 
Alex Bligh

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 14:47 UTC (permalink / raw)
  To: Alex Bligh; +Cc: Eric Dumazet, netdev
In-Reply-To: <C449131127D58077CB25C9D8@Ximines.local>

On Sun, May 08, 2011 at 03:27:07PM +0100, Alex Bligh wrote:
> Paul,
> 
> >>Yes, really 20-49us and 50-99us, not ms. Raw data attached :-)
> >>
> >>I'm guessing there are circumstances where there is an early exit.
> >
> >Well, if you were onlining and offlining CPUs, then if there was only
> >one CPU online, this could happen.
> 
> No, I wasn't doing that.

OK.

> > And there really is only one CPU
> >online during boot, so if your measurements included early boot time,
> >this could easily explain these very short timings.
> 
> No, I waited a few minutes after boot for the system to stabilize, and
> all CPUs were definitely online.
> 
> The patch to the kernel I am running is below.

OK, interesting...

My guess is that you need to be using ktime_get_ts().  Isn't ktime_get()
subject to various sorts of adjustment?

> >>There is nothing much going on these systems (idle, no other users,
> >>just normal system daemons).
> >
> >And normal system daemons might cause this, right?
> 
> Yes. Everything is normal, except I did
> service udev stop
> unshare -n bash
> which together stop the system running interface scripts when
> interfaces are created (as upstart and upstart-udev-bridge are
> now integrated, you can't kill upstart, so you have to rely on
> unshare -n to stop the events being propagated). That's just
> to avoid measuring the time it takes to execute the scripts.

OK, so you really could be seeing grace periods started by these system
daemons.

							Thanx, Paul

> -- 
> Alex Bligh
> 
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index dd4aea8..e401018 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1518,6 +1518,7 @@ EXPORT_SYMBOL_GPL(call_rcu_bh);
> void synchronize_sched(void)
> {
>        struct rcu_synchronize rcu;
> +       ktime_t time_start = ktime_get();
> 
>        if (rcu_blocking_is_gp())
>                return;
> @@ -1529,6 +1530,7 @@ void synchronize_sched(void)
>        /* Wait for it. */
>        wait_for_completion(&rcu.completion);
>        destroy_rcu_head_on_stack(&rcu.head);
> +       pr_err("synchronize_sched() in %lld us\n",
> ktime_us_delta(ktime_get(), time_start));
> }
> EXPORT_SYMBOL_GPL(synchronize_sched);
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 856b6ee..013f627 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5164,7 +5164,9 @@ static void rollback_registered_many(struct
> list_head *head)
>        dev = list_first_entry(head, struct net_device, unreg_list);
>        call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev);
> 
> +       pr_err("begin rcu_barrier()\n");
>        rcu_barrier();
> +       pr_err("end rcu_barrier()\n");
> 
>        list_for_each_entry(dev, head, unreg_list)
>                dev_put(dev);
> @@ -5915,8 +5917,10 @@ EXPORT_SYMBOL(free_netdev);
>  */
> void synchronize_net(void)
> {
> +       pr_err("begin synchronize_net()\n");
>        might_sleep();
>        synchronize_rcu();
> +       pr_err("end synchronize_net()\n");
> }
> EXPORT_SYMBOL(synchronize_net);
> 
> 

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Alex Bligh @ 2011-05-08 14:27 UTC (permalink / raw)
  To: paulmck; +Cc: Eric Dumazet, netdev, Alex Bligh
In-Reply-To: <20110508134425.GL2641@linux.vnet.ibm.com>

Paul,

>> Yes, really 20-49us and 50-99us, not ms. Raw data attached :-)
>>
>> I'm guessing there are circumstances where there is an early exit.
>
> Well, if you were onlining and offlining CPUs, then if there was only
> one CPU online, this could happen.

No, I wasn't doing that.

>  And there really is only one CPU
> online during boot, so if your measurements included early boot time,
> this could easily explain these very short timings.

No, I waited a few minutes after boot for the system to stabilize, and
all CPUs were definitely online.

The patch to the kernel I am running is below.

>> There is nothing much going on these systems (idle, no other users,
>> just normal system daemons).
>
> And normal system daemons might cause this, right?

Yes. Everything is normal, except I did
 service udev stop
 unshare -n bash
which together stop the system running interface scripts when
interfaces are created (as upstart and upstart-udev-bridge are
now integrated, you can't kill upstart, so you have to rely on
unshare -n to stop the events being propagated). That's just
to avoid measuring the time it takes to execute the scripts.

-- 
Alex Bligh

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index dd4aea8..e401018 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1518,6 +1518,7 @@ EXPORT_SYMBOL_GPL(call_rcu_bh);
 void synchronize_sched(void)
 {
        struct rcu_synchronize rcu;
+       ktime_t time_start = ktime_get();

        if (rcu_blocking_is_gp())
                return;
@@ -1529,6 +1530,7 @@ void synchronize_sched(void)
        /* Wait for it. */
        wait_for_completion(&rcu.completion);
        destroy_rcu_head_on_stack(&rcu.head);
+       pr_err("synchronize_sched() in %lld us\n", 
ktime_us_delta(ktime_get(), time_start));
 }
 EXPORT_SYMBOL_GPL(synchronize_sched);

diff --git a/net/core/dev.c b/net/core/dev.c
index 856b6ee..013f627 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5164,7 +5164,9 @@ static void rollback_registered_many(struct list_head 
*head)
        dev = list_first_entry(head, struct net_device, unreg_list);
        call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev);

+       pr_err("begin rcu_barrier()\n");
        rcu_barrier();
+       pr_err("end rcu_barrier()\n");

        list_for_each_entry(dev, head, unreg_list)
                dev_put(dev);
@@ -5915,8 +5917,10 @@ EXPORT_SYMBOL(free_netdev);
  */
 void synchronize_net(void)
 {
+       pr_err("begin synchronize_net()\n");
        might_sleep();
        synchronize_rcu();
+       pr_err("end synchronize_net()\n");
 }
 EXPORT_SYMBOL(synchronize_net);



^ permalink raw reply related

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 13:44 UTC (permalink / raw)
  To: Alex Bligh; +Cc: Eric Dumazet, netdev
In-Reply-To: <B2891EFD056565BBD4DBCE16@nimrod.local>

On Sun, May 08, 2011 at 02:13:30PM +0100, Alex Bligh wrote:
> 
> >>The fact that increasing HZ masks the problem seems to imply that
> >>sychronize_sched() is waiting when it shouldn't be, as it suggests
> >>it's waiting for a context switch. But surely it shouldn't be
> >>waiting for context switch if all other cpu cores are idle?
> >>It knows that it (the caller) doesn't hold an rcu_read_lock,
> >>and presumably can see the other cpus are in the idle state,
> >>in which case surely it should return immediately? Distribution
> >>of latency in synchronize_sched() looks like this:
> >>
> >>20-49 us 110 instances (27.500%)
> >>50-99 us 45 instances (11.250%)
> >
> >Really?  I am having a hard time believing this above two.  Is this really
> >2000-4999 us and 5000-9999 us?  That would be much more believable,
> >and expected on a busy system with lots of context switching.  Or on a
> >system with CONFIG_NO_HZ=n.
> 
> Yes, really 20-49us and 50-99us, not ms. Raw data attached :-)
> 
> I'm guessing there are circumstances where there is an early exit.

Well, if you were onlining and offlining CPUs, then if there was only
one CPU online, this could happen.  And there really is only one CPU
online during boot, so if your measurements included early boot time,
this could easily explain these very short timings.

> $ fgrep HZ .config
> CONFIG_RCU_FAST_NO_HZ=y
> CONFIG_NO_HZ=y
> CONFIG_HZ_100=y
> # CONFIG_HZ_250 is not set
> # CONFIG_HZ_300 is not set
> # CONFIG_HZ_1000 is not set
> CONFIG_HZ=100
> # CONFIG_MACHZ_WDT is not set
> 
> >
> >>5000-9999 us 5 instances (1.250%)
> >
> >This makes sense for a mostly-idle system with frequent short bursts
> >of work.
> >
> >>10000-19999 us 33 instances (8.250%)
> >
> >This makes sense for a CONFIG_NO_HZ system that is idle, where there
> >is some amount of background work that is also using RCU grace periods.
> >
> >>20000-49999 us 4 instances (1.000%)
> >>50000-99999 us 191 instances (47.750%)
> >>100000-199999 us 12 instances (3.000%)
> >
> >These last involve additional delays.  Possibilities include long-running
> >irq handlers, SMIs, or NMIs.
> 
> There is nothing much going on these systems (idle, no other users,
> just normal system daemons).

And normal system daemons might cause this, right?

> Note this is with CONFIG_HZ=100 (which is the Ubuntu default). I wonder
> if that means you need to scale your expactations by a factor if 10 (i.e.
> you'd expect 50000-99999 for "a mostly-idle system with frequent
> short bursts of work."

Indeed, I was thinking in terms of HZ=1000.

							Thanx, Paul

> Interestingly there are quite a few of these on boot up. If this
> is a CONFIG_HZ thing, then setting it to 1000 would probably take
> half a second off bootup time.
> 
> 
> -- 
> Alex Bligh
> 
> 
> May  8 09:47:31 nattytest kernel: [  177.030197] synchronize_sched()
> in 66921 us
> May  8 09:47:31 nattytest kernel: [  177.120085] synchronize_sched()
> in 89080 us
> May  8 09:47:31 nattytest kernel: [  177.190910] synchronize_sched()
> in 46 us
> May  8 09:47:31 nattytest kernel: [  177.210087] synchronize_sched()
> in 18686 us
> May  8 09:47:32 nattytest kernel: [  177.400080] synchronize_sched()
> in 110609 us
> May  8 09:47:32 nattytest kernel: [  177.480071] synchronize_sched()
> in 78550 us
> May  8 09:47:32 nattytest kernel: [  177.550119] synchronize_sched()
> in 19087 us
> May  8 09:47:32 nattytest kernel: [  177.551761] synchronize_sched()
> in 79 us
> May  8 09:47:32 nattytest kernel: [  177.670085] synchronize_sched()
> in 60616 us
> May  8 09:47:32 nattytest kernel: [  177.760075] synchronize_sched()
> in 88465 us
> May  8 09:47:32 nattytest kernel: [  177.820999] synchronize_sched()
> in 45 us
> May  8 09:47:32 nattytest kernel: [  177.840086] synchronize_sched()
> in 17579 us
> May  8 09:47:32 nattytest kernel: [  177.970084] synchronize_sched()
> in 70925 us
> May  8 09:47:32 nattytest kernel: [  178.050092] synchronize_sched()
> in 78477 us
> May  8 09:47:32 nattytest kernel: [  178.101046] synchronize_sched()
> in 39 us
> May  8 09:47:32 nattytest kernel: [  178.102574] synchronize_sched()
> in 48 us
> May  8 09:47:33 nattytest kernel: [  178.230082] synchronize_sched()
> in 70966 us
> May  8 09:47:33 nattytest kernel: [  178.310071] synchronize_sched()
> in 78503 us
> May  8 09:47:33 nattytest kernel: [  178.371056] synchronize_sched()
> in 43 us
> May  8 09:47:33 nattytest kernel: [  178.390094] synchronize_sched()
> in 17553 us
> May  8 09:47:33 nattytest kernel: [  178.540084] synchronize_sched()
> in 70533 us
> May  8 09:47:33 nattytest kernel: [  178.620074] synchronize_sched()
> in 79172 us
> May  8 09:47:33 nattytest kernel: [  178.671124] synchronize_sched()
> in 57 us
> May  8 09:47:33 nattytest kernel: [  178.672645] synchronize_sched()
> in 49 us
> May  8 09:47:33 nattytest kernel: [  178.830106] synchronize_sched()
> in 100955 us
> May  8 09:47:33 nattytest kernel: [  178.910084] synchronize_sched()
> in 78408 us
> May  8 09:47:33 nattytest kernel: [  178.961090] synchronize_sched()
> in 43 us
> May  8 09:47:33 nattytest kernel: [  178.962642] synchronize_sched()
> in 50 us
> May  8 09:47:33 nattytest kernel: [  179.090088] synchronize_sched()
> in 71354 us
> May  8 09:47:33 nattytest kernel: [  179.220071] synchronize_sched()
> in 128463 us
> May  8 09:47:34 nattytest kernel: [  179.300867] synchronize_sched()
> in 52 us
> May  8 09:47:34 nattytest kernel: [  179.302079] synchronize_sched()
> in 48 us
> May  8 09:47:34 nattytest kernel: [  179.420085] synchronize_sched()
> in 61562 us
> May  8 09:47:34 nattytest kernel: [  179.500093] synchronize_sched()
> in 78506 us
> May  8 09:47:34 nattytest kernel: [  179.551048] synchronize_sched()
> in 42 us
> May  8 09:47:34 nattytest kernel: [  179.552637] synchronize_sched()
> in 51 us
> May  8 09:47:34 nattytest kernel: [  179.670088] synchronize_sched()
> in 61469 us
> May  8 09:47:34 nattytest kernel: [  179.760078] synchronize_sched()
> in 88430 us
> May  8 09:47:34 nattytest kernel: [  179.830918] synchronize_sched()
> in 44 us
> May  8 09:47:34 nattytest kernel: [  179.850173] synchronize_sched()
> in 17783 us
> May  8 09:47:34 nattytest kernel: [  180.080085] synchronize_sched()
> in 150585 us
> May  8 09:47:34 nattytest kernel: [  180.160082] synchronize_sched()
> in 78381 us
> May  8 09:47:34 nattytest kernel: [  180.211027] synchronize_sched()
> in 39 us
> May  8 09:47:34 nattytest kernel: [  180.212186] synchronize_sched()
> in 52 us
> May  8 09:47:35 nattytest kernel: [  180.320091] synchronize_sched()
> in 50520 us
> May  8 09:47:35 nattytest kernel: [  180.400074] synchronize_sched()
> in 78525 us
> May  8 09:47:35 nattytest kernel: [  180.451028] synchronize_sched()
> in 50 us
> May  8 09:47:35 nattytest kernel: [  180.452100] synchronize_sched()
> in 30 us
> May  8 09:47:35 nattytest kernel: [  180.570086] synchronize_sched()
> in 61211 us
> May  8 09:47:35 nattytest kernel: [  180.650073] synchronize_sched()
> in 79145 us
> May  8 09:47:35 nattytest kernel: [  180.701376] synchronize_sched()
> in 38 us
> May  8 09:47:35 nattytest kernel: [  180.703490] synchronize_sched()
> in 57 us
> May  8 09:47:35 nattytest kernel: [  180.820087] synchronize_sched()
> in 61483 us
> May  8 09:47:35 nattytest kernel: [  180.910081] synchronize_sched()
> in 88485 us
> May  8 09:47:35 nattytest kernel: [  180.965970] synchronize_sched()
> in 49 us
> May  8 09:47:35 nattytest kernel: [  180.990091] synchronize_sched()
> in 22425 us
> May  8 09:47:35 nattytest kernel: [  181.150084] synchronize_sched()
> in 71317 us
> May  8 09:47:36 nattytest kernel: [  181.230074] synchronize_sched()
> in 78470 us
> May  8 09:47:36 nattytest kernel: [  181.300099] synchronize_sched()
> in 18988 us
> May  8 09:47:36 nattytest kernel: [  181.301637] synchronize_sched()
> in 46 us
> May  8 09:47:36 nattytest kernel: [  181.420086] synchronize_sched()
> in 61240 us
> May  8 09:47:36 nattytest kernel: [  181.500072] synchronize_sched()
> in 77682 us
> May  8 09:47:36 nattytest kernel: [  181.551059] synchronize_sched()
> in 45 us
> May  8 09:47:36 nattytest kernel: [  181.552546] synchronize_sched()
> in 29 us
> May  8 09:47:36 nattytest kernel: [  181.670084] synchronize_sched()
> in 61612 us
> May  8 09:47:36 nattytest kernel: [  181.750076] synchronize_sched()
> in 78513 us
> May  8 09:47:36 nattytest kernel: [  181.801195] synchronize_sched()
> in 52 us
> May  8 09:47:36 nattytest kernel: [  181.802805] synchronize_sched()
> in 69 us
> May  8 09:47:36 nattytest kernel: [  181.920088] synchronize_sched()
> in 61998 us
> May  8 09:47:36 nattytest kernel: [  182.000091] synchronize_sched()
> in 78539 us
> May  8 09:47:36 nattytest kernel: [  182.051053] synchronize_sched()
> in 42 us
> May  8 09:47:36 nattytest kernel: [  182.052595] synchronize_sched()
> in 29 us
> May  8 09:47:36 nattytest kernel: [  182.170103] synchronize_sched()
> in 61607 us
> May  8 09:47:37 nattytest kernel: [  182.260072] synchronize_sched()
> in 88460 us
> May  8 09:47:37 nattytest kernel: [  182.331028] synchronize_sched()
> in 44 us
> May  8 09:47:37 nattytest kernel: [  182.350096] synchronize_sched()
> in 17563 us
> May  8 09:47:37 nattytest kernel: [  182.500085] synchronize_sched()
> in 71793 us
> May  8 09:47:37 nattytest kernel: [  182.620085] synchronize_sched()
> in 118343 us
> May  8 09:47:37 nattytest kernel: [  182.671024] synchronize_sched()
> in 39 us
> May  8 09:47:37 nattytest kernel: [  182.672511] synchronize_sched()
> in 29 us
> May  8 09:47:37 nattytest kernel: [  182.830096] synchronize_sched()
> in 101470 us
> May  8 09:47:37 nattytest kernel: [  182.910081] synchronize_sched()
> in 78413 us
> May  8 09:47:37 nattytest kernel: [  182.971056] synchronize_sched()
> in 43 us
> May  8 09:47:37 nattytest kernel: [  182.972568] synchronize_sched()
> in 44 us
> May  8 09:47:37 nattytest kernel: [  183.100084] synchronize_sched()
> in 60854 us
> May  8 09:47:37 nattytest kernel: [  183.170097] synchronize_sched()
> in 68450 us
> May  8 09:47:37 nattytest kernel: [  183.221081] synchronize_sched()
> in 40 us
> May  8 09:47:37 nattytest kernel: [  183.222580] synchronize_sched()
> in 29 us
> May  8 09:47:38 nattytest kernel: [  183.340082] synchronize_sched()
> in 61422 us
> May  8 09:47:38 nattytest kernel: [  183.420078] synchronize_sched()
> in 79154 us
> May  8 09:47:38 nattytest kernel: [  183.471003] synchronize_sched()
> in 41 us
> May  8 09:47:38 nattytest kernel: [  183.472469] synchronize_sched()
> in 29 us
> May  8 09:47:38 nattytest kernel: [  183.590095] synchronize_sched()
> in 61591 us
> May  8 09:47:38 nattytest kernel: [  183.670069] synchronize_sched()
> in 78533 us
> May  8 09:47:38 nattytest kernel: [  183.721106] synchronize_sched()
> in 43 us
> May  8 09:47:38 nattytest kernel: [  183.722663] synchronize_sched()
> in 49 us
> May  8 09:47:38 nattytest kernel: [  183.850094] synchronize_sched()
> in 71060 us
> May  8 09:47:38 nattytest kernel: [  183.930080] synchronize_sched()
> in 78522 us
> May  8 09:47:38 nattytest kernel: [  183.981040] synchronize_sched()
> in 44 us
> May  8 09:47:38 nattytest kernel: [  183.990375] synchronize_sched()
> in 7913 us
> May  8 09:47:38 nattytest kernel: [  184.150080] synchronize_sched()
> in 81568 us
> May  8 09:47:38 nattytest kernel: [  184.220088] synchronize_sched()
> in 68481 us
> May  8 09:47:39 nattytest kernel: [  184.281161] synchronize_sched()
> in 65 us
> May  8 09:47:39 nattytest kernel: [  184.282733] synchronize_sched()
> in 60 us
> May  8 09:47:39 nattytest kernel: [  184.400079] synchronize_sched()
> in 61791 us
> May  8 09:47:39 nattytest kernel: [  184.480104] synchronize_sched()
> in 79181 us
> May  8 09:47:39 nattytest kernel: [  184.550103] synchronize_sched()
> in 19063 us
> May  8 09:47:39 nattytest kernel: [  184.551621] synchronize_sched()
> in 30 us
> May  8 09:47:39 nattytest kernel: [  184.680083] synchronize_sched()
> in 71800 us
> May  8 09:47:39 nattytest kernel: [  184.750084] synchronize_sched()
> in 69162 us
> May  8 09:47:39 nattytest kernel: [  184.801153] synchronize_sched()
> in 51 us
> May  8 09:47:39 nattytest kernel: [  184.802802] synchronize_sched()
> in 53 us
> May  8 09:47:39 nattytest kernel: [  184.920091] synchronize_sched()
> in 61217 us
> May  8 09:47:39 nattytest kernel: [  185.000074] synchronize_sched()
> in 79141 us
> May  8 09:47:39 nattytest kernel: [  185.050985] synchronize_sched()
> in 40 us
> May  8 09:47:39 nattytest kernel: [  185.052727] synchronize_sched()
> in 47 us
> May  8 09:47:39 nattytest kernel: [  185.170087] synchronize_sched()
> in 62802 us
> May  8 09:47:40 nattytest kernel: [  185.250074] synchronize_sched()
> in 78418 us
> May  8 09:47:40 nattytest kernel: [  185.311022] synchronize_sched()
> in 40 us
> May  8 09:47:40 nattytest kernel: [  185.312542] synchronize_sched()
> in 63 us
> May  8 09:47:40 nattytest kernel: [  185.430111] synchronize_sched()
> in 61894 us
> May  8 09:47:40 nattytest kernel: [  185.510073] synchronize_sched()
> in 78410 us
> May  8 09:47:40 nattytest kernel: [  185.561055] synchronize_sched()
> in 58 us
> May  8 09:47:40 nattytest kernel: [  185.562589] synchronize_sched()
> in 45 us
> May  8 09:47:40 nattytest kernel: [  185.680091] synchronize_sched()
> in 62023 us
> May  8 09:47:40 nattytest kernel: [  185.760076] synchronize_sched()
> in 78438 us
> May  8 09:47:40 nattytest kernel: [  185.811063] synchronize_sched()
> in 45 us
> May  8 09:47:40 nattytest kernel: [  185.812580] synchronize_sched()
> in 52 us
> May  8 09:47:40 nattytest kernel: [  185.930089] synchronize_sched()
> in 61864 us
> May  8 09:47:40 nattytest kernel: [  186.010072] synchronize_sched()
> in 78465 us
> May  8 09:47:40 nattytest kernel: [  186.061141] synchronize_sched()
> in 44 us
> May  8 09:47:40 nattytest kernel: [  186.062631] synchronize_sched()
> in 29 us
> May  8 09:47:40 nattytest kernel: [  186.180078] synchronize_sched()
> in 61806 us
> May  8 09:47:41 nattytest kernel: [  186.260074] synchronize_sched()
> in 78415 us
> May  8 09:47:41 nattytest kernel: [  186.311073] synchronize_sched()
> in 43 us
> May  8 09:47:41 nattytest kernel: [  186.312573] synchronize_sched()
> in 29 us
> May  8 09:47:41 nattytest kernel: [  186.440083] synchronize_sched()
> in 72358 us
> May  8 09:47:41 nattytest kernel: [  186.520071] synchronize_sched()
> in 78395 us
> May  8 09:47:41 nattytest kernel: [  186.573068] synchronize_sched()
> in 66 us
> May  8 09:47:41 nattytest kernel: [  186.590105] synchronize_sched()
> in 15551 us
> May  8 09:47:41 nattytest kernel: [  186.740092] synchronize_sched()
> in 71884 us
> May  8 09:47:41 nattytest kernel: [  186.830069] synchronize_sched()
> in 89123 us
> May  8 09:47:41 nattytest kernel: [  186.890967] synchronize_sched()
> in 41 us
> May  8 09:47:41 nattytest kernel: [  186.910091] synchronize_sched()
> in 18639 us
> May  8 09:47:41 nattytest kernel: [  187.070078] synchronize_sched()
> in 82847 us
> May  8 09:47:41 nattytest kernel: [  187.140090] synchronize_sched()
> in 68499 us
> May  8 09:47:41 nattytest kernel: [  187.191148] synchronize_sched()
> in 57 us
> May  8 09:47:41 nattytest kernel: [  187.192743] synchronize_sched()
> in 69 us
> May  8 09:47:42 nattytest kernel: [  187.310087] synchronize_sched()
> in 63069 us
> May  8 09:47:42 nattytest kernel: [  187.400076] synchronize_sched()
> in 88432 us
> May  8 09:47:42 nattytest kernel: [  187.461521] synchronize_sched()
> in 57 us
> May  8 09:47:42 nattytest kernel: [  187.480099] synchronize_sched()
> in 16493 us
> May  8 09:47:42 nattytest kernel: [  187.640081] synchronize_sched()
> in 82269 us
> May  8 09:47:42 nattytest kernel: [  187.710079] synchronize_sched()
> in 68389 us
> May  8 09:47:42 nattytest kernel: [  187.761071] synchronize_sched()
> in 38 us
> May  8 09:47:42 nattytest kernel: [  187.762623] synchronize_sched()
> in 67 us
> May  8 09:47:42 nattytest kernel: [  187.880077] synchronize_sched()
> in 61847 us
> May  8 09:47:42 nattytest kernel: [  187.960096] synchronize_sched()
> in 78450 us
> May  8 09:47:42 nattytest kernel: [  188.011147] synchronize_sched()
> in 62 us
> May  8 09:47:42 nattytest kernel: [  188.012617] synchronize_sched()
> in 29 us
> May  8 09:47:42 nattytest kernel: [  188.130083] synchronize_sched()
> in 62431 us
> May  8 09:47:42 nattytest kernel: [  188.210090] synchronize_sched()
> in 78447 us
> May  8 09:47:43 nattytest kernel: [  188.261015] synchronize_sched()
> in 38 us
> May  8 09:47:43 nattytest kernel: [  188.262491] synchronize_sched()
> in 29 us
> May  8 09:47:43 nattytest kernel: [  188.380097] synchronize_sched()
> in 61923 us
> May  8 09:47:43 nattytest kernel: [  188.470131] synchronize_sched()
> in 88521 us
> May  8 09:47:43 nattytest kernel: [  188.531024] synchronize_sched()
> in 46 us
> May  8 09:47:43 nattytest kernel: [  188.550087] synchronize_sched()
> in 17676 us
> May  8 09:47:43 nattytest kernel: [  188.690085] synchronize_sched()
> in 71911 us
> May  8 09:47:43 nattytest kernel: [  188.820071] synchronize_sched()
> in 128473 us
> May  8 09:47:43 nattytest kernel: [  188.881032] synchronize_sched()
> in 42 us
> May  8 09:47:43 nattytest kernel: [  188.900085] synchronize_sched()
> in 17588 us
> May  8 09:47:43 nattytest kernel: [  189.080084] synchronize_sched()
> in 111945 us
> May  8 09:47:43 nattytest kernel: [  189.170068] synchronize_sched()
> in 88449 us
> May  8 09:47:43 nattytest kernel: [  189.221066] synchronize_sched()
> in 41 us
> May  8 09:47:44 nattytest kernel: [  189.230257] synchronize_sched()
> in 7463 us
> May  8 09:47:44 nattytest kernel: [  189.380093] synchronize_sched()
> in 71896 us
> May  8 09:47:44 nattytest kernel: [  189.470093] synchronize_sched()
> in 88481 us
> May  8 09:47:44 nattytest kernel: [  189.550883] synchronize_sched()
> in 43 us
> May  8 09:47:44 nattytest kernel: [  189.552391] synchronize_sched()
> in 29 us
> May  8 09:47:44 nattytest kernel: [  189.670085] synchronize_sched()
> in 61850 us
> May  8 09:47:44 nattytest kernel: [  189.760080] synchronize_sched()
> in 88549 us
> May  8 09:47:44 nattytest kernel: [  189.821014] synchronize_sched()
> in 44 us
> May  8 09:47:44 nattytest kernel: [  189.850080] synchronize_sched()
> in 27628 us
> May  8 09:47:44 nattytest kernel: [  189.990087] synchronize_sched()
> in 72251 us
> May  8 09:47:44 nattytest kernel: [  190.080074] synchronize_sched()
> in 88486 us
> May  8 09:47:44 nattytest kernel: [  190.150968] synchronize_sched()
> in 71 us
> May  8 09:47:44 nattytest kernel: [  190.170092] synchronize_sched()
> in 17672 us
> May  8 09:47:45 nattytest kernel: [  190.320088] synchronize_sched()
> in 71937 us
> May  8 09:47:45 nattytest kernel: [  190.410068] synchronize_sched()
> in 89155 us
> May  8 09:47:45 nattytest kernel: [  190.490882] synchronize_sched()
> in 40 us
> May  8 09:47:45 nattytest kernel: [  190.492405] synchronize_sched()
> in 29 us
> May  8 09:47:45 nattytest kernel: [  190.620103] synchronize_sched()
> in 62808 us
> May  8 09:47:45 nattytest kernel: [  190.700108] synchronize_sched()
> in 78486 us
> May  8 09:47:45 nattytest kernel: [  190.820119] synchronize_sched()
> in 69075 us
> May  8 09:47:45 nattytest kernel: [  190.870096] synchronize_sched()
> in 48447 us
> May  8 09:47:45 nattytest kernel: [  191.000082] synchronize_sched()
> in 62795 us
> May  8 09:47:45 nattytest kernel: [  191.080082] synchronize_sched()
> in 78489 us
> May  8 09:47:45 nattytest kernel: [  191.141021] synchronize_sched()
> in 61 us
> May  8 09:47:45 nattytest kernel: [  191.160086] synchronize_sched()
> in 17596 us
> May  8 09:47:46 nattytest kernel: [  191.310097] synchronize_sched()
> in 82089 us
> May  8 09:47:46 nattytest kernel: [  191.390076] synchronize_sched()
> in 78427 us
> May  8 09:47:46 nattytest kernel: [  191.451045] synchronize_sched()
> in 49 us
> May  8 09:47:46 nattytest kernel: [  191.470088] synchronize_sched()
> in 17643 us
> May  8 09:47:46 nattytest kernel: [  191.620095] synchronize_sched()
> in 72871 us
> May  8 09:47:46 nattytest kernel: [  191.700072] synchronize_sched()
> in 79137 us
> May  8 09:47:46 nattytest kernel: [  191.751087] synchronize_sched()
> in 40 us
> May  8 09:47:46 nattytest kernel: [  191.752600] synchronize_sched()
> in 48 us
> May  8 09:47:46 nattytest kernel: [  191.880092] synchronize_sched()
> in 72297 us
> May  8 09:47:46 nattytest kernel: [  191.950076] synchronize_sched()
> in 69142 us
> May  8 09:47:46 nattytest kernel: [  192.005349] synchronize_sched()
> in 54 us
> May  8 09:47:46 nattytest kernel: [  192.006834] synchronize_sched()
> in 30 us
> May  8 09:47:46 nattytest kernel: [  192.130091] synchronize_sched()
> in 72839 us
> May  8 09:47:46 nattytest kernel: [  192.210069] synchronize_sched()
> in 78535 us
> May  8 09:47:47 nattytest kernel: [  192.270973] synchronize_sched()
> in 43 us
> May  8 09:47:47 nattytest kernel: [  192.300094] synchronize_sched()
> in 27592 us
> May  8 09:47:47 nattytest kernel: [  192.450079] synchronize_sched()
> in 83072 us
> May  8 09:47:47 nattytest kernel: [  192.520073] synchronize_sched()
> in 68499 us
> May  8 09:47:47 nattytest kernel: [  192.571106] synchronize_sched()
> in 44 us
> May  8 09:47:47 nattytest kernel: [  192.572585] synchronize_sched()
> in 29 us
> May  8 09:47:47 nattytest kernel: [  192.700080] synchronize_sched()
> in 62670 us
> May  8 09:47:47 nattytest kernel: [  192.820084] synchronize_sched()
> in 118509 us
> May  8 09:47:47 nattytest kernel: [  192.871107] synchronize_sched()
> in 69 us
> May  8 09:47:47 nattytest kernel: [  192.872611] synchronize_sched()
> in 29 us
> May  8 09:47:47 nattytest kernel: [  192.990110] synchronize_sched()
> in 62742 us
> May  8 09:47:47 nattytest kernel: [  193.080070] synchronize_sched()
> in 89147 us
> May  8 09:47:47 nattytest kernel: [  193.150962] synchronize_sched()
> in 65 us
> May  8 09:47:47 nattytest kernel: [  193.160285] synchronize_sched()
> in 8879 us
> May  8 09:47:48 nattytest kernel: [  193.300097] synchronize_sched()
> in 72753 us
> May  8 09:47:48 nattytest kernel: [  193.380075] synchronize_sched()
> in 78472 us
> May  8 09:47:48 nattytest kernel: [  193.431029] synchronize_sched()
> in 41 us
> May  8 09:47:48 nattytest kernel: [  193.432518] synchronize_sched()
> in 30 us
> May  8 09:47:48 nattytest kernel: [  193.560081] synchronize_sched()
> in 72448 us
> May  8 09:47:48 nattytest kernel: [  193.670073] synchronize_sched()
> in 108452 us
> May  8 09:47:48 nattytest kernel: [  193.721098] synchronize_sched()
> in 49 us
> May  8 09:47:48 nattytest kernel: [  193.722821] synchronize_sched()
> in 30 us
> May  8 09:47:48 nattytest kernel: [  193.840075] synchronize_sched()
> in 62317 us
> May  8 09:47:48 nattytest kernel: [  193.920070] synchronize_sched()
> in 78472 us
> May  8 09:47:48 nattytest kernel: [  193.971073] synchronize_sched()
> in 43 us
> May  8 09:47:48 nattytest kernel: [  193.972550] synchronize_sched()
> in 29 us
> May  8 09:47:48 nattytest kernel: [  194.100088] synchronize_sched()
> in 72391 us
> May  8 09:47:48 nattytest kernel: [  194.170082] synchronize_sched()
> in 69202 us
> May  8 09:47:48 nattytest kernel: [  194.221053] synchronize_sched()
> in 40 us
> May  8 09:47:48 nattytest kernel: [  194.222543] synchronize_sched()
> in 29 us
> May  8 09:47:49 nattytest kernel: [  194.350082] synchronize_sched()
> in 72874 us
> May  8 09:47:49 nattytest kernel: [  194.430068] synchronize_sched()
> in 78536 us
> May  8 09:47:49 nattytest kernel: [  194.481167] synchronize_sched()
> in 70 us
> May  8 09:47:49 nattytest kernel: [  194.500091] synchronize_sched()
> in 17486 us
> May  8 09:47:49 nattytest kernel: [  194.640088] synchronize_sched()
> in 73012 us
> May  8 09:47:49 nattytest kernel: [  194.730069] synchronize_sched()
> in 88519 us
> May  8 09:47:49 nattytest kernel: [  194.781117] synchronize_sched()
> in 46 us
> May  8 09:47:49 nattytest kernel: [  194.792950] synchronize_sched()
> in 10384 us
> May  8 09:47:49 nattytest kernel: [  194.910126] synchronize_sched()
> in 63131 us
> May  8 09:47:49 nattytest kernel: [  195.000088] synchronize_sched()
> in 88453 us
> May  8 09:47:49 nattytest kernel: [  195.160080] synchronize_sched()
> in 79582 us
> May  8 09:47:50 nattytest kernel: [  195.240073] synchronize_sched()
> in 79132 us
> May  8 09:47:50 nattytest kernel: [  195.360124] synchronize_sched()
> in 62368 us
> May  8 09:47:50 nattytest kernel: [  195.440096] synchronize_sched()
> in 79148 us
> May  8 09:47:50 nattytest kernel: [  195.491063] synchronize_sched()
> in 53 us
> May  8 09:47:50 nattytest kernel: [  195.492182] synchronize_sched()
> in 29 us
> May  8 09:47:50 nattytest kernel: [  195.610085] synchronize_sched()
> in 62444 us
> May  8 09:47:50 nattytest kernel: [  195.700078] synchronize_sched()
> in 89170 us
> May  8 09:47:50 nattytest kernel: [  195.761011] synchronize_sched()
> in 57 us
> May  8 09:47:50 nattytest kernel: [  195.780137] synchronize_sched()
> in 18587 us
> May  8 09:47:50 nattytest kernel: [  195.920080] synchronize_sched()
> in 73194 us
> May  8 09:47:50 nattytest kernel: [  196.000073] synchronize_sched()
> in 78456 us
> May  8 09:47:50 nattytest kernel: [  196.051067] synchronize_sched()
> in 42 us
> May  8 09:47:50 nattytest kernel: [  196.052613] synchronize_sched()
> in 44 us
> May  8 09:47:50 nattytest kernel: [  196.170080] synchronize_sched()
> in 63040 us
> May  8 09:47:51 nattytest kernel: [  196.250075] synchronize_sched()
> in 78420 us
> May  8 09:47:51 nattytest kernel: [  196.301051] synchronize_sched()
> in 46 us
> May  8 09:47:51 nattytest kernel: [  196.302527] synchronize_sched()
> in 29 us
> May  8 09:47:51 nattytest kernel: [  196.420095] synchronize_sched()
> in 62701 us
> May  8 09:47:51 nattytest kernel: [  196.500064] synchronize_sched()
> in 78448 us
> May  8 09:47:51 nattytest kernel: [  196.551104] synchronize_sched()
> in 48 us
> May  8 09:47:51 nattytest kernel: [  196.552631] synchronize_sched()
> in 49 us
> May  8 09:47:51 nattytest kernel: [  196.670084] synchronize_sched()
> in 63111 us
> May  8 09:47:51 nattytest kernel: [  196.750095] synchronize_sched()
> in 78464 us
> May  8 09:47:51 nattytest kernel: [  196.801082] synchronize_sched()
> in 60 us
> May  8 09:47:51 nattytest kernel: [  196.802616] synchronize_sched()
> in 43 us
> May  8 09:47:51 nattytest kernel: [  196.930124] synchronize_sched()
> in 73010 us
> May  8 09:47:51 nattytest kernel: [  197.010084] synchronize_sched()
> in 78359 us
> May  8 09:47:51 nattytest kernel: [  197.071137] synchronize_sched()
> in 79 us
> May  8 09:47:51 nattytest kernel: [  197.080320] synchronize_sched()
> in 7773 us
> May  8 09:47:52 nattytest kernel: [  197.230086] synchronize_sched()
> in 83245 us
> May  8 09:47:52 nattytest kernel: [  197.310075] synchronize_sched()
> in 78509 us
> May  8 09:47:52 nattytest kernel: [  197.361050] synchronize_sched()
> in 44 us
> May  8 09:47:52 nattytest kernel: [  197.380084] synchronize_sched()
> in 17591 us
> May  8 09:47:52 nattytest kernel: [  197.530084] synchronize_sched()
> in 82999 us
> May  8 09:47:52 nattytest kernel: [  197.610080] synchronize_sched()
> in 79162 us
> May  8 09:47:52 nattytest kernel: [  197.680937] synchronize_sched()
> in 65 us
> May  8 09:47:52 nattytest kernel: [  197.700096] synchronize_sched()
> in 18620 us
> May  8 09:47:52 nattytest kernel: [  197.850141] synchronize_sched()
> in 73601 us
> May  8 09:47:52 nattytest kernel: [  197.930091] synchronize_sched()
> in 78393 us
> May  8 09:47:52 nattytest kernel: [  197.981050] synchronize_sched()
> in 39 us
> May  8 09:47:52 nattytest kernel: [  197.982788] synchronize_sched()
> in 29 us
> May  8 09:47:52 nattytest kernel: [  198.110084] synchronize_sched()
> in 72893 us
> May  8 09:47:52 nattytest kernel: [  198.180072] synchronize_sched()
> in 69151 us
> May  8 09:47:53 nattytest kernel: [  198.231098] synchronize_sched()
> in 50 us
> May  8 09:47:53 nattytest kernel: [  198.232679] synchronize_sched()
> in 46 us
> May  8 09:47:53 nattytest kernel: [  198.370084] synchronize_sched()
> in 72935 us
> May  8 09:47:53 nattytest kernel: [  198.450068] synchronize_sched()
> in 78461 us
> May  8 09:47:53 nattytest kernel: [  198.511077] synchronize_sched()
> in 77 us
> May  8 09:47:53 nattytest kernel: [  198.530094] synchronize_sched()
> in 17512 us
> May  8 09:47:53 nattytest kernel: [  198.670095] synchronize_sched()
> in 83122 us
> May  8 09:47:53 nattytest kernel: [  198.740079] synchronize_sched()
> in 68453 us
> May  8 09:47:53 nattytest kernel: [  198.801121] synchronize_sched()
> in 48 us
> May  8 09:47:53 nattytest kernel: [  198.802600] synchronize_sched()
> in 29 us
> May  8 09:47:53 nattytest kernel: [  198.920100] synchronize_sched()
> in 63392 us
> May  8 09:47:53 nattytest kernel: [  199.000088] synchronize_sched()
> in 78482 us
> May  8 09:47:53 nattytest kernel: [  199.070099] synchronize_sched()
> in 19013 us
> May  8 09:47:53 nattytest kernel: [  199.071626] synchronize_sched()
> in 48 us
> May  8 09:47:53 nattytest kernel: [  199.190083] synchronize_sched()
> in 63245 us
> May  8 09:47:54 nattytest kernel: [  199.270075] synchronize_sched()
> in 78491 us
> May  8 09:47:54 nattytest kernel: [  199.321088] synchronize_sched()
> in 42 us
> May  8 09:47:54 nattytest kernel: [  199.322589] synchronize_sched()
> in 29 us
> May  8 09:47:54 nattytest kernel: [  199.440101] synchronize_sched()
> in 63063 us
> May  8 09:47:54 nattytest kernel: [  199.520073] synchronize_sched()
> in 78463 us
> May  8 09:47:54 nattytest kernel: [  199.571056] synchronize_sched()
> in 49 us
> May  8 09:47:54 nattytest kernel: [  199.572488] synchronize_sched()
> in 29 us
> May  8 09:47:54 nattytest kernel: [  199.700083] synchronize_sched()
> in 73220 us
> May  8 09:47:54 nattytest kernel: [  199.770096] synchronize_sched()
> in 68508 us
> May  8 09:47:54 nattytest kernel: [  199.821090] synchronize_sched()
> in 50 us
> May  8 09:47:54 nattytest kernel: [  199.822540] synchronize_sched()
> in 29 us
> May  8 09:47:54 nattytest kernel: [  199.940084] synchronize_sched()
> in 63681 us
> May  8 09:47:54 nattytest kernel: [  200.020067] synchronize_sched()
> in 78451 us
> May  8 09:47:54 nattytest kernel: [  200.071095] synchronize_sched()
> in 41 us
> May  8 09:47:54 nattytest kernel: [  200.072566] synchronize_sched()
> in 29 us
> May  8 09:47:54 nattytest kernel: [  200.190089] synchronize_sched()
> in 63584 us
> May  8 09:47:55 nattytest kernel: [  200.280076] synchronize_sched()
> in 89123 us
> May  8 09:47:55 nattytest kernel: [  200.341011] synchronize_sched()
> in 61 us
> May  8 09:47:55 nattytest kernel: [  200.360094] synchronize_sched()
> in 18527 us
> May  8 09:47:55 nattytest kernel: [  200.520085] synchronize_sched()
> in 94129 us
> May  8 09:47:55 nattytest kernel: [  200.670072] synchronize_sched()
> in 148512 us
> May  8 09:47:55 nattytest kernel: [  200.730983] synchronize_sched()
> in 41 us
> May  8 09:47:55 nattytest kernel: [  200.750355] synchronize_sched()
> in 17917 us
> May  8 09:47:55 nattytest kernel: [  200.890082] synchronize_sched()
> in 83406 us
> May  8 09:47:55 nattytest kernel: [  200.970072] synchronize_sched()
> in 78439 us
> May  8 09:47:55 nattytest kernel: [  201.031034] synchronize_sched()
> in 45 us
> May  8 09:47:55 nattytest kernel: [  201.050090] synchronize_sched()
> in 17555 us
> May  8 09:47:55 nattytest kernel: [  201.200090] synchronize_sched()
> in 83318 us
> May  8 09:47:56 nattytest kernel: [  201.270075] synchronize_sched()
> in 68468 us
> May  8 09:47:56 nattytest kernel: [  201.330983] synchronize_sched()
> in 41 us
> May  8 09:47:56 nattytest kernel: [  201.332487] synchronize_sched()
> in 62 us
> May  8 09:47:56 nattytest kernel: [  201.450088] synchronize_sched()
> in 53772 us
> May  8 09:47:56 nattytest kernel: [  201.530075] synchronize_sched()
> in 78437 us
> May  8 09:47:56 nattytest kernel: [  201.590986] synchronize_sched()
> in 46 us
> May  8 09:47:56 nattytest kernel: [  201.592134] synchronize_sched()
> in 29 us
> May  8 09:47:56 nattytest kernel: [  201.710085] synchronize_sched()
> in 63551 us
> May  8 09:47:56 nattytest kernel: [  201.830146] synchronize_sched()
> in 118553 us
> May  8 09:47:56 nattytest kernel: [  201.891143] synchronize_sched()
> in 50 us
> May  8 09:47:56 nattytest kernel: [  201.892712] synchronize_sched()
> in 55 us
> May  8 09:47:56 nattytest kernel: [  202.010092] synchronize_sched()
> in 63446 us
> May  8 09:47:56 nattytest kernel: [  202.090126] synchronize_sched()
> in 78477 us
> May  8 09:47:56 nattytest kernel: [  202.141120] synchronize_sched()
> in 45 us
> May  8 09:47:56 nattytest kernel: [  202.142867] synchronize_sched()
> in 30 us
> May  8 09:47:57 nattytest kernel: [  202.260092] synchronize_sched()
> in 63271 us
> May  8 09:47:57 nattytest kernel: [  202.340071] synchronize_sched()
> in 78474 us
> May  8 09:47:57 nattytest kernel: [  202.391094] synchronize_sched()
> in 44 us
> May  8 09:47:57 nattytest kernel: [  202.392581] synchronize_sched()
> in 29 us
> May  8 09:47:57 nattytest kernel: [  202.510110] synchronize_sched()
> in 63718 us
> May  8 09:47:57 nattytest kernel: [  202.600092] synchronize_sched()
> in 88434 us
> May  8 09:47:57 nattytest kernel: [  202.661075] synchronize_sched()
> in 46 us
> May  8 09:47:57 nattytest kernel: [  202.680091] synchronize_sched()
> in 17516 us
> May  8 09:47:57 nattytest kernel: [  202.820083] synchronize_sched()
> in 83733 us
> May  8 09:47:57 nattytest kernel: [  202.900067] synchronize_sched()
> in 78478 us
> May  8 09:47:57 nattytest kernel: [  202.951062] synchronize_sched()
> in 43 us
> May  8 09:47:57 nattytest kernel: [  202.960445] synchronize_sched()
> in 7921 us
> May  8 09:47:57 nattytest kernel: [  203.100080] synchronize_sched()
> in 83496 us
> May  8 09:47:57 nattytest kernel: [  203.170084] synchronize_sched()
> in 68474 us
> May  8 09:47:57 nattytest kernel: [  203.221083] synchronize_sched()
> in 41 us
> May  8 09:47:57 nattytest kernel: [  203.222692] synchronize_sched()
> in 68 us
> May  8 09:47:58 nattytest kernel: [  203.350083] synchronize_sched()
> in 74062 us
> May  8 09:47:58 nattytest kernel: [  203.430100] synchronize_sched()
> in 78468 us
> May  8 09:47:58 nattytest kernel: [  203.491028] synchronize_sched()
> in 52 us
> May  8 09:47:58 nattytest kernel: [  203.510086] synchronize_sched()
> in 17607 us
> May  8 09:47:58 nattytest kernel: [  203.670080] synchronize_sched()
> in 83798 us
> May  8 09:47:58 nattytest kernel: [  203.750080] synchronize_sched()
> in 78382 us
> May  8 09:47:58 nattytest kernel: [  203.821032] synchronize_sched()
> in 48 us
> May  8 09:47:58 nattytest kernel: [  203.840093] synchronize_sched()
> in 17608 us
> May  8 09:47:58 nattytest kernel: [  203.990084] synchronize_sched()
> in 73664 us
> May  8 09:47:58 nattytest kernel: [  204.080078] synchronize_sched()
> in 88391 us
> May  8 09:47:58 nattytest kernel: [  204.141021] synchronize_sched()
> in 44 us
> May  8 09:47:58 nattytest kernel: [  204.160083] synchronize_sched()
> in 17671 us
> May  8 09:47:59 nattytest kernel: [  204.310086] synchronize_sched()
> in 83288 us
> May  8 09:47:59 nattytest kernel: [  204.380074] synchronize_sched()
> in 69168 us
> May  8 09:47:59 nattytest kernel: [  204.431059] synchronize_sched()
> in 67 us
> May  8 09:47:59 nattytest kernel: [  204.432205] synchronize_sched()
> in 30 us
> May  8 09:47:59 nattytest kernel: [  204.550147] synchronize_sched()
> in 54218 us
> May  8 09:47:59 nattytest kernel: [  204.640079] synchronize_sched()
> in 88401 us
> May  8 09:47:59 nattytest kernel: [  204.701062] synchronize_sched()
> in 48 us
> May  8 09:47:59 nattytest kernel: [  204.720093] synchronize_sched()
> in 17508 us
> May  8 09:47:59 nattytest kernel: [  204.850108] synchronize_sched()
> in 73968 us
> May  8 09:47:59 nattytest kernel: [  204.940074] synchronize_sched()
> in 88489 us
> May  8 09:47:59 nattytest kernel: [  205.011002] synchronize_sched()
> in 44 us
> May  8 09:47:59 nattytest kernel: [  205.030104] synchronize_sched()
> in 17658 us
> May  8 09:47:59 nattytest kernel: [  205.190091] synchronize_sched()
> in 83651 us
> May  8 09:48:00 nattytest kernel: [  205.270094] synchronize_sched()
> in 78501 us
> May  8 09:48:00 nattytest kernel: [  205.341000] synchronize_sched()
> in 65 us
> May  8 09:48:00 nattytest kernel: [  205.360081] synchronize_sched()
> in 17640 us
> 
> 
> 
> 

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Alex Bligh @ 2011-05-08 13:14 UTC (permalink / raw)
  To: Alex Bligh, paulmck; +Cc: Eric Dumazet, netdev, Alex Bligh
In-Reply-To: <6A6F17150A046D2D2670724D@nimrod.local>



--On 8 May 2011 14:06:07 +0100 Alex Bligh <alex@alex.org.uk> wrote:

> Add to that the fact that there are 2 x synchronize_sched() and one
> rcu_barrier() per interface removal. If I ignore your IRQ idea, that's
> 6 x 3 = 18ms per interface removal at CONFIG_HZ=10, 180ms at
> CONFIG_HZ=100.

Aargh I mean:

6 x 3 = 18ms per interface removal at CONFIG_HZ=1000, 180ms at
CONFIG_HZ=100.


-- 
Alex Bligh

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Alex Bligh @ 2011-05-08 13:13 UTC (permalink / raw)
  To: paulmck; +Cc: Eric Dumazet, netdev, Alex Bligh
In-Reply-To: <20110508125028.GK2641@linux.vnet.ibm.com>


>> The fact that increasing HZ masks the problem seems to imply that
>> sychronize_sched() is waiting when it shouldn't be, as it suggests
>> it's waiting for a context switch. But surely it shouldn't be
>> waiting for context switch if all other cpu cores are idle?
>> It knows that it (the caller) doesn't hold an rcu_read_lock,
>> and presumably can see the other cpus are in the idle state,
>> in which case surely it should return immediately? Distribution
>> of latency in synchronize_sched() looks like this:
>>
>> 20-49 us 110 instances (27.500%)
>> 50-99 us 45 instances (11.250%)
>
> Really?  I am having a hard time believing this above two.  Is this really
> 2000-4999 us and 5000-9999 us?  That would be much more believable,
> and expected on a busy system with lots of context switching.  Or on a
> system with CONFIG_NO_HZ=n.

Yes, really 20-49us and 50-99us, not ms. Raw data attached :-)

I'm guessing there are circumstances where there is an early exit.

$ fgrep HZ .config
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_NO_HZ=y
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
# CONFIG_MACHZ_WDT is not set

>
>> 5000-9999 us 5 instances (1.250%)
>
> This makes sense for a mostly-idle system with frequent short bursts
> of work.
>
>> 10000-19999 us 33 instances (8.250%)
>
> This makes sense for a CONFIG_NO_HZ system that is idle, where there
> is some amount of background work that is also using RCU grace periods.
>
>> 20000-49999 us 4 instances (1.000%)
>> 50000-99999 us 191 instances (47.750%)
>> 100000-199999 us 12 instances (3.000%)
>
> These last involve additional delays.  Possibilities include long-running
> irq handlers, SMIs, or NMIs.

There is nothing much going on these systems (idle, no other users,
just normal system daemons).

Note this is with CONFIG_HZ=100 (which is the Ubuntu default). I wonder
if that means you need to scale your expactations by a factor if 10 (i.e.
you'd expect 50000-99999 for "a mostly-idle system with frequent short 
bursts of work."

Interestingly there are quite a few of these on boot up. If this
is a CONFIG_HZ thing, then setting it to 1000 would probably take
half a second off bootup time.


-- 
Alex Bligh


May  8 09:47:31 nattytest kernel: [  177.030197] synchronize_sched() in 
66921 us
May  8 09:47:31 nattytest kernel: [  177.120085] synchronize_sched() in 
89080 us
May  8 09:47:31 nattytest kernel: [  177.190910] synchronize_sched() in 46 
us
May  8 09:47:31 nattytest kernel: [  177.210087] synchronize_sched() in 
18686 us
May  8 09:47:32 nattytest kernel: [  177.400080] synchronize_sched() in 
110609 us
May  8 09:47:32 nattytest kernel: [  177.480071] synchronize_sched() in 
78550 us
May  8 09:47:32 nattytest kernel: [  177.550119] synchronize_sched() in 
19087 us
May  8 09:47:32 nattytest kernel: [  177.551761] synchronize_sched() in 79 
us
May  8 09:47:32 nattytest kernel: [  177.670085] synchronize_sched() in 
60616 us
May  8 09:47:32 nattytest kernel: [  177.760075] synchronize_sched() in 
88465 us
May  8 09:47:32 nattytest kernel: [  177.820999] synchronize_sched() in 45 
us
May  8 09:47:32 nattytest kernel: [  177.840086] synchronize_sched() in 
17579 us
May  8 09:47:32 nattytest kernel: [  177.970084] synchronize_sched() in 
70925 us
May  8 09:47:32 nattytest kernel: [  178.050092] synchronize_sched() in 
78477 us
May  8 09:47:32 nattytest kernel: [  178.101046] synchronize_sched() in 39 
us
May  8 09:47:32 nattytest kernel: [  178.102574] synchronize_sched() in 48 
us
May  8 09:47:33 nattytest kernel: [  178.230082] synchronize_sched() in 
70966 us
May  8 09:47:33 nattytest kernel: [  178.310071] synchronize_sched() in 
78503 us
May  8 09:47:33 nattytest kernel: [  178.371056] synchronize_sched() in 43 
us
May  8 09:47:33 nattytest kernel: [  178.390094] synchronize_sched() in 
17553 us
May  8 09:47:33 nattytest kernel: [  178.540084] synchronize_sched() in 
70533 us
May  8 09:47:33 nattytest kernel: [  178.620074] synchronize_sched() in 
79172 us
May  8 09:47:33 nattytest kernel: [  178.671124] synchronize_sched() in 57 
us
May  8 09:47:33 nattytest kernel: [  178.672645] synchronize_sched() in 49 
us
May  8 09:47:33 nattytest kernel: [  178.830106] synchronize_sched() in 
100955 us
May  8 09:47:33 nattytest kernel: [  178.910084] synchronize_sched() in 
78408 us
May  8 09:47:33 nattytest kernel: [  178.961090] synchronize_sched() in 43 
us
May  8 09:47:33 nattytest kernel: [  178.962642] synchronize_sched() in 50 
us
May  8 09:47:33 nattytest kernel: [  179.090088] synchronize_sched() in 
71354 us
May  8 09:47:33 nattytest kernel: [  179.220071] synchronize_sched() in 
128463 us
May  8 09:47:34 nattytest kernel: [  179.300867] synchronize_sched() in 52 
us
May  8 09:47:34 nattytest kernel: [  179.302079] synchronize_sched() in 48 
us
May  8 09:47:34 nattytest kernel: [  179.420085] synchronize_sched() in 
61562 us
May  8 09:47:34 nattytest kernel: [  179.500093] synchronize_sched() in 
78506 us
May  8 09:47:34 nattytest kernel: [  179.551048] synchronize_sched() in 42 
us
May  8 09:47:34 nattytest kernel: [  179.552637] synchronize_sched() in 51 
us
May  8 09:47:34 nattytest kernel: [  179.670088] synchronize_sched() in 
61469 us
May  8 09:47:34 nattytest kernel: [  179.760078] synchronize_sched() in 
88430 us
May  8 09:47:34 nattytest kernel: [  179.830918] synchronize_sched() in 44 
us
May  8 09:47:34 nattytest kernel: [  179.850173] synchronize_sched() in 
17783 us
May  8 09:47:34 nattytest kernel: [  180.080085] synchronize_sched() in 
150585 us
May  8 09:47:34 nattytest kernel: [  180.160082] synchronize_sched() in 
78381 us
May  8 09:47:34 nattytest kernel: [  180.211027] synchronize_sched() in 39 
us
May  8 09:47:34 nattytest kernel: [  180.212186] synchronize_sched() in 52 
us
May  8 09:47:35 nattytest kernel: [  180.320091] synchronize_sched() in 
50520 us
May  8 09:47:35 nattytest kernel: [  180.400074] synchronize_sched() in 
78525 us
May  8 09:47:35 nattytest kernel: [  180.451028] synchronize_sched() in 50 
us
May  8 09:47:35 nattytest kernel: [  180.452100] synchronize_sched() in 30 
us
May  8 09:47:35 nattytest kernel: [  180.570086] synchronize_sched() in 
61211 us
May  8 09:47:35 nattytest kernel: [  180.650073] synchronize_sched() in 
79145 us
May  8 09:47:35 nattytest kernel: [  180.701376] synchronize_sched() in 38 
us
May  8 09:47:35 nattytest kernel: [  180.703490] synchronize_sched() in 57 
us
May  8 09:47:35 nattytest kernel: [  180.820087] synchronize_sched() in 
61483 us
May  8 09:47:35 nattytest kernel: [  180.910081] synchronize_sched() in 
88485 us
May  8 09:47:35 nattytest kernel: [  180.965970] synchronize_sched() in 49 
us
May  8 09:47:35 nattytest kernel: [  180.990091] synchronize_sched() in 
22425 us
May  8 09:47:35 nattytest kernel: [  181.150084] synchronize_sched() in 
71317 us
May  8 09:47:36 nattytest kernel: [  181.230074] synchronize_sched() in 
78470 us
May  8 09:47:36 nattytest kernel: [  181.300099] synchronize_sched() in 
18988 us
May  8 09:47:36 nattytest kernel: [  181.301637] synchronize_sched() in 46 
us
May  8 09:47:36 nattytest kernel: [  181.420086] synchronize_sched() in 
61240 us
May  8 09:47:36 nattytest kernel: [  181.500072] synchronize_sched() in 
77682 us
May  8 09:47:36 nattytest kernel: [  181.551059] synchronize_sched() in 45 
us
May  8 09:47:36 nattytest kernel: [  181.552546] synchronize_sched() in 29 
us
May  8 09:47:36 nattytest kernel: [  181.670084] synchronize_sched() in 
61612 us
May  8 09:47:36 nattytest kernel: [  181.750076] synchronize_sched() in 
78513 us
May  8 09:47:36 nattytest kernel: [  181.801195] synchronize_sched() in 52 
us
May  8 09:47:36 nattytest kernel: [  181.802805] synchronize_sched() in 69 
us
May  8 09:47:36 nattytest kernel: [  181.920088] synchronize_sched() in 
61998 us
May  8 09:47:36 nattytest kernel: [  182.000091] synchronize_sched() in 
78539 us
May  8 09:47:36 nattytest kernel: [  182.051053] synchronize_sched() in 42 
us
May  8 09:47:36 nattytest kernel: [  182.052595] synchronize_sched() in 29 
us
May  8 09:47:36 nattytest kernel: [  182.170103] synchronize_sched() in 
61607 us
May  8 09:47:37 nattytest kernel: [  182.260072] synchronize_sched() in 
88460 us
May  8 09:47:37 nattytest kernel: [  182.331028] synchronize_sched() in 44 
us
May  8 09:47:37 nattytest kernel: [  182.350096] synchronize_sched() in 
17563 us
May  8 09:47:37 nattytest kernel: [  182.500085] synchronize_sched() in 
71793 us
May  8 09:47:37 nattytest kernel: [  182.620085] synchronize_sched() in 
118343 us
May  8 09:47:37 nattytest kernel: [  182.671024] synchronize_sched() in 39 
us
May  8 09:47:37 nattytest kernel: [  182.672511] synchronize_sched() in 29 
us
May  8 09:47:37 nattytest kernel: [  182.830096] synchronize_sched() in 
101470 us
May  8 09:47:37 nattytest kernel: [  182.910081] synchronize_sched() in 
78413 us
May  8 09:47:37 nattytest kernel: [  182.971056] synchronize_sched() in 43 
us
May  8 09:47:37 nattytest kernel: [  182.972568] synchronize_sched() in 44 
us
May  8 09:47:37 nattytest kernel: [  183.100084] synchronize_sched() in 
60854 us
May  8 09:47:37 nattytest kernel: [  183.170097] synchronize_sched() in 
68450 us
May  8 09:47:37 nattytest kernel: [  183.221081] synchronize_sched() in 40 
us
May  8 09:47:37 nattytest kernel: [  183.222580] synchronize_sched() in 29 
us
May  8 09:47:38 nattytest kernel: [  183.340082] synchronize_sched() in 
61422 us
May  8 09:47:38 nattytest kernel: [  183.420078] synchronize_sched() in 
79154 us
May  8 09:47:38 nattytest kernel: [  183.471003] synchronize_sched() in 41 
us
May  8 09:47:38 nattytest kernel: [  183.472469] synchronize_sched() in 29 
us
May  8 09:47:38 nattytest kernel: [  183.590095] synchronize_sched() in 
61591 us
May  8 09:47:38 nattytest kernel: [  183.670069] synchronize_sched() in 
78533 us
May  8 09:47:38 nattytest kernel: [  183.721106] synchronize_sched() in 43 
us
May  8 09:47:38 nattytest kernel: [  183.722663] synchronize_sched() in 49 
us
May  8 09:47:38 nattytest kernel: [  183.850094] synchronize_sched() in 
71060 us
May  8 09:47:38 nattytest kernel: [  183.930080] synchronize_sched() in 
78522 us
May  8 09:47:38 nattytest kernel: [  183.981040] synchronize_sched() in 44 
us
May  8 09:47:38 nattytest kernel: [  183.990375] synchronize_sched() in 
7913 us
May  8 09:47:38 nattytest kernel: [  184.150080] synchronize_sched() in 
81568 us
May  8 09:47:38 nattytest kernel: [  184.220088] synchronize_sched() in 
68481 us
May  8 09:47:39 nattytest kernel: [  184.281161] synchronize_sched() in 65 
us
May  8 09:47:39 nattytest kernel: [  184.282733] synchronize_sched() in 60 
us
May  8 09:47:39 nattytest kernel: [  184.400079] synchronize_sched() in 
61791 us
May  8 09:47:39 nattytest kernel: [  184.480104] synchronize_sched() in 
79181 us
May  8 09:47:39 nattytest kernel: [  184.550103] synchronize_sched() in 
19063 us
May  8 09:47:39 nattytest kernel: [  184.551621] synchronize_sched() in 30 
us
May  8 09:47:39 nattytest kernel: [  184.680083] synchronize_sched() in 
71800 us
May  8 09:47:39 nattytest kernel: [  184.750084] synchronize_sched() in 
69162 us
May  8 09:47:39 nattytest kernel: [  184.801153] synchronize_sched() in 51 
us
May  8 09:47:39 nattytest kernel: [  184.802802] synchronize_sched() in 53 
us
May  8 09:47:39 nattytest kernel: [  184.920091] synchronize_sched() in 
61217 us
May  8 09:47:39 nattytest kernel: [  185.000074] synchronize_sched() in 
79141 us
May  8 09:47:39 nattytest kernel: [  185.050985] synchronize_sched() in 40 
us
May  8 09:47:39 nattytest kernel: [  185.052727] synchronize_sched() in 47 
us
May  8 09:47:39 nattytest kernel: [  185.170087] synchronize_sched() in 
62802 us
May  8 09:47:40 nattytest kernel: [  185.250074] synchronize_sched() in 
78418 us
May  8 09:47:40 nattytest kernel: [  185.311022] synchronize_sched() in 40 
us
May  8 09:47:40 nattytest kernel: [  185.312542] synchronize_sched() in 63 
us
May  8 09:47:40 nattytest kernel: [  185.430111] synchronize_sched() in 
61894 us
May  8 09:47:40 nattytest kernel: [  185.510073] synchronize_sched() in 
78410 us
May  8 09:47:40 nattytest kernel: [  185.561055] synchronize_sched() in 58 
us
May  8 09:47:40 nattytest kernel: [  185.562589] synchronize_sched() in 45 
us
May  8 09:47:40 nattytest kernel: [  185.680091] synchronize_sched() in 
62023 us
May  8 09:47:40 nattytest kernel: [  185.760076] synchronize_sched() in 
78438 us
May  8 09:47:40 nattytest kernel: [  185.811063] synchronize_sched() in 45 
us
May  8 09:47:40 nattytest kernel: [  185.812580] synchronize_sched() in 52 
us
May  8 09:47:40 nattytest kernel: [  185.930089] synchronize_sched() in 
61864 us
May  8 09:47:40 nattytest kernel: [  186.010072] synchronize_sched() in 
78465 us
May  8 09:47:40 nattytest kernel: [  186.061141] synchronize_sched() in 44 
us
May  8 09:47:40 nattytest kernel: [  186.062631] synchronize_sched() in 29 
us
May  8 09:47:40 nattytest kernel: [  186.180078] synchronize_sched() in 
61806 us
May  8 09:47:41 nattytest kernel: [  186.260074] synchronize_sched() in 
78415 us
May  8 09:47:41 nattytest kernel: [  186.311073] synchronize_sched() in 43 
us
May  8 09:47:41 nattytest kernel: [  186.312573] synchronize_sched() in 29 
us
May  8 09:47:41 nattytest kernel: [  186.440083] synchronize_sched() in 
72358 us
May  8 09:47:41 nattytest kernel: [  186.520071] synchronize_sched() in 
78395 us
May  8 09:47:41 nattytest kernel: [  186.573068] synchronize_sched() in 66 
us
May  8 09:47:41 nattytest kernel: [  186.590105] synchronize_sched() in 
15551 us
May  8 09:47:41 nattytest kernel: [  186.740092] synchronize_sched() in 
71884 us
May  8 09:47:41 nattytest kernel: [  186.830069] synchronize_sched() in 
89123 us
May  8 09:47:41 nattytest kernel: [  186.890967] synchronize_sched() in 41 
us
May  8 09:47:41 nattytest kernel: [  186.910091] synchronize_sched() in 
18639 us
May  8 09:47:41 nattytest kernel: [  187.070078] synchronize_sched() in 
82847 us
May  8 09:47:41 nattytest kernel: [  187.140090] synchronize_sched() in 
68499 us
May  8 09:47:41 nattytest kernel: [  187.191148] synchronize_sched() in 57 
us
May  8 09:47:41 nattytest kernel: [  187.192743] synchronize_sched() in 69 
us
May  8 09:47:42 nattytest kernel: [  187.310087] synchronize_sched() in 
63069 us
May  8 09:47:42 nattytest kernel: [  187.400076] synchronize_sched() in 
88432 us
May  8 09:47:42 nattytest kernel: [  187.461521] synchronize_sched() in 57 
us
May  8 09:47:42 nattytest kernel: [  187.480099] synchronize_sched() in 
16493 us
May  8 09:47:42 nattytest kernel: [  187.640081] synchronize_sched() in 
82269 us
May  8 09:47:42 nattytest kernel: [  187.710079] synchronize_sched() in 
68389 us
May  8 09:47:42 nattytest kernel: [  187.761071] synchronize_sched() in 38 
us
May  8 09:47:42 nattytest kernel: [  187.762623] synchronize_sched() in 67 
us
May  8 09:47:42 nattytest kernel: [  187.880077] synchronize_sched() in 
61847 us
May  8 09:47:42 nattytest kernel: [  187.960096] synchronize_sched() in 
78450 us
May  8 09:47:42 nattytest kernel: [  188.011147] synchronize_sched() in 62 
us
May  8 09:47:42 nattytest kernel: [  188.012617] synchronize_sched() in 29 
us
May  8 09:47:42 nattytest kernel: [  188.130083] synchronize_sched() in 
62431 us
May  8 09:47:42 nattytest kernel: [  188.210090] synchronize_sched() in 
78447 us
May  8 09:47:43 nattytest kernel: [  188.261015] synchronize_sched() in 38 
us
May  8 09:47:43 nattytest kernel: [  188.262491] synchronize_sched() in 29 
us
May  8 09:47:43 nattytest kernel: [  188.380097] synchronize_sched() in 
61923 us
May  8 09:47:43 nattytest kernel: [  188.470131] synchronize_sched() in 
88521 us
May  8 09:47:43 nattytest kernel: [  188.531024] synchronize_sched() in 46 
us
May  8 09:47:43 nattytest kernel: [  188.550087] synchronize_sched() in 
17676 us
May  8 09:47:43 nattytest kernel: [  188.690085] synchronize_sched() in 
71911 us
May  8 09:47:43 nattytest kernel: [  188.820071] synchronize_sched() in 
128473 us
May  8 09:47:43 nattytest kernel: [  188.881032] synchronize_sched() in 42 
us
May  8 09:47:43 nattytest kernel: [  188.900085] synchronize_sched() in 
17588 us
May  8 09:47:43 nattytest kernel: [  189.080084] synchronize_sched() in 
111945 us
May  8 09:47:43 nattytest kernel: [  189.170068] synchronize_sched() in 
88449 us
May  8 09:47:43 nattytest kernel: [  189.221066] synchronize_sched() in 41 
us
May  8 09:47:44 nattytest kernel: [  189.230257] synchronize_sched() in 
7463 us
May  8 09:47:44 nattytest kernel: [  189.380093] synchronize_sched() in 
71896 us
May  8 09:47:44 nattytest kernel: [  189.470093] synchronize_sched() in 
88481 us
May  8 09:47:44 nattytest kernel: [  189.550883] synchronize_sched() in 43 
us
May  8 09:47:44 nattytest kernel: [  189.552391] synchronize_sched() in 29 
us
May  8 09:47:44 nattytest kernel: [  189.670085] synchronize_sched() in 
61850 us
May  8 09:47:44 nattytest kernel: [  189.760080] synchronize_sched() in 
88549 us
May  8 09:47:44 nattytest kernel: [  189.821014] synchronize_sched() in 44 
us
May  8 09:47:44 nattytest kernel: [  189.850080] synchronize_sched() in 
27628 us
May  8 09:47:44 nattytest kernel: [  189.990087] synchronize_sched() in 
72251 us
May  8 09:47:44 nattytest kernel: [  190.080074] synchronize_sched() in 
88486 us
May  8 09:47:44 nattytest kernel: [  190.150968] synchronize_sched() in 71 
us
May  8 09:47:44 nattytest kernel: [  190.170092] synchronize_sched() in 
17672 us
May  8 09:47:45 nattytest kernel: [  190.320088] synchronize_sched() in 
71937 us
May  8 09:47:45 nattytest kernel: [  190.410068] synchronize_sched() in 
89155 us
May  8 09:47:45 nattytest kernel: [  190.490882] synchronize_sched() in 40 
us
May  8 09:47:45 nattytest kernel: [  190.492405] synchronize_sched() in 29 
us
May  8 09:47:45 nattytest kernel: [  190.620103] synchronize_sched() in 
62808 us
May  8 09:47:45 nattytest kernel: [  190.700108] synchronize_sched() in 
78486 us
May  8 09:47:45 nattytest kernel: [  190.820119] synchronize_sched() in 
69075 us
May  8 09:47:45 nattytest kernel: [  190.870096] synchronize_sched() in 
48447 us
May  8 09:47:45 nattytest kernel: [  191.000082] synchronize_sched() in 
62795 us
May  8 09:47:45 nattytest kernel: [  191.080082] synchronize_sched() in 
78489 us
May  8 09:47:45 nattytest kernel: [  191.141021] synchronize_sched() in 61 
us
May  8 09:47:45 nattytest kernel: [  191.160086] synchronize_sched() in 
17596 us
May  8 09:47:46 nattytest kernel: [  191.310097] synchronize_sched() in 
82089 us
May  8 09:47:46 nattytest kernel: [  191.390076] synchronize_sched() in 
78427 us
May  8 09:47:46 nattytest kernel: [  191.451045] synchronize_sched() in 49 
us
May  8 09:47:46 nattytest kernel: [  191.470088] synchronize_sched() in 
17643 us
May  8 09:47:46 nattytest kernel: [  191.620095] synchronize_sched() in 
72871 us
May  8 09:47:46 nattytest kernel: [  191.700072] synchronize_sched() in 
79137 us
May  8 09:47:46 nattytest kernel: [  191.751087] synchronize_sched() in 40 
us
May  8 09:47:46 nattytest kernel: [  191.752600] synchronize_sched() in 48 
us
May  8 09:47:46 nattytest kernel: [  191.880092] synchronize_sched() in 
72297 us
May  8 09:47:46 nattytest kernel: [  191.950076] synchronize_sched() in 
69142 us
May  8 09:47:46 nattytest kernel: [  192.005349] synchronize_sched() in 54 
us
May  8 09:47:46 nattytest kernel: [  192.006834] synchronize_sched() in 30 
us
May  8 09:47:46 nattytest kernel: [  192.130091] synchronize_sched() in 
72839 us
May  8 09:47:46 nattytest kernel: [  192.210069] synchronize_sched() in 
78535 us
May  8 09:47:47 nattytest kernel: [  192.270973] synchronize_sched() in 43 
us
May  8 09:47:47 nattytest kernel: [  192.300094] synchronize_sched() in 
27592 us
May  8 09:47:47 nattytest kernel: [  192.450079] synchronize_sched() in 
83072 us
May  8 09:47:47 nattytest kernel: [  192.520073] synchronize_sched() in 
68499 us
May  8 09:47:47 nattytest kernel: [  192.571106] synchronize_sched() in 44 
us
May  8 09:47:47 nattytest kernel: [  192.572585] synchronize_sched() in 29 
us
May  8 09:47:47 nattytest kernel: [  192.700080] synchronize_sched() in 
62670 us
May  8 09:47:47 nattytest kernel: [  192.820084] synchronize_sched() in 
118509 us
May  8 09:47:47 nattytest kernel: [  192.871107] synchronize_sched() in 69 
us
May  8 09:47:47 nattytest kernel: [  192.872611] synchronize_sched() in 29 
us
May  8 09:47:47 nattytest kernel: [  192.990110] synchronize_sched() in 
62742 us
May  8 09:47:47 nattytest kernel: [  193.080070] synchronize_sched() in 
89147 us
May  8 09:47:47 nattytest kernel: [  193.150962] synchronize_sched() in 65 
us
May  8 09:47:47 nattytest kernel: [  193.160285] synchronize_sched() in 
8879 us
May  8 09:47:48 nattytest kernel: [  193.300097] synchronize_sched() in 
72753 us
May  8 09:47:48 nattytest kernel: [  193.380075] synchronize_sched() in 
78472 us
May  8 09:47:48 nattytest kernel: [  193.431029] synchronize_sched() in 41 
us
May  8 09:47:48 nattytest kernel: [  193.432518] synchronize_sched() in 30 
us
May  8 09:47:48 nattytest kernel: [  193.560081] synchronize_sched() in 
72448 us
May  8 09:47:48 nattytest kernel: [  193.670073] synchronize_sched() in 
108452 us
May  8 09:47:48 nattytest kernel: [  193.721098] synchronize_sched() in 49 
us
May  8 09:47:48 nattytest kernel: [  193.722821] synchronize_sched() in 30 
us
May  8 09:47:48 nattytest kernel: [  193.840075] synchronize_sched() in 
62317 us
May  8 09:47:48 nattytest kernel: [  193.920070] synchronize_sched() in 
78472 us
May  8 09:47:48 nattytest kernel: [  193.971073] synchronize_sched() in 43 
us
May  8 09:47:48 nattytest kernel: [  193.972550] synchronize_sched() in 29 
us
May  8 09:47:48 nattytest kernel: [  194.100088] synchronize_sched() in 
72391 us
May  8 09:47:48 nattytest kernel: [  194.170082] synchronize_sched() in 
69202 us
May  8 09:47:48 nattytest kernel: [  194.221053] synchronize_sched() in 40 
us
May  8 09:47:48 nattytest kernel: [  194.222543] synchronize_sched() in 29 
us
May  8 09:47:49 nattytest kernel: [  194.350082] synchronize_sched() in 
72874 us
May  8 09:47:49 nattytest kernel: [  194.430068] synchronize_sched() in 
78536 us
May  8 09:47:49 nattytest kernel: [  194.481167] synchronize_sched() in 70 
us
May  8 09:47:49 nattytest kernel: [  194.500091] synchronize_sched() in 
17486 us
May  8 09:47:49 nattytest kernel: [  194.640088] synchronize_sched() in 
73012 us
May  8 09:47:49 nattytest kernel: [  194.730069] synchronize_sched() in 
88519 us
May  8 09:47:49 nattytest kernel: [  194.781117] synchronize_sched() in 46 
us
May  8 09:47:49 nattytest kernel: [  194.792950] synchronize_sched() in 
10384 us
May  8 09:47:49 nattytest kernel: [  194.910126] synchronize_sched() in 
63131 us
May  8 09:47:49 nattytest kernel: [  195.000088] synchronize_sched() in 
88453 us
May  8 09:47:49 nattytest kernel: [  195.160080] synchronize_sched() in 
79582 us
May  8 09:47:50 nattytest kernel: [  195.240073] synchronize_sched() in 
79132 us
May  8 09:47:50 nattytest kernel: [  195.360124] synchronize_sched() in 
62368 us
May  8 09:47:50 nattytest kernel: [  195.440096] synchronize_sched() in 
79148 us
May  8 09:47:50 nattytest kernel: [  195.491063] synchronize_sched() in 53 
us
May  8 09:47:50 nattytest kernel: [  195.492182] synchronize_sched() in 29 
us
May  8 09:47:50 nattytest kernel: [  195.610085] synchronize_sched() in 
62444 us
May  8 09:47:50 nattytest kernel: [  195.700078] synchronize_sched() in 
89170 us
May  8 09:47:50 nattytest kernel: [  195.761011] synchronize_sched() in 57 
us
May  8 09:47:50 nattytest kernel: [  195.780137] synchronize_sched() in 
18587 us
May  8 09:47:50 nattytest kernel: [  195.920080] synchronize_sched() in 
73194 us
May  8 09:47:50 nattytest kernel: [  196.000073] synchronize_sched() in 
78456 us
May  8 09:47:50 nattytest kernel: [  196.051067] synchronize_sched() in 42 
us
May  8 09:47:50 nattytest kernel: [  196.052613] synchronize_sched() in 44 
us
May  8 09:47:50 nattytest kernel: [  196.170080] synchronize_sched() in 
63040 us
May  8 09:47:51 nattytest kernel: [  196.250075] synchronize_sched() in 
78420 us
May  8 09:47:51 nattytest kernel: [  196.301051] synchronize_sched() in 46 
us
May  8 09:47:51 nattytest kernel: [  196.302527] synchronize_sched() in 29 
us
May  8 09:47:51 nattytest kernel: [  196.420095] synchronize_sched() in 
62701 us
May  8 09:47:51 nattytest kernel: [  196.500064] synchronize_sched() in 
78448 us
May  8 09:47:51 nattytest kernel: [  196.551104] synchronize_sched() in 48 
us
May  8 09:47:51 nattytest kernel: [  196.552631] synchronize_sched() in 49 
us
May  8 09:47:51 nattytest kernel: [  196.670084] synchronize_sched() in 
63111 us
May  8 09:47:51 nattytest kernel: [  196.750095] synchronize_sched() in 
78464 us
May  8 09:47:51 nattytest kernel: [  196.801082] synchronize_sched() in 60 
us
May  8 09:47:51 nattytest kernel: [  196.802616] synchronize_sched() in 43 
us
May  8 09:47:51 nattytest kernel: [  196.930124] synchronize_sched() in 
73010 us
May  8 09:47:51 nattytest kernel: [  197.010084] synchronize_sched() in 
78359 us
May  8 09:47:51 nattytest kernel: [  197.071137] synchronize_sched() in 79 
us
May  8 09:47:51 nattytest kernel: [  197.080320] synchronize_sched() in 
7773 us
May  8 09:47:52 nattytest kernel: [  197.230086] synchronize_sched() in 
83245 us
May  8 09:47:52 nattytest kernel: [  197.310075] synchronize_sched() in 
78509 us
May  8 09:47:52 nattytest kernel: [  197.361050] synchronize_sched() in 44 
us
May  8 09:47:52 nattytest kernel: [  197.380084] synchronize_sched() in 
17591 us
May  8 09:47:52 nattytest kernel: [  197.530084] synchronize_sched() in 
82999 us
May  8 09:47:52 nattytest kernel: [  197.610080] synchronize_sched() in 
79162 us
May  8 09:47:52 nattytest kernel: [  197.680937] synchronize_sched() in 65 
us
May  8 09:47:52 nattytest kernel: [  197.700096] synchronize_sched() in 
18620 us
May  8 09:47:52 nattytest kernel: [  197.850141] synchronize_sched() in 
73601 us
May  8 09:47:52 nattytest kernel: [  197.930091] synchronize_sched() in 
78393 us
May  8 09:47:52 nattytest kernel: [  197.981050] synchronize_sched() in 39 
us
May  8 09:47:52 nattytest kernel: [  197.982788] synchronize_sched() in 29 
us
May  8 09:47:52 nattytest kernel: [  198.110084] synchronize_sched() in 
72893 us
May  8 09:47:52 nattytest kernel: [  198.180072] synchronize_sched() in 
69151 us
May  8 09:47:53 nattytest kernel: [  198.231098] synchronize_sched() in 50 
us
May  8 09:47:53 nattytest kernel: [  198.232679] synchronize_sched() in 46 
us
May  8 09:47:53 nattytest kernel: [  198.370084] synchronize_sched() in 
72935 us
May  8 09:47:53 nattytest kernel: [  198.450068] synchronize_sched() in 
78461 us
May  8 09:47:53 nattytest kernel: [  198.511077] synchronize_sched() in 77 
us
May  8 09:47:53 nattytest kernel: [  198.530094] synchronize_sched() in 
17512 us
May  8 09:47:53 nattytest kernel: [  198.670095] synchronize_sched() in 
83122 us
May  8 09:47:53 nattytest kernel: [  198.740079] synchronize_sched() in 
68453 us
May  8 09:47:53 nattytest kernel: [  198.801121] synchronize_sched() in 48 
us
May  8 09:47:53 nattytest kernel: [  198.802600] synchronize_sched() in 29 
us
May  8 09:47:53 nattytest kernel: [  198.920100] synchronize_sched() in 
63392 us
May  8 09:47:53 nattytest kernel: [  199.000088] synchronize_sched() in 
78482 us
May  8 09:47:53 nattytest kernel: [  199.070099] synchronize_sched() in 
19013 us
May  8 09:47:53 nattytest kernel: [  199.071626] synchronize_sched() in 48 
us
May  8 09:47:53 nattytest kernel: [  199.190083] synchronize_sched() in 
63245 us
May  8 09:47:54 nattytest kernel: [  199.270075] synchronize_sched() in 
78491 us
May  8 09:47:54 nattytest kernel: [  199.321088] synchronize_sched() in 42 
us
May  8 09:47:54 nattytest kernel: [  199.322589] synchronize_sched() in 29 
us
May  8 09:47:54 nattytest kernel: [  199.440101] synchronize_sched() in 
63063 us
May  8 09:47:54 nattytest kernel: [  199.520073] synchronize_sched() in 
78463 us
May  8 09:47:54 nattytest kernel: [  199.571056] synchronize_sched() in 49 
us
May  8 09:47:54 nattytest kernel: [  199.572488] synchronize_sched() in 29 
us
May  8 09:47:54 nattytest kernel: [  199.700083] synchronize_sched() in 
73220 us
May  8 09:47:54 nattytest kernel: [  199.770096] synchronize_sched() in 
68508 us
May  8 09:47:54 nattytest kernel: [  199.821090] synchronize_sched() in 50 
us
May  8 09:47:54 nattytest kernel: [  199.822540] synchronize_sched() in 29 
us
May  8 09:47:54 nattytest kernel: [  199.940084] synchronize_sched() in 
63681 us
May  8 09:47:54 nattytest kernel: [  200.020067] synchronize_sched() in 
78451 us
May  8 09:47:54 nattytest kernel: [  200.071095] synchronize_sched() in 41 
us
May  8 09:47:54 nattytest kernel: [  200.072566] synchronize_sched() in 29 
us
May  8 09:47:54 nattytest kernel: [  200.190089] synchronize_sched() in 
63584 us
May  8 09:47:55 nattytest kernel: [  200.280076] synchronize_sched() in 
89123 us
May  8 09:47:55 nattytest kernel: [  200.341011] synchronize_sched() in 61 
us
May  8 09:47:55 nattytest kernel: [  200.360094] synchronize_sched() in 
18527 us
May  8 09:47:55 nattytest kernel: [  200.520085] synchronize_sched() in 
94129 us
May  8 09:47:55 nattytest kernel: [  200.670072] synchronize_sched() in 
148512 us
May  8 09:47:55 nattytest kernel: [  200.730983] synchronize_sched() in 41 
us
May  8 09:47:55 nattytest kernel: [  200.750355] synchronize_sched() in 
17917 us
May  8 09:47:55 nattytest kernel: [  200.890082] synchronize_sched() in 
83406 us
May  8 09:47:55 nattytest kernel: [  200.970072] synchronize_sched() in 
78439 us
May  8 09:47:55 nattytest kernel: [  201.031034] synchronize_sched() in 45 
us
May  8 09:47:55 nattytest kernel: [  201.050090] synchronize_sched() in 
17555 us
May  8 09:47:55 nattytest kernel: [  201.200090] synchronize_sched() in 
83318 us
May  8 09:47:56 nattytest kernel: [  201.270075] synchronize_sched() in 
68468 us
May  8 09:47:56 nattytest kernel: [  201.330983] synchronize_sched() in 41 
us
May  8 09:47:56 nattytest kernel: [  201.332487] synchronize_sched() in 62 
us
May  8 09:47:56 nattytest kernel: [  201.450088] synchronize_sched() in 
53772 us
May  8 09:47:56 nattytest kernel: [  201.530075] synchronize_sched() in 
78437 us
May  8 09:47:56 nattytest kernel: [  201.590986] synchronize_sched() in 46 
us
May  8 09:47:56 nattytest kernel: [  201.592134] synchronize_sched() in 29 
us
May  8 09:47:56 nattytest kernel: [  201.710085] synchronize_sched() in 
63551 us
May  8 09:47:56 nattytest kernel: [  201.830146] synchronize_sched() in 
118553 us
May  8 09:47:56 nattytest kernel: [  201.891143] synchronize_sched() in 50 
us
May  8 09:47:56 nattytest kernel: [  201.892712] synchronize_sched() in 55 
us
May  8 09:47:56 nattytest kernel: [  202.010092] synchronize_sched() in 
63446 us
May  8 09:47:56 nattytest kernel: [  202.090126] synchronize_sched() in 
78477 us
May  8 09:47:56 nattytest kernel: [  202.141120] synchronize_sched() in 45 
us
May  8 09:47:56 nattytest kernel: [  202.142867] synchronize_sched() in 30 
us
May  8 09:47:57 nattytest kernel: [  202.260092] synchronize_sched() in 
63271 us
May  8 09:47:57 nattytest kernel: [  202.340071] synchronize_sched() in 
78474 us
May  8 09:47:57 nattytest kernel: [  202.391094] synchronize_sched() in 44 
us
May  8 09:47:57 nattytest kernel: [  202.392581] synchronize_sched() in 29 
us
May  8 09:47:57 nattytest kernel: [  202.510110] synchronize_sched() in 
63718 us
May  8 09:47:57 nattytest kernel: [  202.600092] synchronize_sched() in 
88434 us
May  8 09:47:57 nattytest kernel: [  202.661075] synchronize_sched() in 46 
us
May  8 09:47:57 nattytest kernel: [  202.680091] synchronize_sched() in 
17516 us
May  8 09:47:57 nattytest kernel: [  202.820083] synchronize_sched() in 
83733 us
May  8 09:47:57 nattytest kernel: [  202.900067] synchronize_sched() in 
78478 us
May  8 09:47:57 nattytest kernel: [  202.951062] synchronize_sched() in 43 
us
May  8 09:47:57 nattytest kernel: [  202.960445] synchronize_sched() in 
7921 us
May  8 09:47:57 nattytest kernel: [  203.100080] synchronize_sched() in 
83496 us
May  8 09:47:57 nattytest kernel: [  203.170084] synchronize_sched() in 
68474 us
May  8 09:47:57 nattytest kernel: [  203.221083] synchronize_sched() in 41 
us
May  8 09:47:57 nattytest kernel: [  203.222692] synchronize_sched() in 68 
us
May  8 09:47:58 nattytest kernel: [  203.350083] synchronize_sched() in 
74062 us
May  8 09:47:58 nattytest kernel: [  203.430100] synchronize_sched() in 
78468 us
May  8 09:47:58 nattytest kernel: [  203.491028] synchronize_sched() in 52 
us
May  8 09:47:58 nattytest kernel: [  203.510086] synchronize_sched() in 
17607 us
May  8 09:47:58 nattytest kernel: [  203.670080] synchronize_sched() in 
83798 us
May  8 09:47:58 nattytest kernel: [  203.750080] synchronize_sched() in 
78382 us
May  8 09:47:58 nattytest kernel: [  203.821032] synchronize_sched() in 48 
us
May  8 09:47:58 nattytest kernel: [  203.840093] synchronize_sched() in 
17608 us
May  8 09:47:58 nattytest kernel: [  203.990084] synchronize_sched() in 
73664 us
May  8 09:47:58 nattytest kernel: [  204.080078] synchronize_sched() in 
88391 us
May  8 09:47:58 nattytest kernel: [  204.141021] synchronize_sched() in 44 
us
May  8 09:47:58 nattytest kernel: [  204.160083] synchronize_sched() in 
17671 us
May  8 09:47:59 nattytest kernel: [  204.310086] synchronize_sched() in 
83288 us
May  8 09:47:59 nattytest kernel: [  204.380074] synchronize_sched() in 
69168 us
May  8 09:47:59 nattytest kernel: [  204.431059] synchronize_sched() in 67 
us
May  8 09:47:59 nattytest kernel: [  204.432205] synchronize_sched() in 30 
us
May  8 09:47:59 nattytest kernel: [  204.550147] synchronize_sched() in 
54218 us
May  8 09:47:59 nattytest kernel: [  204.640079] synchronize_sched() in 
88401 us
May  8 09:47:59 nattytest kernel: [  204.701062] synchronize_sched() in 48 
us
May  8 09:47:59 nattytest kernel: [  204.720093] synchronize_sched() in 
17508 us
May  8 09:47:59 nattytest kernel: [  204.850108] synchronize_sched() in 
73968 us
May  8 09:47:59 nattytest kernel: [  204.940074] synchronize_sched() in 
88489 us
May  8 09:47:59 nattytest kernel: [  205.011002] synchronize_sched() in 44 
us
May  8 09:47:59 nattytest kernel: [  205.030104] synchronize_sched() in 
17658 us
May  8 09:47:59 nattytest kernel: [  205.190091] synchronize_sched() in 
83651 us
May  8 09:48:00 nattytest kernel: [  205.270094] synchronize_sched() in 
78501 us
May  8 09:48:00 nattytest kernel: [  205.341000] synchronize_sched() in 65 
us
May  8 09:48:00 nattytest kernel: [  205.360081] synchronize_sched() in 
17640 us





^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Alex Bligh @ 2011-05-08 13:06 UTC (permalink / raw)
  To: paulmck; +Cc: Eric Dumazet, netdev, Alex Bligh
In-Reply-To: <20110508124428.GJ2641@linux.vnet.ibm.com>



--On 8 May 2011 05:44:28 -0700 "Paul E. McKenney" 
<paulmck@linux.vnet.ibm.com> wrote:

> OK, let's break it out...
>
> 4.022 seconds for 100 interfaces means about 40 milliseconds per
> interface.

It's 200 interfaces as they are veth pairs, so 20ms.

> My guess is that you have CONFIG_NO_HZ=y, which means that RCU needs to
> figure out that various CPUs are in dyntick-idle state, which is a minimum
> of 6 jiffies.

That sounds like the main cause.

> It could be longer if a given CPU happens to be in IRQ
> when RCU checks, so call it 9 jiffies.

That sounds unlikely to happen much of the time. Looking at /proc/interrupts
not much is going on.

> If you are doing the interfaces
> synchronously, you will likely have to wait for a prior grace period (due
> to background activity).

Not sure I understand that (there's nothing else going on), but...

> So I can easily imagine 18 milliseconds for
> HZ=1000.  40 milliseconds sounds a bit high, but perhaps not impossible.

Add to that the fact that there are 2 x synchronize_sched() and one
rcu_barrier() per interface removal. If I ignore your IRQ idea, that's
6 x 3 = 18ms per interface removal at CONFIG_HZ=10, 180ms at
CONFIG_HZ=100.

-- 
Alex Bligh

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 12:50 UTC (permalink / raw)
  To: Alex Bligh; +Cc: Eric Dumazet, netdev
In-Reply-To: <7B76F9D75FD26D716624004B@nimrod.local>

On Sun, May 08, 2011 at 01:18:55PM +0100, Alex Bligh wrote:
> 
> 
> --On 8 May 2011 10:35:02 +0100 Alex Bligh <alex@alex.org.uk> wrote:
> 
> >I suspect this may just mean an rcu reader holds the rcu_read_lock
> >for a jiffies related time. Though I'm having difficulty seeing
> >what that might be on a system where the net is in essence idle.
> 
> Having read the RCU docs, this can't be right, because blocking
> is not legal when in the rcu_read_lock critical section.
> 
> The system concerned is an 8 cpu system but I get comparable
> results on a 2 cpu system.
> 
> I am guessing that when the synchronize_sched() happens, all cores
> but the cpu on which that is executing are idle (at least on
> the vast majority of calls) as the machine itself is idle.
> As I understand, RCU synchronization (in the absence of lots
> of callbacks etc.) is meant to wait until it knows all RCU
> read critical sections which are running on entry have
> been left. It exploits the fact that RCU read critical sections
> cannot block by waiting for a context switch on each cpu, OR
> for that cpu to be in the idle state or running user code (also
> incompatible with a read critical section).
> 
> The fact that increasing HZ masks the problem seems to imply that
> sychronize_sched() is waiting when it shouldn't be, as it suggests
> it's waiting for a context switch. But surely it shouldn't be
> waiting for context switch if all other cpu cores are idle?
> It knows that it (the caller) doesn't hold an rcu_read_lock,
> and presumably can see the other cpus are in the idle state,
> in which case surely it should return immediately? Distribution
> of latency in synchronize_sched() looks like this:
> 
> 20-49 us 110 instances (27.500%)
> 50-99 us 45 instances (11.250%)

Really?  I am having a hard time believing this above two.  Is this really
2000-4999 us and 5000-9999 us?  That would be much more believable,
and expected on a busy system with lots of context switching.  Or on a
system with CONFIG_NO_HZ=n.

> 5000-9999 us 5 instances (1.250%)

This makes sense for a mostly-idle system with frequent short bursts
of work.

> 10000-19999 us 33 instances (8.250%)

This makes sense for a CONFIG_NO_HZ system that is idle, where there
is some amount of background work that is also using RCU grace periods.

> 20000-49999 us 4 instances (1.000%)
> 50000-99999 us 191 instances (47.750%)
> 100000-199999 us 12 instances (3.000%)

These last involve additional delays.  Possibilities include long-running
irq handlers, SMIs, or NMIs.

								Thanx, Paul

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 12:44 UTC (permalink / raw)
  To: Alex Bligh; +Cc: Eric Dumazet, netdev
In-Reply-To: <F57561A93EFF5E88729A8D53@nimrod.local>

On Sun, May 08, 2011 at 10:35:02AM +0100, Alex Bligh wrote:
> Eric,
> 
> --On 8 May 2011 09:12:22 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> >By the way, if I change HZ from 1000 to 100 I now have ten times slower
> >result :
> 
> I repeated that test here. With HZ set to 1000 I got a total time of
> 4.022 seconds to remove 100 interfaces, of which:
> 
> Total 3.03808 Usage 199 Average 0.01527 elsewhere
> Total 0.93992 Usage 200 Average 0.00470 synchronizing
> 
> as opposed to a total of 27.917 seconds with HZ set to 100, of which
> 
> Total 18.98515 Usage 199 Average 0.09540 elsewhere
> Total 8.77581 Usage 200 Average 0.04388 synchronizing
> 
> Not quite a factor of 10 improvement, but nearly.
> 
> I have CONFIG_RCU_FAST_NO_HZ=y
> 
> I suspect this may just mean an rcu reader holds the rcu_read_lock
> for a jiffies related time. Though I'm having difficulty seeing
> what that might be on a system where the net is in essence idle.

OK, let's break it out...

4.022 seconds for 100 interfaces means about 40 milliseconds per interface.

My guess is that you have CONFIG_NO_HZ=y, which means that RCU needs to
figure out that various CPUs are in dyntick-idle state, which is a minimum
of 6 jiffies.  It could be longer if a given CPU happens to be in IRQ
when RCU checks, so call it 9 jiffies.  If you are doing the interfaces
synchronously, you will likely have to wait for a prior grace period (due
to background activity).  So I can easily imagine 18 milliseconds for
HZ=1000.  40 milliseconds sounds a bit high, but perhaps not impossible.

							Thanx, Paul

^ permalink raw reply

* Re: Scalability of interface creation and deletion
From: Paul E. McKenney @ 2011-05-08 12:32 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Alex Bligh, netdev
In-Reply-To: <1304838742.3207.45.camel@edumazet-laptop>

On Sun, May 08, 2011 at 09:12:22AM +0200, Eric Dumazet wrote:
> Le samedi 07 mai 2011 à 20:42 +0200, Eric Dumazet a écrit :
> > Here is my trace here for one device deletion on one 8 core machine
> > 
> > [  800.447012] synchronize_rcu() in 15787 us
> > [  800.455013] synchronize_rcu() in 7682 us
> > [  800.464019] rcu_barrier() in 8487 us
> > 
> > Not that bad.

There is always synchronize_rcu_expedited() if you need lower latency
and can tolerate a bit higher CPU overhead.

							Thanx, Paul

> > $ grep RCU .config
> > # RCU Subsystem
> > CONFIG_TREE_RCU=y
> > # CONFIG_PREEMPT_RCU is not set
> > CONFIG_RCU_TRACE=y
> > CONFIG_RCU_FANOUT=32
> > # CONFIG_RCU_FANOUT_EXACT is not set
> > # CONFIG_RCU_FAST_NO_HZ is not set
> > CONFIG_TREE_RCU_TRACE=y
> > 
> 
> By the way, if I change HZ from 1000 to 100 I now have ten times slower
> result :
> 
> # ip link add link eth0 eth0.103 type vlan id 103
> # time ip link del eth0.103
> 
> real	0m0.430s
> user	0m0.000s
> sys	0m0.000s
> 
> So all this is related to your HZ value, even in a CONFIG_NO_HZ=y
> kernel. Alex, I guess you have HZ=250 ?
> 
> # uname -a
> Linux svivoipvnx021 2.6.39-rc6-00214-g5511a34-dirty #574 SMP Sun May 8
> 08:44:14 CEST 2011 x86_64 x86_64 x86_64 GNU/Linux
> # cat /proc/cmdline
> 
> I enabled CONFIG_RCU_FAST_NO_HZ and got worse results (but not
> alsways... its very variable)
> 
> # time ip link del eth0.103
> 
> real	0m0.544s
> user	0m0.000s
> sys	0m0.000s
> 
> 
> # time ip link del eth0.103
> 
> real	0m0.414s
> user	0m0.000s
> sys	0m0.000s
> 
> 

^ permalink raw reply

* Re: [PATCH 0/7] Network namespace manipulation with file descriptors
From: Alex Bligh @ 2011-05-08 12:31 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: linux-arch, netdev, linux-kernel, Linux Containers, linux-fsdevel,
	Alex Bligh
In-Reply-To: <m1fwoqoapn.fsf@fess.ebiederm.org>

Eric,

--On 7 May 2011 07:18:44 -0700 "Eric W. Biederman" <ebiederm@xmission.com> 
wrote:

> You are essentially describing my setns system call.

Great - thanks.

>> As a secondary issue, ever without your patch, it would be really
>> useful to be able to read from userspace the current network namespace.
>> (i.e. the pid concerned, or 1 if not unshared). I would like to
>> simply modify a routing daemon's init script so it doesn't start
>> if in the host, e.g. at the top:
>>  [ `cat /proc/.../networknamespace` eq 1 ] && exit 0
>
> You can read the processes network namespace by opening
> /proc/<pid>/ns/net.  Unfortunately comparing the network
> namespaces for identity is another matter.  You will probably
> be better off simply forcing the routing daemon to start
> in the desired network namespace in it's initscript.

It's solely a minor convenience issue. The network namespace is
unshared by the filing system namespace isn't. So there's an
/etc/init.d/bird, which I would like to remain there so I
can call it from the network namespace concerned (which
doesn't exist at boot time). But I'd also like it not to run
at boot time. So it would be useful to me if the script could
check whether it is running in the default namespace and
refuse to launch if so.

I note the /proc/ file you mention is not present in the main tree at
the moment.

> For purposes of clarity please have a look at my work in
> progress patch for iproute2.  This demonstrates how I expect
> userspace to work in a multi-network namespace world.

Will do

-- 
Alex Bligh

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox