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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Oct 2008 11:53:58 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Robert Olsson <robert@...ur.slu.se>
Cc:	Stephen Hemminger <shemminger@...tta.com>,
	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: skb recycling

Robert Olsson a écrit :
> Eric Dumazet writes:
>  > Stephen Hemminger a écrit :
>  > > Add support for recycling tx buffers into receive buffers.
>  > > This is experimental at this point.
>  > > 
>  > 
>  > I really like this skb recycling
> 
> Hi,
> 
> Well the best and cleanest thing would be if the "global" recycler slab/slub 
> was fast enough. Historically it seems like every time the link speed increases 
> (now to 10g) alloc/kfree pops up on the profiles but that challenge has sofar
> been handled by slab/slub folks. Maybe we should consult them first...

Yes, but typical problem is inbalance :

One CPU does the allocations, (interrupts handled by a given CPU)
Another CPU(s) do(es) the freeing

Such scenario is hard for slab/slub because it needs inter-CPU communication, while
slub/slab are optimized to deal with per CPU queues/structures (fast path)

skb recycling is an interesting technique because typical NIC handles RX & TX completion
in one CPU at the same time, thus we can reduce this slab/slub inter-CPU handling.

> 
> Also there was some discussions to have packet objects in slab.
>

skb recycling has a (nice ?) side effect on NUMA platforms, not for forwarding workloads,
(which are IMHO not the majority of linux machines workloads) but typical servers.

Current NIC drivers actually allocate their RX rings using the memory node
close to the device.

With RX recycling, we are re-using skb that were allocated by the process itself,
and this process is likely the one that will process received frames.

On loaded machines, I am not sure that NIC having to access to remote nodes is
the limiting factor, especially considering modern coalescing/mitigation that tends to
delay interrupts anyway (and thus notification to host)




--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ