* Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.
From: Cedric Le Goater @ 2010-03-02 13:10 UTC (permalink / raw)
To: Eric W. Biederman
Cc: Daniel Lezcano, Pavel Emelyanov, Linux Netdev List, containers,
Netfilter Development Mailinglist, Ben Greear
In-Reply-To: <m1ljebwwgd.fsf@fess.ebiederm.org>
On 03/01/2010 10:42 PM, Eric W. Biederman wrote:
> I am of two mind about my patches. Right now they are a brilliant
> proof of concept that we can name namespaces without needing a
> namespace for the names of namespaces, and start to be a practical
> solution to the join problem. At the same time, I'm not certain
> I like a solution that requires yet more syscalls so I ask myself
> is there not yet a simpler way.
thinking aloud,
what if you made the nsproxy a vfs_inode ? we could then mount the nsfs
to do all sorts of fs operations on the object, like notifying easily
its deletion. we would need to find a meaningful name, probably the inode
number.
one syscall (nsfd) would be required to get the nsproxy of a task (pid).
you can't guess that from an inode number.
C.
^ permalink raw reply
* Re: [RFC PATCH]xfrm: fix perpetual bundles
From: Herbert Xu @ 2010-03-02 12:51 UTC (permalink / raw)
To: jamal; +Cc: davem, kaber, yoshfuji, nakam, eric.dumazet, netdev,
Steffen Klassert
In-Reply-To: <1267531905.21749.21.camel@bigi>
On Tue, Mar 02, 2010 at 07:11:45AM -0500, jamal wrote:
>
> fl->fl4_src is valid non-zero. But in xfrm4_fill_dst()
I see, so problem #1 doesn't exist.
> we do wholesale copy of xdst->u.rt.fl = rt->fl; and rt->fl.fl4_src is
> 0.0.0.0.
Heh, you've just discovered a bug that I carefully planted back
in 2007, while merging the v4/v6 policy code :)
It is a clear merging error, where *fl became rt->fl which is
totally different. So please try this patch:
ipsec: Fix bogus bundle flowi
When I merged the bundle creation code, I introduced a bogus
flowi value in the bundle. Instead of getting from the caller,
it was instead set to the flow in the route object, which is
totally different.
The end result is that the bundles we created never match, and
we instead end up with an ever growing bundle list.
Thanks to Jamal for find this problem.
Reported-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 60c2770..1e355d8 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -274,7 +274,8 @@ struct xfrm_policy_afinfo {
struct dst_entry *dst,
int nfheader_len);
int (*fill_dst)(struct xfrm_dst *xdst,
- struct net_device *dev);
+ struct net_device *dev,
+ struct flowi *fl);
};
extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 67107d6..e4a1483 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -91,11 +91,12 @@ static int xfrm4_init_path(struct xfrm_dst *path, struct dst_entry *dst,
return 0;
}
-static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct rtable *rt = (struct rtable *)xdst->route;
- xdst->u.rt.fl = rt->fl;
+ xdst->u.rt.fl = *fl;
xdst->u.dst.dev = dev;
dev_hold(dev);
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index dbdc696..ae18165 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -116,7 +116,8 @@ static int xfrm6_init_path(struct xfrm_dst *path, struct dst_entry *dst,
return 0;
}
-static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct rt6_info *rt = (struct rt6_info*)xdst->route;
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 0ecb16a..f12dd3d 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1354,7 +1354,8 @@ static inline int xfrm_init_path(struct xfrm_dst *path, struct dst_entry *dst,
return err;
}
-static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct xfrm_policy_afinfo *afinfo =
xfrm_policy_get_afinfo(xdst->u.dst.ops->family);
@@ -1363,7 +1364,7 @@ static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
if (!afinfo)
return -EINVAL;
- err = afinfo->fill_dst(xdst, dev);
+ err = afinfo->fill_dst(xdst, dev, fl);
xfrm_policy_put_afinfo(afinfo);
@@ -1468,7 +1469,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
for (dst_prev = dst0; dst_prev != dst; dst_prev = dst_prev->child) {
struct xfrm_dst *xdst = (struct xfrm_dst *)dst_prev;
- err = xfrm_fill_dst(xdst, dev);
+ err = xfrm_fill_dst(xdst, dev, fl);
if (err)
goto free_dst;
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related
* RE: [PATCH 1/1] bnx2x: Tx barriers and locks
From: Vladislav Zolotarov @ 2010-03-02 12:50 UTC (permalink / raw)
To: Stanislaw Gruszka, Michael Chan
Cc: netdev@vger.kernel.org, davem@davemloft.net, Eilon Greenstein,
Matthew Carlson
In-Reply-To: <20100302113032.GA2362@dhcp-lab-161.englab.brq.redhat.com>
Stanislaw barrier() is not a memory barrier - it's a compiler barrier. I don't think removing it from bnx2x_tx_avail() will improve anything. If u think I'm wrong, could u, pls., provide a specific example.
Regarding the patch u've proposed - I don't see any obvious benefit in the code change u've suggested except for replacing the smp_wmb() to smp_mb() in the bnx2x_tx_int() and would prefer to wait for Dave's reply on that matter.
Let's recall that the bxn2x_start_xmit() is called under tx_lock(), so no additional memory barriers needed to ensure that bnx2x_tx_avail() has fresh values of BD consumer and producer at the beginning of bnx2x_start_xmit(). That's why we don't need the more complicated logic putting the queue asleep at the beginning of bnx2x_start_xmit() as we need at the end. That's why I think your "goto" change in the beginning of bnx2x_start_xmit() is suboptimal.
Thanks,
vlad
> -----Original Message-----
> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
> Sent: Tuesday, March 02, 2010 1:31 PM
> To: Michael Chan
> Cc: Vladislav Zolotarov; netdev@vger.kernel.org;
> davem@davemloft.net; Eilon Greenstein; Matthew Carlson
> Subject: Re: [PATCH 1/1] bnx2x: Tx barriers and locks
>
> On Mon, Mar 01, 2010 at 09:59:07AM -0800, Michael Chan wrote:
> > > There is still difference between what we have in bnx2x
> and bnx2/tg3
> > > regarding memory barriers in tx_poll/start_xmit code.
> Mainly we have
> > > smp_mb() in bnx2/tg3_tx_avail(), and in bnx2/tg3_tx_int()
> is smp_mb()
> > > not smp_wmb(). I do not see that bnx2x is wrong, but
> would like to know
> > > why there is a difference, maybe bnx2/tg3 should be changed?
> > >
> >
> > The memory barrier in tx_int() is to make the tx index update happen
> > before the netif_tx_queue_stopped() check. The barrier is
> to prevent a
> > situation like this:
> >
> > CPU0 CPU1
> > start_xmit()
> > if (tx_ring_full) {
> > tx_int()
> >
> if (!netif_tx_queue_stopped)
> > netif_tx_stop_queue()
> > if (!tx_ring_full)
> >
> update_tx_index
> > netif_tx_wake_queue()
> > }
> >
> >
> > The update_tx_index code is before the if statement in
> program order,
> > but the CPU and/or compiler can reorder it as shown above.
> smp_mb() will
> > prevent that. Will smp_wmb() prevent that as well?
>
> No. smp_wmb() affect only write orders on CPU1 performing tx_int(), so
> that should be fixed in bnx2x.
>
> Regarding memory barrier in tx_avail(), I don't think it its
> needed for
> anything, except maybe usage at the beginning of
> start_xmit(), but we can
> just remove that like in the patch below. I going to post "official"
> patches for tg3, bnx2 and bnx2x, if no nobody has nothing against.
>
> diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
> index ed785a3..0f406b8 100644
> --- a/drivers/net/bnx2x_main.c
> +++ b/drivers/net/bnx2x_main.c
> @@ -893,7 +893,6 @@ static inline u16 bnx2x_tx_avail(struct
> bnx2x_fastpath *fp)
> u16 prod;
> u16 cons;
>
> - barrier(); /* Tell compiler that prod and cons can change */
> prod = fp->tx_bd_prod;
> cons = fp->tx_bd_cons;
>
> @@ -963,9 +962,8 @@ static int bnx2x_tx_int(struct bnx2x_fastpath *fp)
> * start_xmit() will miss it and cause the queue to be stopped
> * forever.
> */
> - smp_wmb();
> + smp_mb();
>
> - /* TBD need a thresh? */
> if (unlikely(netif_tx_queue_stopped(txq))) {
> /* Taking tx_lock() is needed to prevent
> reenabling the queue
> * while it's empty. This could have happen if
> rx_action() gets
> @@ -11177,10 +11175,9 @@ static netdev_tx_t
> bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
> struct eth_tx_bd *tx_data_bd, *total_pkt_bd = NULL;
> struct eth_tx_parse_bd *pbd = NULL;
> u16 pkt_prod, bd_prod;
> - int nbd, fp_index;
> + int nbd, fp_index, i, ret;
> dma_addr_t mapping;
> u32 xmit_type = bnx2x_xmit_type(bp, skb);
> - int i;
> u8 hlen = 0;
> __le16 pkt_size = 0;
>
> @@ -11195,10 +11192,9 @@ static netdev_tx_t
> bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
> fp = &bp->fp[fp_index];
>
> if (unlikely(bnx2x_tx_avail(fp) <
> (skb_shinfo(skb)->nr_frags + 3))) {
> - fp->eth_q_stats.driver_xoff++;
> - netif_tx_stop_queue(txq);
> BNX2X_ERR("BUG! Tx ring full when queue awake!\n");
> - return NETDEV_TX_BUSY;
> + ret = NETDEV_TX_BUSY;
>
> + goto stop_queue;
> }
>
> DP(NETIF_MSG_TX_QUEUED, "SKB: summed %x protocol %x
> protocol(%x,%x)"
> @@ -11426,19 +11422,24 @@ static netdev_tx_t
> bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
> mmiowb();
>
> fp->tx_bd_prod += nbd;
> -
> - if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
> - netif_tx_stop_queue(txq);
> - /* We want bnx2x_tx_int to "see" the updated tx_bd_prod
> - if we put Tx into XOFF state. */
> - smp_mb();
> - fp->eth_q_stats.driver_xoff++;
> - if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
> - netif_tx_wake_queue(txq);
> - }
> fp->tx_pkt++;
> +
> + ret = NETDEV_TX_OK;
> + if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3))
> + goto stop_queue;
> +
> + return ret;
>
> - return NETDEV_TX_OK;
> +stop_queue:
> + netif_tx_stop_queue(txq);
> + /* paired barrier is in bnx2x_tx_int(), update of tx_bd_cons
> + * have to be visable here, after we XOFF bit setting */
> + smp_mb();
> + fp->eth_q_stats.driver_xoff++;
> + if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
> + netif_tx_wake_queue(txq);
> +
> + return ret;
> }
>
> /* called with rtnl_lock */
>
>
^ permalink raw reply
* Re: [RFC PATCH]xfrm: fix perpetual bundles
From: jamal @ 2010-03-02 12:11 UTC (permalink / raw)
To: Herbert Xu
Cc: davem, kaber, yoshfuji, nakam, eric.dumazet, netdev,
Steffen Klassert
In-Reply-To: <20100302112754.GA1513@gondor.apana.org.au>
On Tue, 2010-03-02 at 19:27 +0800, Herbert Xu wrote:
> On Wed, Feb 24, 2010 at 08:19:24AM -0500, jamal wrote:
> > 1)In the connect() stage, in the slow path a route cache is
> > created with the rth->fl.fl4_src of 0.0.0.0...
> > ==> policy->bundles is empty, so we do a lookup, fail, create
> > one.. (remember rth->fl.fl4_src of 0.0.0.0 at this stage and
> > thats what we end storing in the bundle/xdst for later comparison
> > instead of the skb's fl)
>
> So this is root number 1. When this stuff was first written this
> case simply wasn't possible. So I think the question we need to
> ask here is can we get a valid address there at the connect stage?
fl->fl4_src is valid non-zero. But in xfrm4_fill_dst()
we do wholesale copy of xdst->u.rt.fl = rt->fl; and rt->fl.fl4_src is
0.0.0.0.
> After all, for non-IPsec connect(2)s, you do get a valid IP address.
> So I don't see why the IPsec case should be different.
>
> Creating a bundle with a zero source address is just a hack to
> make connect(2) succeed immediately. AFAICS getting a valid IP
> address can also be done without waiting for the whole IPsec state
> to be created.
>
I did try to "fix it" above via:
+ if (!xdst->u.rt.fl.fl4_src) {
+ xdst->u.rt.fl.fl4_src = fl->fl4_src;
+ }
But this breaks again later in sendmsg bundle lookup because of
XFRM_SUB_POLICY. If i turned off config XFRM_SUB_POLICY, then
all works. I didnt look closely, but SUB_POLICY does do a memcpy
or two off the dst passed in connect() - which has the wrong src.
So i would have to "fix" a few more spots for it to work. This is
where i gave up concluding that i was just plugging with band-aids.
> Of course if anybody is still interested we could also revisit
> the neighbouresque queueing idea.
not plugged into that discussion..
> > 2)ping sends a packet (does a sendmsg)
> > ==> xfrm_find_bundle() ends up comparing skb's->fl (non-zero
> > fl->fl4_src) with what we stored from #1b. Fails.
> > ==> we create a new bundle at attach the old one at the end of it.
> > ...and now policy->bundles has two xdst entries
>
> This is the way it's supposed to work.
> > 3) Repeat #2, and now we have 3 xdsts in policy bundles
>
> This is what I don't understand. The code is supposed to look
> at every bundle attached to the policy. So why doesn't it find
> the one we created at step #2?
The issue is that the comparison is between xdst->u.rt.fl.fl4_src and
fl->fl4_src. fl->fl4_src is always non-zero. stored
xdst->u.rt.fl.fl4_src is always zero
> In conclusion, I think we have two problems, with the second
> one being the most immediate cause of your symptoms.
Remember the route cache (refer to dst copying above) is created at
connect time;->
So Steffen (on CC) tried to "fix it" by fixing at route cache creation
time. His approach:
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2778,15 +2778,26 @@ int ip_route_output_flow(struct net *net, struct
rtable **rp, struct flowi *flp,
struct sock *sk, int flags)
{
int err;
+ int update_route = 0;
if ((err = __ip_route_output_key(net, rp, flp)) != 0)
return err;
if (flp->proto) {
- if (!flp->fl4_src)
+ if (!flp->fl4_src) {
flp->fl4_src = (*rp)->rt_src;
- if (!flp->fl4_dst)
+ update_route = 1;
+ }
+ if (!flp->fl4_dst) {
flp->fl4_dst = (*rp)->rt_dst;
+ update_route = 1;
+ }
+ if (update_route) {
+ dst_release(&(*rp)->u.dst);
+ if ((err = __ip_route_output_key(net, rp,
flp)) != 0)
+ return err;
+ }
+
err = __xfrm_lookup(net, (struct dst_entry **)rp, flp,
sk,
flags ? XFRM_LOOKUP_WAIT : 0);
if (err == -EREMOTE)
--
I was worried about the impact of this on something else that expects
the behavior.
cheers,
jamal
^ permalink raw reply
* KS8695: possible NAPI issue
From: Yegor Yefremov @ 2010-03-02 12:04 UTC (permalink / raw)
To: netdev; +Cc: figo1802, zealcook
I'm using 2.6.33 kernel and I noticed such a strange behavior:
after system start I transfer one file via netcat from my development
host, after this transfer the network is not functioning i.e. no pings
possible etc.
To narrow down the problem I checked out this commit
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=451f14439847db302e5104c44458b2dbb4b1829d.
Till here the network driver is functioning as intended, but after
NAPI introduction I have this issue. With latest git-pull of "Linus'
kernel tree" I can't even ping right after the systems start.
Any Ideas? What am I missing?
Regards,
Yegor
^ permalink raw reply
* Re: [GIT]: Networking
From: David Miller @ 2010-03-02 12:03 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
In-Reply-To: <20100228.230535.123985162.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Sun, 28 Feb 2010 23:05:35 -0800 (PST)
> Please pull, thanks a lot!
>
> The following changes since commit 30ff056c42c665b9ea535d8515890857ae382540:
> Linus Torvalds (1):
> Merge branch 'x86-uv-for-linus' of git://git.kernel.org/.../tip/linux-2.6-tip
>
> are available in the git repository at:
>
> master.kernel.org:/pub/scm/linux/kernel/git/davem/net-next-2.6.git master
Linus, if you haven't pulled in the networking tree yet, please pull
again as I just pushed the following bug fixes into there tonight.
Thanks!
The following changes since commit 47871889c601d8199c51a4086f77eebd77c29b0b:
David S. Miller (1):
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-next-2.6.git master
Eric Dumazet (1):
net: fix protocol sk_buff field
Herton Ronaldo Krzesinski (1):
sis190: fix cable detect via link status poll
Jiri Pirko (1):
virtio_net: remove forgotten assignment
Sathya Perla (1):
be2net: fix tx completion polling
Sridhar Samudrala (1):
bridge: Fix build error when IGMP_SNOOPING is not enabled
drivers/net/benet/be_cmds.c | 26 +++++++++++-----------
drivers/net/benet/be_cmds.h | 2 +-
drivers/net/benet/be_main.c | 47 +++++++++++++++++++++----------------------
drivers/net/sis190.c | 23 ++++++++++++++++----
drivers/net/virtio_net.c | 1 -
include/linux/skbuff.h | 2 +-
net/bridge/br_private.h | 14 ++++++++----
7 files changed, 65 insertions(+), 50 deletions(-)
^ permalink raw reply
* Re: [net-next-2.6 PATCH] infiniband: convert to use netdev_for_each_mc_addr
From: Jiri Pirko @ 2010-03-02 12:01 UTC (permalink / raw)
To: Or Gerlitz
Cc: Jason Gunthorpe, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
In-Reply-To: <4B8B7139.9050707-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
Mon, Mar 01, 2010 at 08:48:09AM CET, ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org wrote:
>Jason Gunthorpe wrote:
>> Jiri Pirko wrote:
>>> when bonding changes it's type, flush mc addresses and start over.
>
>> There was a patch posted that tried to do something like what you are describing
>
>Indeed, Jason, commit 75c785 "bonding: remap muticast addresses without using dev_close() and dev_open()" from Moni Shoua <monis-smomgflXvOZWk0Htik3J/w@public.gmane.org> does exactly that, isn't it?
This affects different mc_list.
>
>Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [net-next-2.6 PATCH] virtio_net: remove forgotten assignment
From: David Miller @ 2010-03-02 11:57 UTC (permalink / raw)
To: jpirko; +Cc: netdev
In-Reply-To: <20100301112254.GB2799@psychotron.lab.eng.brq.redhat.com>
From: Jiri Pirko <jpirko@redhat.com>
Date: Mon, 1 Mar 2010 12:22:55 +0100
> This is no longer needed. I missed to remove this in
> 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] be2net: fix tx completion polling
From: David Miller @ 2010-03-02 11:56 UTC (permalink / raw)
To: sathyap; +Cc: netdev
In-Reply-To: <20100302063615.GA6480@serverengines.com>
From: Sathya Perla <sathyap@serverengines.com>
Date: Tue, 2 Mar 2010 12:06:15 +0530
> On 26/02/10 04:19 -0800, David Miller wrote:
>> From: Sathya Perla <sathyap@serverengines.com>
>> Date: Thu, 25 Feb 2010 17:25:16 +0530
>>
>> > In tx/mcc polling, napi_complete() is being incorrectly called
>> > before reaping tx completions. This can cause tx compl processing
>> > to be scheduled on another cpu concurrently which can result in a panic.
>> > This if fixed by calling napi complete() after tx/mcc compl processing
>> > but before re-enabling interrupts (via a cq notify).
>> >
>> > Pls apply to net-2.6.
>>
>> net-2.6 is closed, 2.6.33 has been released.
>>
>> > Signed-off-by: Sathya Perla <sathyap@serverengines.com>
>>
>> This patch does not apply to net-next-2.6
>
> I've re-done the patch for net-next-2.6: Pls apply; thanks!
>
> In tx/mcc polling, napi_complete() is being incorrectly called
> before reaping tx completions. This can cause tx compl processing
> to be scheduled on another cpu concurrently which can result in a panic.
> This if fixed by calling napi complete() after tx/mcc compl processing
> but before re-enabling interrupts (via a cq notify).
>
> Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Applied thanks.
^ permalink raw reply
* Re: [PATCH] sis190: fix cable detect via link status poll
From: David Miller @ 2010-03-02 11:45 UTC (permalink / raw)
To: jeff; +Cc: netdev
In-Reply-To: <20100301204009.GA15782@havoc.gtf.org>
From: Jeff Garzik <jeff@garzik.org>
Date: Mon, 1 Mar 2010 15:40:09 -0500
> Some sis190 devices don't report LinkChange, so do polling for
> link status.
>
> Fixes http://bugzilla.kernel.org/show_bug.cgi?id=11926
>
> Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Applied, thanks for giving life to this patch Jeff.
I'll stick this into 2.6.34 and if we want we can backport it
to -stable after it cooks there for a while.
Thanks again.
^ permalink raw reply
* Re: [rfc/rft][patch] should use scheduler sync hint in tcp_prequeue()?
From: Mike Galbraith @ 2010-03-02 11:41 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Eric Dumazet, netdev, LKML, Ingo Molnar
In-Reply-To: <1267529525.25158.40.camel@laptop>
On Tue, 2010-03-02 at 12:32 +0100, Peter Zijlstra wrote:
> On Tue, 2010-03-02 at 12:27 +0100, Eric Dumazet wrote:
> > My Q6600 has shared caches
>
> Isn't core2quad a dual die construct, having 2 cache domains?
(yes.. am I using wrong terminology?)
^ permalink raw reply
* Re: [PATCH 1/1] bnx2x: Tx barriers and locks
From: Stanislaw Gruszka @ 2010-03-02 11:38 UTC (permalink / raw)
To: Vladislav Zolotarov
Cc: Michael Chan, netdev@vger.kernel.org, davem@davemloft.net,
Eilon Greenstein, Matthew Carlson
In-Reply-To: <8628FE4E7912BF47A96AE7DD7BAC0AADCB46A2B3FE@SJEXCHCCR02.corp.ad.broadcom.com>
On Tue, Mar 02, 2010 at 02:38:39AM -0800, Vladislav Zolotarov wrote:
> After reading a Pentium Developers Manual I'm afraid I might have assumed wrong and there is needed a read memory barrier to ensure that the bit testing is performed not earlier the specified location in the code flow (due to CPU reordering).
Linux supports more relaxed cpu's than Pentium :)
> Dave, as an author of atomic_ops.txt paper I think u r the best man to ask. Could u pls. clarify that if we need to ensure that the bit testing is needed AFTER the consumer update (namely after the smp_wmb()) I need to replace it with the smp_mb().
>
> If yes, it's a clear bug and I'll prepare an appropriate patch immediately.
Yes, it's a bug.
Thanks
Stanislaw
^ permalink raw reply
* Re: [rfc/rft][patch] should use scheduler sync hint in tcp_prequeue()?
From: Mike Galbraith @ 2010-03-02 11:39 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, LKML, Ingo Molnar
In-Reply-To: <1267529273.2964.111.camel@edumazet-laptop>
On Tue, 2010-03-02 at 12:27 +0100, Eric Dumazet wrote:
> This wake_up_interruptible_sync_poll() change might be good for loopback
> communications (and pleases tbench), but is it desirable for regular
> multi flows NIC traffic ?
If you can take high frequency cache misses, likely yes. For localhost,
that's pretty much guaranteed currently (ergo the question).
-Mike
^ permalink raw reply
* Re: [PATCH 1/1] bnx2x: Tx barriers and locks
From: Stanislaw Gruszka @ 2010-03-02 11:30 UTC (permalink / raw)
To: Michael Chan
Cc: Vladislav Zolotarov, netdev@vger.kernel.org, davem@davemloft.net,
Eilon Greenstein, Matthew Carlson
In-Reply-To: <1267466347.19491.31.camel@nseg_linux_HP1.broadcom.com>
On Mon, Mar 01, 2010 at 09:59:07AM -0800, Michael Chan wrote:
> > There is still difference between what we have in bnx2x and bnx2/tg3
> > regarding memory barriers in tx_poll/start_xmit code. Mainly we have
> > smp_mb() in bnx2/tg3_tx_avail(), and in bnx2/tg3_tx_int() is smp_mb()
> > not smp_wmb(). I do not see that bnx2x is wrong, but would like to know
> > why there is a difference, maybe bnx2/tg3 should be changed?
> >
>
> The memory barrier in tx_int() is to make the tx index update happen
> before the netif_tx_queue_stopped() check. The barrier is to prevent a
> situation like this:
>
> CPU0 CPU1
> start_xmit()
> if (tx_ring_full) {
> tx_int()
> if (!netif_tx_queue_stopped)
> netif_tx_stop_queue()
> if (!tx_ring_full)
> update_tx_index
> netif_tx_wake_queue()
> }
>
>
> The update_tx_index code is before the if statement in program order,
> but the CPU and/or compiler can reorder it as shown above. smp_mb() will
> prevent that. Will smp_wmb() prevent that as well?
No. smp_wmb() affect only write orders on CPU1 performing tx_int(), so
that should be fixed in bnx2x.
Regarding memory barrier in tx_avail(), I don't think it its needed for
anything, except maybe usage at the beginning of start_xmit(), but we can
just remove that like in the patch below. I going to post "official"
patches for tg3, bnx2 and bnx2x, if no nobody has nothing against.
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ed785a3..0f406b8 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -893,7 +893,6 @@ static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp)
u16 prod;
u16 cons;
- barrier(); /* Tell compiler that prod and cons can change */
prod = fp->tx_bd_prod;
cons = fp->tx_bd_cons;
@@ -963,9 +962,8 @@ static int bnx2x_tx_int(struct bnx2x_fastpath *fp)
* start_xmit() will miss it and cause the queue to be stopped
* forever.
*/
- smp_wmb();
+ smp_mb();
- /* TBD need a thresh? */
if (unlikely(netif_tx_queue_stopped(txq))) {
/* Taking tx_lock() is needed to prevent reenabling the queue
* while it's empty. This could have happen if rx_action() gets
@@ -11177,10 +11175,9 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct eth_tx_bd *tx_data_bd, *total_pkt_bd = NULL;
struct eth_tx_parse_bd *pbd = NULL;
u16 pkt_prod, bd_prod;
- int nbd, fp_index;
+ int nbd, fp_index, i, ret;
dma_addr_t mapping;
u32 xmit_type = bnx2x_xmit_type(bp, skb);
- int i;
u8 hlen = 0;
__le16 pkt_size = 0;
@@ -11195,10 +11192,9 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
fp = &bp->fp[fp_index];
if (unlikely(bnx2x_tx_avail(fp) < (skb_shinfo(skb)->nr_frags + 3))) {
- fp->eth_q_stats.driver_xoff++;
- netif_tx_stop_queue(txq);
BNX2X_ERR("BUG! Tx ring full when queue awake!\n");
- return NETDEV_TX_BUSY;
+ ret = NETDEV_TX_BUSY;
+ goto stop_queue;
}
DP(NETIF_MSG_TX_QUEUED, "SKB: summed %x protocol %x protocol(%x,%x)"
@@ -11426,19 +11422,24 @@ static netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
mmiowb();
fp->tx_bd_prod += nbd;
-
- if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3)) {
- netif_tx_stop_queue(txq);
- /* We want bnx2x_tx_int to "see" the updated tx_bd_prod
- if we put Tx into XOFF state. */
- smp_mb();
- fp->eth_q_stats.driver_xoff++;
- if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
- netif_tx_wake_queue(txq);
- }
fp->tx_pkt++;
+
+ ret = NETDEV_TX_OK;
+ if (unlikely(bnx2x_tx_avail(fp) < MAX_SKB_FRAGS + 3))
+ goto stop_queue;
+
+ return ret;
- return NETDEV_TX_OK;
+stop_queue:
+ netif_tx_stop_queue(txq);
+ /* paired barrier is in bnx2x_tx_int(), update of tx_bd_cons
+ * have to be visable here, after we XOFF bit setting */
+ smp_mb();
+ fp->eth_q_stats.driver_xoff++;
+ if (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3)
+ netif_tx_wake_queue(txq);
+
+ return ret;
}
/* called with rtnl_lock */
^ permalink raw reply related
* Re: [rfc/rft][patch] should use scheduler sync hint in tcp_prequeue()?
From: Peter Zijlstra @ 2010-03-02 11:32 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Mike Galbraith, netdev, LKML, Ingo Molnar
In-Reply-To: <1267529273.2964.111.camel@edumazet-laptop>
On Tue, 2010-03-02 at 12:27 +0100, Eric Dumazet wrote:
> My Q6600 has shared caches
Isn't core2quad a dual die construct, having 2 cache domains?
^ permalink raw reply
* Re: [RFC PATCH]xfrm: fix perpetual bundles
From: Herbert Xu @ 2010-03-02 11:27 UTC (permalink / raw)
To: jamal; +Cc: davem, kaber, yoshfuji, nakam, eric.dumazet, netdev
In-Reply-To: <1267017564.3973.790.camel@bigi>
On Wed, Feb 24, 2010 at 08:19:24AM -0500, jamal wrote:
>
> Apologies for the shotgun email but this has been perplexing me for
> sometime and i am worried the the patch i have is a band-aid (although
> it fixes the problem), so here's a long-winded description..
First of all I don't think patch fixes the root (or rather, roots)
of the problem.
> 1)In the connect() stage, in the slow path a route cache is
> created with the rth->fl.fl4_src of 0.0.0.0...
> ==> policy->bundles is empty, so we do a lookup, fail, create
> one.. (remember rth->fl.fl4_src of 0.0.0.0 at this stage and
> thats what we end storing in the bundle/xdst for later comparison
> instead of the skb's fl)
So this is root number 1. When this stuff was first written this
case simply wasn't possible. So I think the question we need to
ask here is can we get a valid address there at the connect stage?
After all, for non-IPsec connect(2)s, you do get a valid IP address.
So I don't see why the IPsec case should be different.
Creating a bundle with a zero source address is just a hack to
make connect(2) succeed immediately. AFAICS getting a valid IP
address can also be done without waiting for the whole IPsec state
to be created.
Of course if anybody is still interested we could also revisit
the neighbouresque queueing idea.
> 2)ping sends a packet (does a sendmsg)
> ==> xfrm_find_bundle() ends up comparing skb's->fl (non-zero
> fl->fl4_src) with what we stored from #1b. Fails.
> ==> we create a new bundle at attach the old one at the end of it.
> ...and now policy->bundles has two xdst entries
This is the way it's supposed to work.
> 3) Repeat #2, and now we have 3 xdsts in policy bundles
This is what I don't understand. The code is supposed to look
at every bundle attached to the policy. So why doesn't it find
the one we created at step #2?
In conclusion, I think we have two problems, with the second
one being the most immediate cause of your symptoms.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [rfc/rft][patch] should use scheduler sync hint in tcp_prequeue()?
From: Eric Dumazet @ 2010-03-02 11:27 UTC (permalink / raw)
To: Mike Galbraith; +Cc: netdev, LKML, Ingo Molnar
In-Reply-To: <1267522901.25906.101.camel@marge.simson.net>
Le mardi 02 mars 2010 à 10:41 +0100, Mike Galbraith a écrit :
> Greetings network land.
>
> The reason for this query is that wake_affine() fails if there is one
> and only one task on a runqueue to encourage tasks spreading out, which
> increases cpu utilization. However, for tasks which are communicating
> at high frequency, the cost of the resulting cache misses, should
> partners land in non-shared caches, is horrible to behold. My Q6600 has
> shared caches, which may or may not be hit IFF something perturbs the
> system, and bounces partner to the right core. That won't happen on a
> box with no shared caches of course, and even with shared caches
> available, the pain is highly visible in the TCP numbers below.
>
> The sync hint tells wake_affine() that the waker is likely going to
> sleep soonish, so it subtracts the waker from the load imbalance
> calculation, allowing the partner task to be awakened affine. In the
> shared cache available case, that is also an enabler that the task be
> placed in an idle shared cache, which can increase throughput quite a
> bit (see .31 vs .33 AF UNIX), or may cost a bit if there is little to no
> execution overlap (see pipe).
>
> Now, I _could_ change wake_affine() to globally succeed in the one task
> case, but am loath to do so because that very well may upset delicate
> load balancing apple cart. I think it's much safer to target the spot
> that I know hurts like hell. Thoughts?
>
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 34f5cc2..ba3fc64 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
>
> tp->ucopy.memory = 0;
> } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
> - wake_up_interruptible_poll(sk->sk_sleep,
> + wake_up_interruptible_sync_poll(sk->sk_sleep,
> POLLIN | POLLRDNORM | POLLRDBAND);
> if (!inet_csk_ack_scheduled(sk))
> inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
>
I suspect this discussion is more a lkml topic but anyway...
This wake_up_interruptible_sync_poll() change might be good for loopback
communications (and pleases tbench), but is it desirable for regular
multi flows NIC traffic ?
Ingo probably can answer to this question, since he changed
sock_def_readable() (and others) in commit 6f3d09291b498299
I suspect he missed tcp_prequeue() case, maybe not...
sched, net: socket wakeups are sync
'sync' wakeups are a hint towards the scheduler that (certain)
networking related wakeups likely create coupling between tasks.
^ permalink raw reply
* RE: [PATCH 1/1] bnx2x: Tx barriers and locks
From: Vladislav Zolotarov @ 2010-03-02 10:38 UTC (permalink / raw)
To: Michael Chan, Stanislaw Gruszka
Cc: netdev@vger.kernel.org, davem@davemloft.net, Eilon Greenstein,
Matthew Carlson
In-Reply-To: <1267466347.19491.31.camel@nseg_linux_HP1.broadcom.com>
I was assuming that there is an implicit read memory barrier in the construction
if (unlikely(netif_tx_queue_stopped(txq)))
I assumed it looking at the other kernel code using test_bit() in conditional constructions (like net_tx_action()).
After reading a Pentium Developers Manual I'm afraid I might have assumed wrong and there is needed a read memory barrier to ensure that the bit testing is performed not earlier the specified location in the code flow (due to CPU reordering).
Dave, as an author of atomic_ops.txt paper I think u r the best man to ask. Could u pls. clarify that if we need to ensure that the bit testing is needed AFTER the consumer update (namely after the smp_wmb()) I need to replace it with the smp_mb().
If yes, it's a clear bug and I'll prepare an appropriate patch immediately.
Thanks,
vlad
> -----Original Message-----
> From: Michael Chan [mailto:mchan@broadcom.com]
> Sent: Monday, March 01, 2010 7:59 PM
> To: Stanislaw Gruszka
> Cc: Vladislav Zolotarov; netdev@vger.kernel.org;
> davem@davemloft.net; Eilon Greenstein; Matthew Carlson
> Subject: Re: [PATCH 1/1] bnx2x: Tx barriers and locks
>
>
> On Mon, 2010-03-01 at 05:33 -0800, Stanislaw Gruszka wrote:
> > On Sun, Feb 28, 2010 at 12:12:02PM +0200, Vladislav Zolotarov wrote:
> > > --- a/drivers/net/bnx2x_main.c
> > > +++ b/drivers/net/bnx2x_main.c
> > > @@ -57,8 +57,8 @@
> > > #include "bnx2x_init_ops.h"
> > > #include "bnx2x_dump.h"
> > >
> > > -#define DRV_MODULE_VERSION "1.52.1-6"
> > > -#define DRV_MODULE_RELDATE "2010/02/16"
> > > +#define DRV_MODULE_VERSION "1.52.1-7"
> > > +#define DRV_MODULE_RELDATE "2010/02/28"
> > > #define BNX2X_BC_VER 0x040200
> > >
> > > #include <linux/firmware.h>
> > > @@ -957,21 +957,34 @@ static int bnx2x_tx_int(struct
> bnx2x_fastpath *fp)
> > > fp->tx_pkt_cons = sw_cons;
> > > fp->tx_bd_cons = bd_cons;
> > >
> > > + /* Need to make the tx_bd_cons update visible to start_xmit()
> > > + * before checking for netif_tx_queue_stopped(). Without the
> > > + * memory barrier, there is a small possibility that
> > > + * start_xmit() will miss it and cause the queue to be stopped
> > > + * forever.
> > > + */
> > > + smp_wmb();
> > > +
> > > /* TBD need a thresh? */
> > > if (unlikely(netif_tx_queue_stopped(txq))) {
> > > -
> > > - /* Need to make the tx_bd_cons update visible
> to start_xmit()
> > > - * before checking for
> netif_tx_queue_stopped(). Without the
> > > - * memory barrier, there is a small possibility that
> > > - * start_xmit() will miss it and cause the
> queue to be stopped
> > > - * forever.
> > > + /* Taking tx_lock() is needed to prevent
> reenabling the queue
> > > + * while it's empty. This could have happen if
> rx_action() gets
> > > + * suspended in bnx2x_tx_int() after the
> condition before
> > > + * netif_tx_wake_queue(), while tx_action
> (bnx2x_start_xmit()):
> > > + *
> > > + * stops the queue->sees fresh
> tx_bd_cons->releases the queue->
> > > + * sends some packets consuming the whole queue again->
> > > + * stops the queue
> > > */
> > > - smp_mb();
> > > +
> > > + __netif_tx_lock(txq, smp_processor_id());
> > >
> > > if ((netif_tx_queue_stopped(txq)) &&
> > > (bp->state == BNX2X_STATE_OPEN) &&
> > > (bnx2x_tx_avail(fp) >= MAX_SKB_FRAGS + 3))
> > > netif_tx_wake_queue(txq);
> > > +
> > > + __netif_tx_unlock(txq);
> > > }
> > > return 0;
> > > }
> >
> > There is still difference between what we have in bnx2x and bnx2/tg3
> > regarding memory barriers in tx_poll/start_xmit code. Mainly we have
> > smp_mb() in bnx2/tg3_tx_avail(), and in bnx2/tg3_tx_int()
> is smp_mb()
> > not smp_wmb(). I do not see that bnx2x is wrong, but would
> like to know
> > why there is a difference, maybe bnx2/tg3 should be changed?
> >
>
> The memory barrier in tx_int() is to make the tx index update happen
> before the netif_tx_queue_stopped() check. The barrier is to
> prevent a
> situation like this:
>
> CPU0 CPU1
> start_xmit()
> if (tx_ring_full) {
> tx_int()
> if
> (!netif_tx_queue_stopped)
> netif_tx_stop_queue()
> if (!tx_ring_full)
> update_tx_index
> netif_tx_wake_queue()
> }
>
>
> The update_tx_index code is before the if statement in program order,
> but the CPU and/or compiler can reorder it as shown above.
> smp_mb() will
> prevent that. Will smp_wmb() prevent that as well?
>
>
^ permalink raw reply
* [rfc/rft][patch] should use scheduler sync hint in tcp_prequeue()?
From: Mike Galbraith @ 2010-03-02 9:41 UTC (permalink / raw)
To: netdev; +Cc: LKML
Greetings network land.
The reason for this query is that wake_affine() fails if there is one
and only one task on a runqueue to encourage tasks spreading out, which
increases cpu utilization. However, for tasks which are communicating
at high frequency, the cost of the resulting cache misses, should
partners land in non-shared caches, is horrible to behold. My Q6600 has
shared caches, which may or may not be hit IFF something perturbs the
system, and bounces partner to the right core. That won't happen on a
box with no shared caches of course, and even with shared caches
available, the pain is highly visible in the TCP numbers below.
The sync hint tells wake_affine() that the waker is likely going to
sleep soonish, so it subtracts the waker from the load imbalance
calculation, allowing the partner task to be awakened affine. In the
shared cache available case, that is also an enabler that the task be
placed in an idle shared cache, which can increase throughput quite a
bit (see .31 vs .33 AF UNIX), or may cost a bit if there is little to no
execution overlap (see pipe).
Now, I _could_ change wake_affine() to globally succeed in the one task
case, but am loath to do so because that very well may upset delicate
load balancing apple cart. I think it's much safer to target the spot
that I know hurts like hell. Thoughts?
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 34f5cc2..ba3fc64 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
tp->ucopy.memory = 0;
} else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
- wake_up_interruptible_poll(sk->sk_sleep,
+ wake_up_interruptible_sync_poll(sk->sk_sleep,
POLLIN | POLLRDNORM | POLLRDBAND);
if (!inet_csk_ack_scheduled(sk))
inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
That was the RFC bit, now moving along to the RFT. Busy folks can fast
forward to relevant numbers, or just poke 'D' :)
Below the lmbench numbers is a diff from my experimental fast-path cycle
recovery tree against .33. That's me hoping that some folks with some
time on their hands to test the high speed low drag things that network
folks do, and who wouldn't mind seeing such things go a bit faster, will
become curious and give it a go.
Should anyone do any testing, I'd be particularly interested in seeing
_negative_ results, and a way to reproduce them if it can be done on
localhost + generic Q6600 box. No high speed low drag hardware here
unfortunately. Any results highly welcome, food for thought comes in
many flavors.
(offline preferred... may be considered spam)
Oh, almost forgot. Second set of three runs for 33-smpx is with
SD_SHARE_PKG_RESOURCES disabled on MC domain to disallow use of shared
cache and compare cost/benefit. TCP numbers is what's relevant to
$subject.
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP
ctxsw UNIX UDP TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
marge 2.6.31.12-smp 0.730 2.845 4.85 6.463 11.3 26.2 14.9 31.
marge 2.6.31.12-smp 0.750 2.864 4.78 6.460 11.2 22.9 14.6 31.
marge 2.6.31.12-smp 0.710 2.835 4.81 6.478 11.5 11.0 14.5 30.
marge 2.6.33-smp 1.320 4.552 5.02 9.169 12.5 26.5 15.4 18.
marge 2.6.33-smp 1.450 4.621 5.45 9.286 12.5 11.4 15.4 18.
marge 2.6.33-smp 1.450 4.589 5.53 9.168 12.6 27.5 15.4 18.
marge 2.6.33-smpx 1.160 3.565 5.97 7.513 11.3 9.776 13.9 18.
marge 2.6.33-smpx 1.140 3.569 6.02 7.479 11.2 9.849 14.0 18.
marge 2.6.33-smpx 1.090 3.563 6.39 7.450 11.2 9.785 14.0 18.
marge 2.6.33-smpx 0.730 2.665 4.85 6.565 11.9 10.3 15.2 31.
marge 2.6.33-smpx 0.740 2.701 4.03 6.573 11.7 10.3 15.4 31.
marge 2.6.33-smpx 0.710 2.753 4.86 6.533 11.7 10.3 15.3 31.
File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host OS 0K File 10K File Mmap Prot Page 100fd
Create Delete Create Delete Latency Fault Fault selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
marge 2.6.31.12-smp 798.0 0.503 0.96940 1.434
marge 2.6.31.12-smp 795.0 0.523 0.96630 1.435
marge 2.6.31.12-smp 791.0 0.536 0.97410 1.438
marge 2.6.33-smp 841.0 0.603 1.00320 1.492
marge 2.6.33-smp 818.0 0.582 0.99960 1.496
marge 2.6.33-smp 814.0 0.578 1.00750 1.492
marge 2.6.33-smpx 782.0 0.486 0.97290 1.489
marge 2.6.33-smpx 787.0 0.491 0.97950 1.498
marge 2.6.33-smpx 801.0 0.469 0.97690 1.492
marge 2.6.33-smpx 783.0 0.496 0.97200 1.497
marge 2.6.33-smpx 809.0 0.505 0.98070 1.504
marge 2.6.33-smpx 796.0 0.501 0.98820 1.502
*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem
UNIX reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
marge 2.6.31.12-smp 2821 2971 762. 2829.2 4799.0 1243.0 1230.3 4469 1682.
marge 2.6.31.12-smp 2824 2931 760. 2833.3 4736.5 1239.5 1235.8 4462 1678.
marge 2.6.31.12-smp 2796 2936 1139 2843.3 4815.7 1242.8 1234.6 4471 1685.
marge 2.6.33-smp 2670 5151 739. 2816.6 4768.5 1243.7 1237.2 4389 1684.
marge 2.6.33-smp 2627 5126 1135 2806.9 4783.1 1245.1 1236.1 4413 1684.
marge 2.6.33-smp 2582 5037 1137 2799.6 4755.4 1242.0 1239.1 4471 1683.
marge 2.6.33-smpx 2848 5184 2972 2820.5 4804.8 1242.6 1236.9 4315 1686.
marge 2.6.33-smpx 2804 5183 2934 2822.8 4759.3 1245.0 1234.7 4462 1688.
marge 2.6.33-smpx 2729 5177 2920 2837.6 4820.0 1246.9 1238.5 4467 1684.
marge 2.6.33-smpx 2843 2896 1928 2786.5 4751.2 1242.2 1238.6 4493 1682.
marge 2.6.33-smpx 2869 2886 1936 2841.4 4748.9 1244.3 1237.7 4456 1683.
marge 2.6.33-smpx 2845 2895 1947 2836.0 4813.6 1242.7 1236.3 4473 1674.
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 78efe7c..ebbfcba 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -278,6 +278,10 @@ static inline int select_nohz_load_balancer(int cpu)
}
#endif
+#ifdef CONFIG_NO_HZ
+extern int nohz_ratelimit(int cpu);
+#endif
+
/*
* Only dump TASK_* tasks. (0 for all tasks)
*/
@@ -1160,14 +1164,8 @@ struct sched_entity {
u64 vruntime;
u64 prev_sum_exec_runtime;
- u64 last_wakeup;
- u64 avg_overlap;
-
u64 nr_migrations;
- u64 start_runtime;
- u64 avg_wakeup;
-
#ifdef CONFIG_SCHEDSTATS
u64 wait_start;
u64 wait_max;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 34f5cc2..ba3fc64 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
tp->ucopy.memory = 0;
} else if (skb_queue_len(&tp->ucopy.prequeue) == 1) {
- wake_up_interruptible_poll(sk->sk_sleep,
+ wake_up_interruptible_sync_poll(sk->sk_sleep,
POLLIN | POLLRDNORM | POLLRDBAND);
if (!inet_csk_ack_scheduled(sk))
inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
diff --git a/kernel/sched.c b/kernel/sched.c
index 3a8fb30..5fac30a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -535,8 +535,11 @@ struct rq {
#define CPU_LOAD_IDX_MAX 5
unsigned long cpu_load[CPU_LOAD_IDX_MAX];
#ifdef CONFIG_NO_HZ
+ u64 nohz_stamp;
unsigned char in_nohz_recently;
#endif
+ unsigned int skip_clock_update;
+
/* capture load from *all* tasks on this cpu: */
struct load_weight load;
unsigned long nr_load_updates;
@@ -634,6 +637,13 @@ static inline
void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
{
rq->curr->sched_class->check_preempt_curr(rq, p, flags);
+
+ /*
+ * A queue event has occurred, and we're going to schedule. In
+ * this case, we can save a useless back to back clock update.
+ */
+ if (test_tsk_need_resched(p))
+ rq->skip_clock_update = 1;
}
static inline int cpu_of(struct rq *rq)
@@ -663,7 +673,8 @@ static inline int cpu_of(struct rq *rq)
inline void update_rq_clock(struct rq *rq)
{
- rq->clock = sched_clock_cpu(cpu_of(rq));
+ if (!rq->skip_clock_update)
+ rq->clock = sched_clock_cpu(cpu_of(rq));
}
/*
@@ -1247,6 +1258,17 @@ void wake_up_idle_cpu(int cpu)
if (!tsk_is_polling(rq->idle))
smp_send_reschedule(cpu);
}
+
+int nohz_ratelimit(int cpu)
+{
+ struct rq *rq = cpu_rq(cpu);
+ u64 diff = rq->clock - rq->nohz_stamp;
+
+ rq->nohz_stamp = rq->clock;
+
+ return diff < (NSEC_PER_SEC / HZ) >> 1;
+}
+
#endif /* CONFIG_NO_HZ */
static u64 sched_avg_period(void)
@@ -1885,9 +1907,7 @@ static void update_avg(u64 *avg, u64 sample)
static void enqueue_task(struct rq *rq, struct task_struct *p, int wakeup)
{
- if (wakeup)
- p->se.start_runtime = p->se.sum_exec_runtime;
-
+ update_rq_clock(rq);
sched_info_queued(p);
p->sched_class->enqueue_task(rq, p, wakeup);
p->se.on_rq = 1;
@@ -1895,17 +1915,7 @@ static void enqueue_task(struct rq *rq, struct task_struct *p, int wakeup)
static void dequeue_task(struct rq *rq, struct task_struct *p, int sleep)
{
- if (sleep) {
- if (p->se.last_wakeup) {
- update_avg(&p->se.avg_overlap,
- p->se.sum_exec_runtime - p->se.last_wakeup);
- p->se.last_wakeup = 0;
- } else {
- update_avg(&p->se.avg_wakeup,
- sysctl_sched_wakeup_granularity);
- }
- }
-
+ update_rq_clock(rq);
sched_info_dequeued(p);
p->sched_class->dequeue_task(rq, p, sleep);
p->se.on_rq = 0;
@@ -2378,7 +2388,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
smp_wmb();
rq = orig_rq = task_rq_lock(p, &flags);
- update_rq_clock(rq);
if (!(p->state & state))
goto out;
@@ -2412,7 +2421,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
set_task_cpu(p, cpu);
rq = __task_rq_lock(p);
- update_rq_clock(rq);
WARN_ON(p->state != TASK_WAKING);
cpu = task_cpu(p);
@@ -2446,22 +2454,6 @@ out_activate:
activate_task(rq, p, 1);
success = 1;
- /*
- * Only attribute actual wakeups done by this task.
- */
- if (!in_interrupt()) {
- struct sched_entity *se = ¤t->se;
- u64 sample = se->sum_exec_runtime;
-
- if (se->last_wakeup)
- sample -= se->last_wakeup;
- else
- sample -= se->start_runtime;
- update_avg(&se->avg_wakeup, sample);
-
- se->last_wakeup = se->sum_exec_runtime;
- }
-
out_running:
trace_sched_wakeup(rq, p, success);
check_preempt_curr(rq, p, wake_flags);
@@ -2523,10 +2515,6 @@ static void __sched_fork(struct task_struct *p)
p->se.sum_exec_runtime = 0;
p->se.prev_sum_exec_runtime = 0;
p->se.nr_migrations = 0;
- p->se.last_wakeup = 0;
- p->se.avg_overlap = 0;
- p->se.start_runtime = 0;
- p->se.avg_wakeup = sysctl_sched_wakeup_granularity;
#ifdef CONFIG_SCHEDSTATS
p->se.wait_start = 0;
@@ -2666,7 +2654,6 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
rq = task_rq_lock(p, &flags);
BUG_ON(p->state != TASK_WAKING);
p->state = TASK_RUNNING;
- update_rq_clock(rq);
activate_task(rq, p, 0);
trace_sched_wakeup_new(rq, p, 1);
check_preempt_curr(rq, p, WF_FORK);
@@ -3121,8 +3108,6 @@ static void double_rq_lock(struct rq *rq1, struct rq *rq2)
raw_spin_lock_nested(&rq1->lock, SINGLE_DEPTH_NESTING);
}
}
- update_rq_clock(rq1);
- update_rq_clock(rq2);
}
/*
@@ -5423,23 +5408,9 @@ static inline void schedule_debug(struct task_struct *prev)
static void put_prev_task(struct rq *rq, struct task_struct *prev)
{
- if (prev->state == TASK_RUNNING) {
- u64 runtime = prev->se.sum_exec_runtime;
-
- runtime -= prev->se.prev_sum_exec_runtime;
- runtime = min_t(u64, runtime, 2*sysctl_sched_migration_cost);
-
- /*
- * In order to avoid avg_overlap growing stale when we are
- * indeed overlapping and hence not getting put to sleep, grow
- * the avg_overlap on preemption.
- *
- * We use the average preemption runtime because that
- * correlates to the amount of cache footprint a task can
- * build up.
- */
- update_avg(&prev->se.avg_overlap, runtime);
- }
+ if (prev->se.on_rq)
+ update_rq_clock(rq);
+ rq->skip_clock_update = 0;
prev->sched_class->put_prev_task(rq, prev);
}
@@ -5502,7 +5473,6 @@ need_resched_nonpreemptible:
hrtick_clear(rq);
raw_spin_lock_irq(&rq->lock);
- update_rq_clock(rq);
clear_tsk_need_resched(prev);
if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
@@ -6059,7 +6029,6 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
BUG_ON(prio < 0 || prio > MAX_PRIO);
rq = task_rq_lock(p, &flags);
- update_rq_clock(rq);
oldprio = p->prio;
on_rq = p->se.on_rq;
@@ -6101,7 +6070,6 @@ void set_user_nice(struct task_struct *p, long nice)
* the task might be in the middle of scheduling on another CPU.
*/
rq = task_rq_lock(p, &flags);
- update_rq_clock(rq);
/*
* The RT priorities are set via sched_setscheduler(), but we still
* allow the 'normal' nice value to be set - but as expected
@@ -6384,7 +6352,6 @@ recheck:
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
goto recheck;
}
- update_rq_clock(rq);
on_rq = p->se.on_rq;
running = task_current(rq, p);
if (on_rq)
@@ -7409,7 +7376,6 @@ void sched_idle_next(void)
__setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1);
- update_rq_clock(rq);
activate_task(rq, p, 0);
raw_spin_unlock_irqrestore(&rq->lock, flags);
@@ -7464,7 +7430,6 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
for ( ; ; ) {
if (!rq->nr_running)
break;
- update_rq_clock(rq);
next = pick_next_task(rq);
if (!next)
break;
@@ -7748,7 +7713,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
rq->migration_thread = NULL;
/* Idle task back to normal (off runqueue, low prio) */
raw_spin_lock_irq(&rq->lock);
- update_rq_clock(rq);
deactivate_task(rq, rq->idle, 0);
__setscheduler(rq, rq->idle, SCHED_NORMAL, 0);
rq->idle->sched_class = &idle_sched_class;
@@ -9746,7 +9710,6 @@ static void normalize_task(struct rq *rq, struct task_struct *p)
{
int on_rq;
- update_rq_clock(rq);
on_rq = p->se.on_rq;
if (on_rq)
deactivate_task(rq, p, 0);
@@ -10108,8 +10071,6 @@ void sched_move_task(struct task_struct *tsk)
rq = task_rq_lock(tsk, &flags);
- update_rq_clock(rq);
-
running = task_current(rq, tsk);
on_rq = tsk->se.on_rq;
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 67f95aa..e91311d 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -407,8 +407,6 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
PN(se.exec_start);
PN(se.vruntime);
PN(se.sum_exec_runtime);
- PN(se.avg_overlap);
- PN(se.avg_wakeup);
nr_switches = p->nvcsw + p->nivcsw;
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8fe7ee8..22edbd6 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1239,7 +1239,6 @@ static inline unsigned long effective_load(struct task_group *tg, int cpu,
static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
{
- struct task_struct *curr = current;
unsigned long this_load, load;
int idx, this_cpu, prev_cpu;
unsigned long tl_per_task;
@@ -1254,18 +1253,6 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
load = source_load(prev_cpu, idx);
this_load = target_load(this_cpu, idx);
- if (sync) {
- if (sched_feat(SYNC_LESS) &&
- (curr->se.avg_overlap > sysctl_sched_migration_cost ||
- p->se.avg_overlap > sysctl_sched_migration_cost))
- sync = 0;
- } else {
- if (sched_feat(SYNC_MORE) &&
- (curr->se.avg_overlap < sysctl_sched_migration_cost &&
- p->se.avg_overlap < sysctl_sched_migration_cost))
- sync = 1;
- }
-
/*
* If sync wakeup then subtract the (maximum possible)
* effect of the currently running task from the load
@@ -1530,6 +1517,7 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
sd = tmp;
}
+#ifdef CONFIG_FAIR_GROUP_SCHED
if (sched_feat(LB_SHARES_UPDATE)) {
/*
* Pick the largest domain to update shares over
@@ -1543,9 +1531,16 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
if (tmp)
update_shares(tmp);
}
+#endif
- if (affine_sd && wake_affine(affine_sd, p, sync))
- return cpu;
+ if (affine_sd) {
+ if (cpu == prev_cpu)
+ return cpu;
+ if (wake_affine(affine_sd, p, sync))
+ return cpu;
+ if (!(affine_sd->flags & SD_BALANCE_WAKE))
+ return prev_cpu;
+ }
while (sd) {
int load_idx = sd->forkexec_idx;
@@ -1590,42 +1585,11 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
}
#endif /* CONFIG_SMP */
-/*
- * Adaptive granularity
- *
- * se->avg_wakeup gives the average time a task runs until it does a wakeup,
- * with the limit of wakeup_gran -- when it never does a wakeup.
- *
- * So the smaller avg_wakeup is the faster we want this task to preempt,
- * but we don't want to treat the preemptee unfairly and therefore allow it
- * to run for at least the amount of time we'd like to run.
- *
- * NOTE: we use 2*avg_wakeup to increase the probability of actually doing one
- *
- * NOTE: we use *nr_running to scale with load, this nicely matches the
- * degrading latency on load.
- */
-static unsigned long
-adaptive_gran(struct sched_entity *curr, struct sched_entity *se)
-{
- u64 this_run = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
- u64 expected_wakeup = 2*se->avg_wakeup * cfs_rq_of(se)->nr_running;
- u64 gran = 0;
-
- if (this_run < expected_wakeup)
- gran = expected_wakeup - this_run;
-
- return min_t(s64, gran, sysctl_sched_wakeup_granularity);
-}
-
static unsigned long
wakeup_gran(struct sched_entity *curr, struct sched_entity *se)
{
unsigned long gran = sysctl_sched_wakeup_granularity;
- if (cfs_rq_of(curr)->curr && sched_feat(ADAPTIVE_GRAN))
- gran = adaptive_gran(curr, se);
-
/*
* Since its curr running now, convert the gran from real-time
* to virtual-time in his units.
@@ -1740,11 +1704,6 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
if (sched_feat(WAKEUP_SYNC) && sync)
goto preempt;
- if (sched_feat(WAKEUP_OVERLAP) &&
- se->avg_overlap < sysctl_sched_migration_cost &&
- pse->avg_overlap < sysctl_sched_migration_cost)
- goto preempt;
-
if (!sched_feat(WAKEUP_PREEMPT))
return;
diff --git a/kernel/sched_features.h b/kernel/sched_features.h
index d5059fd..c545e04 100644
--- a/kernel/sched_features.h
+++ b/kernel/sched_features.h
@@ -31,12 +31,6 @@ SCHED_FEAT(START_DEBIT, 1)
SCHED_FEAT(WAKEUP_PREEMPT, 1)
/*
- * Compute wakeup_gran based on task behaviour, clipped to
- * [0, sched_wakeup_gran_ns]
- */
-SCHED_FEAT(ADAPTIVE_GRAN, 1)
-
-/*
* When converting the wakeup granularity to virtual time, do it such
* that heavier tasks preempting a lighter task have an edge.
*/
@@ -48,12 +42,6 @@ SCHED_FEAT(ASYM_GRAN, 1)
SCHED_FEAT(WAKEUP_SYNC, 0)
/*
- * Wakeup preempt based on task behaviour. Tasks that do not overlap
- * don't get preempted.
- */
-SCHED_FEAT(WAKEUP_OVERLAP, 0)
-
-/*
* Use the SYNC wakeup hint, pipes and the likes use this to indicate
* the remote end is likely to consume the data we just wrote, and
* therefore has cache benefit from being placed on the same cpu, see
@@ -70,16 +58,6 @@ SCHED_FEAT(SYNC_WAKEUPS, 1)
SCHED_FEAT(AFFINE_WAKEUPS, 1)
/*
- * Weaken SYNC hint based on overlap
- */
-SCHED_FEAT(SYNC_LESS, 1)
-
-/*
- * Add SYNC hint based on overlap
- */
-SCHED_FEAT(SYNC_MORE, 0)
-
-/*
* Prefer to schedule the task we woke last (assuming it failed
* wakeup-preemption), since its likely going to consume data we
* touched, increases cache locality.
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index f992762..f25735a 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -262,6 +262,9 @@ void tick_nohz_stop_sched_tick(int inidle)
goto end;
}
+ if (nohz_ratelimit(cpu))
+ goto end;
+
ts->idle_calls++;
/* Read jiffies and the time when jiffies were updated last */
do {
^ permalink raw reply related
* Re: [PATCH] bridge: per-cpu packet statistics
From: Eric Dumazet @ 2010-03-02 9:02 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev, bridge
In-Reply-To: <20100301161658.5a61143b@nehalam>
From: Stephen Hemminger <shemminger@vyatta.com>
Le lundi 01 mars 2010 à 16:16 -0800, Stephen Hemminger a écrit :
> + for_each_online_cpu(cpu) {
> + const struct br_cpu_netstats *bstats
> + = per_cpu_ptr(br->stats, cpu);
> +
> + stats->rx_bytes += bstats->rx_bytes;
> + stats->rx_packets += bstats->rx_packets;
> + }
And last point, we should use for_each_possible_cpu() here
Here is your patch with all my comments integrated :
1) Use txq->{tx_bytes|tx_packets} counter
2) alloc_percpu(struct ...) instead of alloc_percpu(sizeof(struct ...))
3) free_netdev() in destructor
4) for_each_possible_cpu() instead of for_each_online_cpu()
5) br_get_stats() use local variables for the sake of concurrent users
Next step would be to use multiqueue :)
Thanks
[PATCH] bridge: per-cpu packet statistics
The shared packet statistics are a potential source of slow down
on bridged traffic. Convert to per-cpu array for rx_packets/rx_bytes RX
accounting, and use txq tx_packets/tx_bytes for TX accounting
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/bridge/br_device.c | 39 +++++++++++++++++++++++++++++++++++---
net/bridge/br_if.c | 6 +++++
net/bridge/br_input.c | 6 +++--
net/bridge/br_private.h | 6 +++++
4 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index eb7062d..e73c42c 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -22,6 +22,8 @@
/* net device transmit always called with no BH (preempt_disabled) */
netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
+ int qidx = skb_get_queue_mapping(skb);
+ struct netdev_queue *txq = netdev_get_tx_queue(dev, qidx);
struct net_bridge *br = netdev_priv(dev);
const unsigned char *dest = skb->data;
struct net_bridge_fdb_entry *dst;
@@ -29,8 +31,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
BR_INPUT_SKB_CB(skb)->brdev = dev;
- dev->stats.tx_packets++;
- dev->stats.tx_bytes += skb->len;
+ txq->tx_packets++;
+ txq->tx_bytes += skb->len;
skb_reset_mac_header(skb);
skb_pull(skb, ETH_HLEN);
@@ -81,6 +83,28 @@ static int br_dev_stop(struct net_device *dev)
return 0;
}
+static struct net_device_stats *br_get_stats(struct net_device *dev)
+{
+ struct net_bridge *br = netdev_priv(dev);
+ struct net_device_stats *stats = &dev->stats;
+ unsigned long rx_bytes = 0, rx_packets = 0;
+ unsigned int cpu;
+
+ dev_txq_stats_fold(dev, stats);
+
+ for_each_possible_cpu(cpu) {
+ const struct br_cpu_netstats *bstats
+ = per_cpu_ptr(br->stats, cpu);
+
+ rx_bytes += bstats->rx_bytes;
+ rx_packets += bstats->rx_packets;
+ }
+ stats->rx_bytes = rx_bytes;
+ stats->rx_packets = rx_packets;
+
+ return stats;
+}
+
static int br_change_mtu(struct net_device *dev, int new_mtu)
{
struct net_bridge *br = netdev_priv(dev);
@@ -180,19 +204,28 @@ static const struct net_device_ops br_netdev_ops = {
.ndo_open = br_dev_open,
.ndo_stop = br_dev_stop,
.ndo_start_xmit = br_dev_xmit,
+ .ndo_get_stats = br_get_stats,
.ndo_set_mac_address = br_set_mac_address,
.ndo_set_multicast_list = br_dev_set_multicast_list,
.ndo_change_mtu = br_change_mtu,
.ndo_do_ioctl = br_dev_ioctl,
};
+static void br_dev_free(struct net_device *dev)
+{
+ struct net_bridge *br = netdev_priv(dev);
+
+ free_percpu(br->stats);
+ free_netdev(dev);
+}
+
void br_dev_setup(struct net_device *dev)
{
random_ether_addr(dev->dev_addr);
ether_setup(dev);
dev->netdev_ops = &br_netdev_ops;
- dev->destructor = free_netdev;
+ dev->destructor = br_dev_free;
SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
dev->tx_queue_len = 0;
dev->priv_flags = IFF_EBRIDGE;
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index b6a3872..b7cdd2e 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -185,6 +185,12 @@ static struct net_device *new_bridge_dev(struct net *net, const char *name)
br = netdev_priv(dev);
br->dev = dev;
+ br->stats = alloc_percpu(struct br_cpu_netstats);
+ if (!br->stats) {
+ free_netdev(dev);
+ return NULL;
+ }
+
spin_lock_init(&br->lock);
INIT_LIST_HEAD(&br->port_list);
spin_lock_init(&br->hash_lock);
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 53b3985..7a5a5b4 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -23,9 +23,11 @@ const u8 br_group_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
static int br_pass_frame_up(struct sk_buff *skb)
{
struct net_device *indev, *brdev = BR_INPUT_SKB_CB(skb)->brdev;
+ struct net_bridge *br = netdev_priv(brdev);
+ struct br_cpu_netstats *brstats = this_cpu_ptr(br->stats);
- brdev->stats.rx_packets++;
- brdev->stats.rx_bytes += skb->len;
+ brstats->rx_packets++;
+ brstats->rx_bytes += skb->len;
indev = skb->dev;
skb->dev = brdev;
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 9191198..06b30af 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -135,6 +135,12 @@ struct net_bridge
spinlock_t lock;
struct list_head port_list;
struct net_device *dev;
+
+ struct br_cpu_netstats __percpu {
+ unsigned long rx_bytes;
+ unsigned long rx_packets;
+ } *stats;
+
spinlock_t hash_lock;
struct hlist_head hash[BR_HASH_SIZE];
unsigned long feature_mask;
^ permalink raw reply related
* from mr pedrosinger
From: pedrosinger @ 2010-03-02 8:26 UTC (permalink / raw)
from mr pedrosinger
Greeting from Burkina Faso
This brief introductory letter may come to you as a big surprise, but I believe it is only a day that people meet and become great friends and business partners. I am Mr. pedrosinger, currently Head of Corporate affairs with a reputable bank here in Burkina Faso , West Africa . And would like to enter into a confidential business deal with you upon your acceptance to co-operate with me I will let you know the details.
Thanking you in advance and waiting for your urgent reply.
please call me if you are interested
Tel: +226-7698-4378
Regards,
Mr. pedrosinger
^ permalink raw reply
* Re: BNX2: Kernel crashes with 2.6.31 and 2.6.31.9
From: Bruno Prémont @ 2010-03-02 8:20 UTC (permalink / raw)
To: Benjamin Li; +Cc: NetDEV, Michael Chan, Linux-Kernel
In-Reply-To: <20100302081051.3d1b1c53@pluto.restena.lu>
Hi Benjamin,
> The running kernel is 2.6.33-rc8 (though I did not forward-port your
> patch in this thread, that is bnx2_dump_ftq() is missing - half of it
> having been applied to 2.6.33). Looking at the trace I got I will add
> that part and try again.
Here it is with bnx2_dump_ftq added:
[ 3405.422963] ------------[ cut here ]------------
[ 3405.428958] WARNING: at /usr/src/linux-2.6.33-rc8-git7/kernel/softirq.c:143 local_bh_enable_ip+0x72/0xa0()
[ 3405.431858] Hardware name: ProLiant DL360 G5
[ 3405.431858] Modules linked in: netbomb bnx2 ipmi_devintf loop dm_mod sg sr_mod cdrom ata_piix ahci ipmi_si ipmi_msghandler uhci_hcd qla2xxx libata hpwdt ehci_hcd [last unloaded: bnx2]
[ 3405.431858] Pid: 25763, comm: cat Not tainted 2.6.33-rc8-git7-x86_64 #1
[ 3405.431858] Call Trace:
[ 3405.431858] [<ffffffff8103f002>] ? local_bh_enable_ip+0x72/0xa0
[ 3405.431858] [<ffffffff81039368>] warn_slowpath_common+0x78/0xd0
[ 3405.431858] [<ffffffff810393cf>] warn_slowpath_null+0xf/0x20
[ 3405.431858] [<ffffffff8103f002>] local_bh_enable_ip+0x72/0xa0
[ 3405.431858] [<ffffffff814002af>] _raw_spin_unlock_bh+0xf/0x20
[ 3405.431858] [<ffffffffa0108ed4>] bnx2_reg_rd_ind+0x44/0x60 [bnx2]
[ 3405.431858] [<ffffffffa0108eff>] bnx2_shmem_rd+0xf/0x20 [bnx2]
[ 3405.431858] [<ffffffffa0113464>] bnx2_poll+0x194/0x228 [bnx2]
[ 3405.431858] [<ffffffff8135c081>] netpoll_poll+0xe1/0x3c0
[ 3405.431858] [<ffffffff8135c518>] netpoll_send_skb+0x118/0x210
[ 3405.431858] [<ffffffff8135c80b>] netpoll_send_udp+0x1fb/0x210
[ 3405.431858] [<ffffffffa00131c5>] write_msg+0x95/0xd0 [netbomb]
[ 3405.431858] [<ffffffffa0013255>] netbomb_write+0x55/0xa4 [netbomb]
[ 3405.431858] [<ffffffff810f6571>] proc_reg_write+0x71/0xb0
[ 3405.431858] [<ffffffff810ab6db>] vfs_write+0xcb/0x180
[ 3405.431858] [<ffffffff810ab880>] sys_write+0x50/0x90
[ 3405.431858] [<ffffffff8102a1a4>] sysenter_dispatch+0x7/0x2b
[ 3405.431858] ---[ end trace b4ac1510884bf2bc ]---
[ 3411.050005] ------------[ cut here ]------------
[ 3411.054851] WARNING: at /usr/src/linux-2.6.33-rc8-git7/net/sched/sch_generic.c:255 dev_watchdog+0x25e/0x270()
[ 3411.059546] Hardware name: ProLiant DL360 G5
[ 3411.061569] NETDEV WATCHDOG: eth0 (bnx2): transmit queue 0 timed out
[ 3411.064582] Modules linked in: netbomb bnx2 ipmi_devintf loop dm_mod sg sr_mod cdrom ata_piix ahci ipmi_si ipmi_msghandler uhci_hcd qla2xxx libata hpwdt ehci_hcd [last unloaded: bnx2]
[ 3411.064597] Pid: 0, comm: swapper Tainted: G W 2.6.33-rc8-git7-x86_64 #1
[ 3411.064599] Call Trace:
[ 3411.064601] <IRQ> [<ffffffff8135f84e>] ? dev_watchdog+0x25e/0x270
[ 3411.064609] [<ffffffff81039368>] warn_slowpath_common+0x78/0xd0
[ 3411.064612] [<ffffffff81039444>] warn_slowpath_fmt+0x64/0x70
[ 3411.064616] [<ffffffff8103486d>] ? default_wake_function+0xd/0x10
[ 3411.064620] [<ffffffff8119f339>] ? strlcpy+0x49/0x60
[ 3411.064623] [<ffffffff81349b33>] ? netdev_drivername+0x43/0x50
[ 3411.064626] [<ffffffff8135f84e>] dev_watchdog+0x25e/0x270
[ 3411.064630] [<ffffffff8104c000>] ? delayed_work_timer_fn+0x0/0x40
[ 3411.064633] [<ffffffff8104bf87>] ? __queue_work+0x77/0x90
[ 3411.064636] [<ffffffff8103558b>] ? scheduler_tick+0x1bb/0x290
[ 3411.064639] [<ffffffff8135f5f0>] ? dev_watchdog+0x0/0x270
[ 3411.064642] [<ffffffff810440fc>] run_timer_softirq+0x13c/0x210
[ 3411.064645] [<ffffffff8105b4b7>] ? clockevents_program_event+0x57/0xa0
[ 3411.064649] [<ffffffff8103edb6>] __do_softirq+0xa6/0x130
[ 3411.064652] [<ffffffff81003bcc>] call_softirq+0x1c/0x30
[ 3411.064655] [<ffffffff81005be5>] do_softirq+0x55/0x90
[ 3411.064658] [<ffffffff8103eb35>] irq_exit+0x75/0x90
[ 3411.064661] [<ffffffff8101aeed>] smp_apic_timer_interrupt+0x6d/0xa0
[ 3411.064664] [<ffffffff81003693>] apic_timer_interrupt+0x13/0x20
[ 3411.064666] <EOI> [<ffffffff8100b186>] ? mwait_idle+0x66/0x80
[ 3411.064670] [<ffffffff81001f90>] ? enter_idle+0x20/0x30
[ 3411.064673] [<ffffffff81002003>] cpu_idle+0x63/0xb0
[ 3411.064676] [<ffffffff813f2f14>] rest_init+0x74/0x80
[ 3411.064680] [<ffffffff81880c15>] start_kernel+0x2f8/0x336
[ 3411.064683] [<ffffffff8188026d>] x86_64_start_reservations+0x7d/0x84
[ 3411.064686] [<ffffffff81880354>] x86_64_start_kernel+0xe0/0xf2
[ 3411.064688] ---[ end trace b4ac1510884bf2bd ]---
[ 3411.064689] bnx2: <--- start FTQ dump on eth0 --->
[ 3411.064691] bnx2: eth0: BNX2_RV2P_PFTQ_CTL 10000
[ 3411.064693] bnx2: eth0: BNX2_RV2P_TFTQ_CTL 20000
[ 3411.064695] bnx2: eth0: BNX2_RV2P_MFTQ_CTL 20000
[ 3411.064697] bnx2: eth0: BNX2_TBDR_FTQ_CTL 4002
[ 3411.064699] bnx2: eth0: BNX2_TDMA_FTQ_CTL 10002
[ 3411.064702] bnx2: eth0: BNX2_TXP_FTQ_CTL 10002
[ 3411.064704] bnx2: eth0: BNX2_TPAT_FTQ_CTL 10002
[ 3411.064706] bnx2: eth0: BNX2_RXP_CFTQ_CTL 8000
[ 3411.064708] bnx2: eth0: BNX2_RXP_FTQ_CTL 100000
[ 3411.064710] bnx2: eth0: BNX2_COM_COMXQ_FTQ_CTL 10000
[ 3411.064712] bnx2: eth0: BNX2_COM_COMTQ_FTQ_CTL 20000
[ 3411.064715] bnx2: eth0: BNX2_COM_COMQ_FTQ_CTL 10000
[ 3411.064717] bnx2: eth0: BNX2_CP_CPQ_FTQ_CTL 8000
[ 3411.064724] bnx2: eth0: TXP mode b84c state 80001000 evt_mask 500 pc 8000bcc pc 8000bec instr 30620001
[ 3411.064732] bnx2: eth0: TPAT mode b84c state 80005000 evt_mask 500 pc 8000694 pc 80006a4 instr 8e310458
[ 3411.064740] bnx2: eth0: RXP mode b84c state 80001000 evt_mask 500 pc 80044a8 pc 80044a8 instr ac2400f8
[ 3411.064748] bnx2: eth0: COM mode b84c state 80001000 evt_mask 500 pc 8000a60 pc 8000a74 instr 3c030800
[ 3411.064756] bnx2: eth0: CP mode b84c state 80008000 evt_mask 500 pc 8000434 pc 8000700 instr 39ee0001
[ 3411.064758] bnx2: <--- end FTQ dump on eth0 --->
[ 3411.064759] bnx2: eth0 DEBUG: intr_sem[0]
[ 3411.064762] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[ 3411.064766] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[ 3411.064768] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[ 3416.050005] bnx2: <--- start FTQ dump on eth0 --->
[ 3416.054456] bnx2: eth0: BNX2_RV2P_PFTQ_CTL 10000
[ 3416.057683] bnx2: eth0: BNX2_RV2P_TFTQ_CTL 20000
[ 3416.059944] bnx2: eth0: BNX2_RV2P_MFTQ_CTL 20000
[ 3416.069481] bnx2: eth0: BNX2_TBDR_FTQ_CTL 4002
[ 3416.078819] bnx2: eth0: BNX2_TDMA_FTQ_CTL 10002
[ 3416.083896] bnx2: eth0: BNX2_TXP_FTQ_CTL 10002
[ 3416.085968] bnx2: eth0: BNX2_TPAT_FTQ_CTL 10002
[ 3416.088084] bnx2: eth0: BNX2_RXP_CFTQ_CTL 8000
[ 3416.090129] bnx2: eth0: BNX2_RXP_FTQ_CTL 100000
[ 3416.092285] bnx2: eth0: BNX2_COM_COMXQ_FTQ_CTL 10000
[ 3416.096710] bnx2: eth0: BNX2_COM_COMTQ_FTQ_CTL 20000
[ 3416.099065] bnx2: eth0: BNX2_COM_COMQ_FTQ_CTL 10000
[ 3416.101506] bnx2: eth0: BNX2_CP_CPQ_FTQ_CTL 8000
[ 3416.105567] bnx2: eth0: TXP mode b84c state 80001000 evt_mask 500 pc 8000bf0 pc 8000bc0 instr b8302b
[ 3416.109963] bnx2: eth0: TPAT mode b84c state 80001000 evt_mask 500 pc 8000674 pc 8000694 instr af8d0034
[ 3416.120862] bnx2: eth0: RXP mode b84c state 80001000 evt_mask 500 pc 80044c4 pc 800447c instr 3c050800
[ 3416.125237] bnx2: eth0: COM mode b84c state 80001000 evt_mask 500 pc 8000a1c pc 8000a28 instr 8c4200b8
[ 3416.130656] bnx2: eth0: CP mode b84c state 80000000 evt_mask 500 pc 8000728 pc 800040c instr 18d2821
[ 3416.139721] bnx2: <--- end FTQ dump on eth0 --->
[ 3416.142905] bnx2: eth0 DEBUG: intr_sem[0]
[ 3416.145814] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[ 3416.151452] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[ 3416.154701] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
...
Regards,
Bruno
^ permalink raw reply
* Re: [PATCH] bridge: per-cpu packet statistics
From: Eric Dumazet @ 2010-03-02 7:51 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev, bridge
In-Reply-To: <20100301161658.5a61143b@nehalam>
Le lundi 01 mars 2010 à 16:16 -0800, Stephen Hemminger a écrit :
> --- a/net/bridge/br_if.c 2010-03-01 08:22:23.476657998 -0800
> +++ b/net/bridge/br_if.c 2010-03-01 15:30:47.733227819 -0800
> @@ -185,6 +185,12 @@ static struct net_device *new_bridge_dev
> br = netdev_priv(dev);
> br->dev = dev;
>
> + br->stats = alloc_percpu(sizeof(struct br_cpu_netstats));
> + if (!br->stats) {
> + free_netdev(dev);
> + return NULL;
> + }
> +
Strange... this should be :
nr->stats = alloc_percpu(struct br_cpu_netstats);
Or even better, ask percpu allocator an aligned chunk
(2 or 4 longs) instead of (1 long)
nr->stats = __alloc_percpu(sizeof(struct br_cpu_netstats),
4 * sizeof(long));
^ permalink raw reply
* Re: [PATCH] bridge: per-cpu packet statistics
From: Eric Dumazet @ 2010-03-02 7:43 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev, bridge
In-Reply-To: <20100301161658.5a61143b@nehalam>
Le lundi 01 mars 2010 à 16:16 -0800, Stephen Hemminger a écrit :
> +static void br_dev_free(struct net_device *dev)
> +{
> + struct net_bridge *br = netdev_priv(dev);
> +
> + free_percpu(br->stats);
> +}
> +
> void br_dev_setup(struct net_device *dev)
> {
> random_ether_addr(dev->dev_addr);
> ether_setup(dev);
>
> dev->netdev_ops = &br_netdev_ops;
> - dev->destructor = free_netdev;
> + dev->destructor = br_dev_free;
> SET_ETHTOOL_OPS(dev, &br_ethtool_ops);
Isnt free_netdev() missing after this change ?
^ permalink raw reply
* Re: BNX2: Kernel crashes with 2.6.31 and 2.6.31.9
From: Bruno Prémont @ 2010-03-02 7:10 UTC (permalink / raw)
To: Benjamin Li; +Cc: NetDEV, Michael Chan, Linux-Kernel
In-Reply-To: <1267493170.2762.45.camel@dhcp-10-12-137-104.broadcom.com>
Hi Benjamin,
On Mon, 1 Mar 2010 17:26:10 "Benjamin Li" <benli@broadcom.com> wrote:
> Thanks for trying the patch. I still haven't been able to reproduce
> what you are seeing here. I am able to run scp and 'echo t
> > /proc/sysrq-trigger' multiple times. I was wondering if you had any
> success reproducing the problem with a stack trace?
Last week I couldn't trigger it again after booting with console=ttyS1,
but today I finally got the box to crash (same procedure but matter of
"luck" as to when it happens)
System continues printing the bnx2 debug messages but does not accept any
input (not even on serial console). Every few minutes it complains about
collectd being blocked for more than 120 seconds (collectd wants to send
UDP packets with system state)
The running kernel is 2.6.33-rc8 (though I did not forward-port your
patch in this thread, that is bnx2_dump_ftq() is missing - half of it
having been applied to 2.6.33). Looking at the trace I got I will add
that part and try again.
Regards,
Bruno
[575872.163771] ------------[ cut here ]------------
[575872.172467] WARNING: at /usr/src/linux-2.6.33-rc8-git7/kernel/softirq.c:143 local_bh_enable_ip+0x72/0xa0()
[575872.172890] Hardware name: ProLiant DL360 G5
[575872.172890] Modules linked in: qla2xxx netbomb ipmi_devintf loop dm_mod sg sr_mod cdrom ata_piix ahci uhci_hcd ipmi_si ipmi_msghandler hpwdt bnx2 ehci_hcd libata [last unloaded: qla2xxx]
[575872.172890] Pid: 32564, comm: cat Not tainted 2.6.33-rc8-git7-x86_64 #1
[575872.172890] Call Trace:
[575872.172890] [<ffffffff8103f002>] ? local_bh_enable_ip+0x72/0xa0
[575872.172890] [<ffffffff81039368>] warn_slowpath_common+0x78/0xd0
[575872.172890] [<ffffffff810393cf>] warn_slowpath_null+0xf/0x20
[575872.172890] [<ffffffff8103f002>] local_bh_enable_ip+0x72/0xa0
[575872.172890] [<ffffffff814002af>] _raw_spin_unlock_bh+0xf/0x20
[575872.172890] [<ffffffffa0026ed4>] bnx2_reg_rd_ind+0x44/0x60 [bnx2]
[575872.172890] [<ffffffffa0026eff>] bnx2_shmem_rd+0xf/0x20 [bnx2]
[575872.172890] [<ffffffffa0030ff4>] bnx2_poll+0x194/0x228 [bnx2]
[575872.172890] [<ffffffff8135c081>] netpoll_poll+0xe1/0x3c0
[575872.172890] [<ffffffff8135c518>] netpoll_send_skb+0x118/0x210
[575872.172890] [<ffffffff8135c80b>] netpoll_send_udp+0x1fb/0x210
[575872.172890] [<ffffffffa00501c5>] write_msg+0x95/0xd0 [netbomb]
[575872.172890] [<ffffffffa0050255>] netbomb_write+0x55/0xa4 [netbomb]
[575872.172890] [<ffffffff810f6571>] proc_reg_write+0x71/0xb0
[575872.172890] [<ffffffff810ab6db>] vfs_write+0xcb/0x180
[575872.172890] [<ffffffff810ab880>] sys_write+0x50/0x90
[575872.172890] [<ffffffff8102a1a4>] sysenter_dispatch+0x7/0x2b
[575872.172890] ---[ end trace d4f601a1b34bd327 ]---
[575878.950008] ------------[ cut here ]------------
[575878.955297] WARNING: at /usr/src/linux-2.6.33-rc8-git7/net/sched/sch_generic.c:255 dev_watchdog+0x25e/0x270()
[575878.966541] Hardware name: ProLiant DL360 G5
[575878.972352] NETDEV WATCHDOG: eth0 (bnx2): transmit queue 0 timed out
[575878.976435] Modules linked in: qla2xxx netbomb ipmi_devintf loop dm_mod sg sr_mod cdrom ata_piix ahci uhci_hcd ipmi_si ipmi_msghandler hpwdt bnx2 ehci_hcd libata [last unloaded: qla2xxx]
[575878.985325] Pid: 0, comm: swapper Tainted: G W 2.6.33-rc8-git7-x86_64 #1
[575878.988929] Call Trace:
[575878.990124] <IRQ> [<ffffffff8135f84e>] ? dev_watchdog+0x25e/0x270
[575878.994317] [<ffffffff81039368>] warn_slowpath_common+0x78/0xd0
[575878.998118] [<ffffffff81039444>] warn_slowpath_fmt+0x64/0x70
[575879.010352] [<ffffffff81362206>] ? nlmsg_notify+0x46/0xc0
[575879.012956] [<ffffffff8119f339>] ? strlcpy+0x49/0x60
[575879.015487] [<ffffffff81349b33>] ? netdev_drivername+0x43/0x50
[575879.027713] [<ffffffff8135f84e>] dev_watchdog+0x25e/0x270
[575879.030339] [<ffffffff810354fc>] ? scheduler_tick+0x12c/0x290
[575879.034202] [<ffffffff8135f5f0>] ? dev_watchdog+0x0/0x270
[575879.047296] [<ffffffff810440fc>] run_timer_softirq+0x13c/0x210
[575879.051101] [<ffffffff8105b4b7>] ? clockevents_program_event+0x57/0xa0
[575879.054422] [<ffffffff8103edb6>] __do_softirq+0xa6/0x130
[575879.065396] [<ffffffff81003bcc>] call_softirq+0x1c/0x30
[575879.070825] [<ffffffff81005be5>] do_softirq+0x55/0x90
[575879.073266] [<ffffffff8103eb35>] irq_exit+0x75/0x90
[575879.075618] [<ffffffff8101aeed>] smp_apic_timer_interrupt+0x6d/0xa0
[575879.094357] [<ffffffff81003693>] apic_timer_interrupt+0x13/0x20
[575879.099195] <EOI> [<ffffffff8100b186>] ? mwait_idle+0x66/0x80
[575879.102225] [<ffffffff81001f90>] ? enter_idle+0x20/0x30
[575879.119572] [<ffffffff81002003>] cpu_idle+0x63/0xb0
[575879.121925] [<ffffffff818ab5de>] start_secondary+0x158/0x1aa
[575879.125708] ---[ end trace d4f601a1b34bd328 ]---
[575879.130792] bnx2: eth0 DEBUG: intr_sem[0]
[575879.132880] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575879.149587] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575879.152959] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575883.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575883.961580] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575883.974574] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575883.985269] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575888.951879] bnx2: eth0 DEBUG: intr_sem[0]
[575888.955092] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575888.967583] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575888.973761] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575893.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575893.953954] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575893.964160] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575893.968596] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575898.951879] bnx2: eth0 DEBUG: intr_sem[0]
[575898.957913] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575898.962225] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575898.972121] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575903.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575903.956728] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575903.961380] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575903.972171] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575908.951880] bnx2: eth0 DEBUG: intr_sem[0]
[575908.956790] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575908.961398] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575908.974628] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575913.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575913.958417] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575913.962159] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575913.965457] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575918.951879] bnx2: eth0 DEBUG: intr_sem[0]
[575918.958634] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575918.965095] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575918.974149] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575923.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575923.964361] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575923.970549] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575923.975969] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575928.951879] bnx2: eth0 DEBUG: intr_sem[0]
[575928.961375] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575928.965103] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575928.969552] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575933.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575933.963067] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575933.970543] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575933.993032] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575938.951879] bnx2: eth0 DEBUG: intr_sem[0]
[575938.958134] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575938.961695] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575938.968855] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575943.951883] bnx2: eth0 DEBUG: intr_sem[0]
[575943.959389] bnx2: eth0 DEBUG: EMAC_TX_STATUS[00000008] RPM_MGMT_PKT_CTRL[00000000]
[575943.964102] bnx2: eth0 DEBUG: MCP_STATE_P0[00000000] MCP_STATE_P1[00000000]
[575943.967612] bnx2: eth0 DEBUG: HC_STATS_INTERRUPT_STATUS[00000000]
[575948.951879] bnx2: eth0 DEBUG: intr_sem[0]
....
Blocked collectd task:
[576003.053144] INFO: task collectd:3019 blocked for more than 120 seconds.
[576003.066206] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[576003.072659] collectd D 0000000000000000 0 3019 1 0x00020000
[576003.072663] ffff8802aa3afa78 0000000000200086 0000000000000000 0000000000000008
[576003.072666] 0000000000012780 000000000000dda8 ffff8802aa3affd8 ffff8802aa256fa0
[576003.072670] ffff8802af86e9c0 ffff8802aa257208 00000005ab1a3000 00000001036e43c3
[576003.072673] Call Trace:
[576003.072682] [<ffffffff813ff33e>] __mutex_lock_slowpath+0x12e/0x180
[576003.072687] [<ffffffff813fecfe>] mutex_lock+0x1e/0x40
[576003.072690] [<ffffffff81357fd8>] rtnetlink_rcv+0x18/0x40
[576003.072694] [<ffffffff813621b5>] netlink_unicast+0x285/0x290
[576003.072698] [<ffffffff81344f83>] ? memcpy_fromiovec+0x63/0x80
[576003.072701] [<ffffffff81362c63>] netlink_sendmsg+0x1d3/0x2c0
[576003.072705] [<ffffffff810bdd9e>] ? __d_instantiate+0x5e/0xd0
[576003.072708] [<ffffffff8133981b>] sock_sendmsg+0xbb/0xf0
[576003.072712] [<ffffffff810c72aa>] ? seq_open+0x4a/0xa0
[576003.072714] [<ffffffff81338ed9>] ? copy_from_user+0x9/0x10
[576003.072717] [<ffffffff81338f0c>] ? move_addr_to_kernel+0x2c/0x40
[576003.072720] [<ffffffff8135e09c>] ? verify_compat_iovec+0x9c/0x110
[576003.072723] [<ffffffff8133b734>] sys_sendmsg+0x184/0x320
[576003.072728] [<ffffffff810f5d60>] ? proc_delete_inode+0x0/0x50
[576003.072731] [<ffffffff810700e0>] ? call_rcu_sched+0x10/0x20
[576003.072733] [<ffffffff810700f9>] ? call_rcu+0x9/0x10
[576003.072736] [<ffffffff810bca9a>] ? d_free+0x3a/0x60
[576003.072741] [<ffffffff810acae8>] ? __fput+0x178/0x1f0
[576003.072744] [<ffffffff81058014>] ? getnstimeofday+0x64/0xf0
[576003.072747] [<ffffffff8135d94c>] compat_sys_socketcall+0xcc/0x210
[576003.072751] [<ffffffff8102a1a4>] sysenter_dispatch+0x7/0x2b
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox