From: Eric Dumazet <hidden> Date: 2012-07-10 10:18:36
On Tue, 2012-07-10 at 12:54 +0300, Or Gerlitz wrote:
Hi Dave, Eric,
Another trace that I see here with net-next is this one-time warning. I
get it always
on the passive side of TCP, something that seems related to GRO, it
happens only with
IPoIB, not with mlx4_en and igb (when igb get to work on net-next...)
The latest commit in this area is bad43ca8325f493dcaa0896c2f036276af059c7e
"net: introduce skb_try_coalesce()" from Eric.
Or.
-----------[ cut here ]------------
WARNING: at net/core/skbuff.c:3413 skb_try_coalesce+0x1f8/0x31d()
This warning catch skb truesize offenders, most probably its a driver
issue.
From: Eric Dumazet <hidden> Date: 2012-07-10 11:14:12
On Tue, 2012-07-10 at 12:18 +0200, Eric Dumazet wrote:
On Tue, 2012-07-10 at 12:54 +0300, Or Gerlitz wrote:
quoted
Hi Dave, Eric,
Another trace that I see here with net-next is this one-time warning. I
get it always
on the passive side of TCP, something that seems related to GRO, it
happens only with
IPoIB, not with mlx4_en and igb (when igb get to work on net-next...)
The latest commit in this area is bad43ca8325f493dcaa0896c2f036276af059c7e
"net: introduce skb_try_coalesce()" from Eric.
Or.
-----------[ cut here ]------------
WARNING: at net/core/skbuff.c:3413 skb_try_coalesce+0x1f8/0x31d()
This warning catch skb truesize offenders, most probably its a driver
issue.
By the way, this driver allocates not enough tailroom in skbs, so IP/TCP
stacks need to reallocate skb head to pull IP/TCP headers. Thats not
efficient.
I suggest using following patch :
From: Eric Dumazet <hidden> Date: 2012-07-10 11:22:14
On Tue, 2012-07-10 at 13:14 +0200, Eric Dumazet wrote:
On Tue, 2012-07-10 at 12:18 +0200, Eric Dumazet wrote:
quoted
On Tue, 2012-07-10 at 12:54 +0300, Or Gerlitz wrote:
quoted
Hi Dave, Eric,
Another trace that I see here with net-next is this one-time warning. I
get it always
on the passive side of TCP, something that seems related to GRO, it
happens only with
IPoIB, not with mlx4_en and igb (when igb get to work on net-next...)
The latest commit in this area is bad43ca8325f493dcaa0896c2f036276af059c7e
"net: introduce skb_try_coalesce()" from Eric.
Or.
-----------[ cut here ]------------
WARNING: at net/core/skbuff.c:3413 skb_try_coalesce+0x1f8/0x31d()
This warning catch skb truesize offenders, most probably its a driver
issue.
By the way, this driver allocates not enough tailroom in skbs, so IP/TCP
stacks need to reallocate skb head to pull IP/TCP headers. Thats not
efficient.
I suggest using following patch :
And of course we also can fix the truesize bug.
(Not sure it will fix the warning, but worth trying)
Since this driver allocates a full page, it must use the PAGE_SIZE, not
the used part in the fragment
On Tue, 2012-07-10 at 13:14 +0200, Eric Dumazet wrote:
quoted
On Tue, 2012-07-10 at 12:18 +0200, Eric Dumazet wrote:
quoted
On Tue, 2012-07-10 at 12:54 +0300, Or Gerlitz wrote:
quoted
Hi Dave, Eric,
Another trace that I see here with net-next is this one-time warning. I
get it always
on the passive side of TCP, something that seems related to GRO, it
happens only with
IPoIB, not with mlx4_en and igb (when igb get to work on net-next...)
The latest commit in this area is bad43ca8325f493dcaa0896c2f036276af059c7e
"net: introduce skb_try_coalesce()" from Eric.
Or.
-----------[ cut here ]------------
WARNING: at net/core/skbuff.c:3413 skb_try_coalesce+0x1f8/0x31d()
This warning catch skb truesize offenders, most probably its a driver
issue.
By the way, this driver allocates not enough tailroom in skbs, so IP/TCP
stacks need to reallocate skb head to pull IP/TCP headers. Thats not
efficient.
I suggest using following patch :
And of course we also can fix the truesize bug.
(Not sure it will fix the warning, but worth trying)
Since this driver allocates a full page, it must use the PAGE_SIZE, not
the used part in the fragment
@@ -159,7 +159,7 @@ static struct sk_buff *ipoib_alloc_rx_skb(struct net_device *dev, int id)u64*mapping;if(ipoib_ud_need_sg(priv->max_ib_mtu))-buf_size=IPOIB_UD_HEAD_SIZE;+buf_size=IPOIB_UD_HEAD_SIZE+128;/* reserve some tailroom for IP/TCP headers */elsebuf_size=IPOIB_UD_BUF_SIZE(priv->max_ib_mtu);
.
Hi,
I've applied the patch and there are no more warnings. Thanks.
Can you please elaborate on this issue which was there from day one and
AFAIK never manifested itself.
Best regards,
S.P.
From: Eric Dumazet <hidden> Date: 2012-07-10 13:01:52
On Tue, 2012-07-10 at 15:35 +0300, Shlomo Pongartz wrote:
I've applied the patch and there are no more warnings. Thanks.
Can you please elaborate on this issue which was there from day one and
AFAIK never manifested itself.
two problems :
1) truesize underestimation
Well, I posted at least 50 patches related to various skb->truesize
mismatches in the past year.
skb->truesize is/should_be the true size of skb, that is the memory
allocated for sk_buff, skb->head and all fragments
Check commit e1ac50f64691de9a (bnx2x: fix skb truesize underestimation)
for a similar fix done on bnx2x
Its very important to do so to avoid OOM.
If you account few bytes per fragment but allocate PAGE_SIZE bytes, its
pretty easy to allocate far more memory than allowed by various
socket/tcp/udp/... limits, and exhaust kernel memory.
commit 924a4c7d2e962b (myri10ge: fix truesize underestimation)
commit 7b8b59617ead5acc (igbvf: fix truesize underestimation)
I probably missed your driver because it was not on drivers/net tree but
drivers/infiniband
2) Not enough tailroom
Invisible but performance suffers, because IP/TCP will need
to call pskb_may_pull() and the expensive __pskb_pull_tail().
So each incoming IP packet needs at least one pskb_expand_head().
I'll send an official patch, but I believe I should refine the tailroom
allocation like that :