[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1283494768.3699.1507.camel@edumazet-laptop>
Date: Fri, 03 Sep 2010 08:19:28 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] net: Frag list lost on head expansion.
Le vendredi 03 septembre 2010 à 07:48 +0200, Eric Dumazet a écrit :
> David, I had this same idea some days ago when reviewing this code,
> but when I came to conclusion we could not avoid the get_page /
> put_page() on skb_shinfo(skb)->frags[i].page. I thought it was not worth
> trying to avoid the frag_list grab/release operation.
>
> But we are the only user of this skb and skb_shinfo(skb)->frag_list, so
> your patch seems good to me.
>
> Please note you are not fixing a bug, because the new frag_list pointer
> was correctly copied in the
>
> memcpy(data + size, skb_end_pointer(skb),
> offsetof(struct skb_shared_info,
> frags[skb_shinfo(skb)->nr_frags]));
>
> Please rewrite the changelog to say this patch is an optimization, to
> avoid the atomic ops on each skb found in frag_list ?
>
Well, skb is not shared, but we have no guarantee skb_shinfo(skb) is
not.
To optimize this thing, you'll need to add a new parameter to
skb_release_data() ?
--
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