Re: [PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-21 Thread Cong Wang
On Thu, Sep 20, 2018 at 1:58 AM Li RongQing wrote: > > if skb->head is vmalloc address, when this skb is delivered, full > allocation for this skb is required, if there are many devices, > the full allocation will be called for every devices So why do you in practice need many netlink tap

Re: 答复: [PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-21 Thread Eric Dumazet
On 09/20/2018 08:27 PM, Li,Rongqing wrote: > > The below change seems simple, but it increase skb allocation and > free one time, Seem fine to me. An extra skb_clone() for vmalloc-skb-users is absolute noise, compared to vmalloc()vfree() cost. Thanks.

答复: [PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-20 Thread Li,Rongqing
: Re: [PATCH][next-next][v2] netlink: avoid to allocate full skb when > sending to many devices > > > > On 09/20/2018 06:43 AM, Eric Dumazet wrote: > > > Sorry, I should cc to you. > > And lastly this patch looks way too complicated to me. > > You proba

Re: [PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-20 Thread Eric Dumazet
On 09/20/2018 06:43 AM, Eric Dumazet wrote: > > And lastly this patch looks way too complicated to me. > You probably can write something much simpler. Something like : diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index

Re: [PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-20 Thread Eric Dumazet
On 09/20/2018 01:54 AM, Li RongQing wrote: > if skb->head is vmalloc address, when this skb is delivered, full > allocation for this skb is required, if there are many devices, > the full allocation will be called for every devices > > now if it is vmalloc, allocate a new skb, whose data is

[PATCH][next-next][v2] netlink: avoid to allocate full skb when sending to many devices

2018-09-20 Thread Li RongQing
if skb->head is vmalloc address, when this skb is delivered, full allocation for this skb is required, if there are many devices, the full allocation will be called for every devices now if it is vmalloc, allocate a new skb, whose data is not vmalloc address, and use new allocated skb to clone