[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100418.024601.85853662.davem@davemloft.net>
Date: Sun, 18 Apr 2010 02:46:01 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sat, 17 Apr 2010 00:18:22 +0200
> Le jeudi 15 avril 2010 à 14:33 -0700, David Miller a écrit :
>
>> If it's not legal to skb_orphan() here then it would not be legal for
>> the drivers to unconditionally skb_orphan(), which they do.
>>
>> So either your test is unnecessary, or we have a big existing problem
>> :-)
>
> I cooked following patch, introducing skb_orphan_try() helper, to
> document all known exceptions.
Looks good, applied, thanks Eric.
That timestamping issue, I bet there is some simple solution hiding
in the bushes for that one?
Hmmm, something like... there is a less transient piece of state
(perhaps in the socket) and the skb has a pointer to that piece of
state. Then the driver writes into this pointed-to place rather
into some member of the skb itself.
Then all of these problems with referencing the skb metadata across
being passed to ->ndo_start_xmit() could go away I think.
> I have a possible followup for this patch :
>
> Orphaning skbs earlier could also make dev_kfree_skb_irq() faster.
> Instead of queing skb into completion_queue and triggering
> NET_TX_SOFTIRQ, we would directly free an orphaned skb ?
Sounds great. But I don't see dev_kfree_skb_irq() as much of a
performance priority, since all sane modern drivers free skbs from
softirq context (via NAPI).
--
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