[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120103.130353.716810185692904362.davem@davemloft.net>
Date: Tue, 03 Jan 2012 13:03:53 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, dave.taht@...il.com
Subject: Re: [PATCH net-next v2] net_sched: qdisc_alloc_handle() can be too
slow
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 03 Jan 2012 11:00:11 +0100
> When trying to allocate ~32768 qdiscs using autohandle mechanism, we can
> fill the space managed by kernel (handles in [8000-FFFF]:0000 range)
>
> But O(N^2) qdisc_alloc_handle() loops 0x10000 times instead of 0x8000
>
> time tc add qdisc add dev eth0 parent 10:7fff pfifo limit 10
> RTNETLINK answers: Cannot allocate memory
> real 1m54.826s
> user 0m0.000s
> sys 0m0.004s
>
> INFO: rcu_sched_state detected stall on CPU 0 (t=60000 jiffies)
>
> Half number of loops, and add a cond_resched() call.
> We hold rtnl at this point.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> CC: Dave Taht <dave.taht@...il.com>
Applied, thanks Eric. I always cringed when I looked at this function :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists