lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190325170337.145026cb@carbon>
Date:   Mon, 25 Mar 2019 17:03:37 +0100
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Felix Fietkau <nbd@....name>
Cc:     Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org,
        davem@...emloft.net, fw@...len.de, brouer@...hat.com
Subject: Re: [PATCH v2] net: use bulk free in kfree_skb_list

On Mon, 25 Mar 2019 10:35:35 +0100 Felix Fietkau <nbd@....name> wrote:
> On 2019-03-25 10:31, Eric Dumazet wrote:
> > On 03/25/2019 02:09 AM, Felix Fietkau wrote:  
> >> On 2019-03-25 09:51, Eric Dumazet wrote:  
> >>> On 03/24/2019 09:56 AM, Felix Fietkau wrote:  
> >>>>
> >>>> Since we're freeing multiple skbs, we might as well use bulk
> >>>> free to save a few cycles. Use the same conditions for bulk free
> >>>> as in napi_consume_skb. 
> >>>
> >>> I do not believe kfree_skb_list() is used in the fast path, so do
> >>> we really need to make it so complex ?  
> >>
> >> mac80211 uses it to free the fraglist from A-MSDU aggregated
> >> packets in the tx status path. That's one fast path where it gets
> >> used right now and the reason it was showing up in my perf
> >> traces.  

Notice that kfree_skb_list(to_free) is used in (what I consider)
"fast-path" when the qdisc system drops packets, happens via to_free in
bottom of __dev_xmit_skb().  And fq_codel (which is default in most
distro's today) have an optimization (in fq_codel_drop()) for bulk
freeing SKBs, which will also benefit from this.

Thus, I still think it will be valuable to optimize kfree_skb_list().


> > This is not drop monitor friendly then....
> > 
> > TX completion should use consume_skb() or dev_kfree_skb()
> > 
> > BTW, I wonder what drop-monitor signal bulk free is sending ?  
>
> Good point about the drop monitor. Would you prefer that I replace
> this patch with one that adds a consume_skb_list function and another
> one that makes mac80211 use it?

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ