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]
Message-ID: <1384363086.28458.128.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 13 Nov 2013 09:18:06 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Ronen Hod <rhod@...hat.com>
Cc:	Michael Dalton <mwdalton@...gle.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Daniel Borkmann <dborkman@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	Eric Northup <digitaleric@...gle.com>,
	virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer
 size for improved performance

On Wed, 2013-11-13 at 18:43 +0200, Ronen Hod wrote:

> 
> This initial value, that you do not really want to use, will slowly fade, but it
> will still pretty much dominate the returned value for the first RECEIVE_AVG_WEIGHT(==64)
> samples or so (most ewma implementations suffer from this bug).
> Naturally, it doesn't matter much if you just keep it running forever.
> However, if you will want to restart the learning process more often, which might make
> sense upon changes, then the auto-tuning will be very sub-optimal.

Note that we fill a ring buffer at open time (try_fill_recv()),
all these buffers will be of the minimal size.

By the time we have refilled the ring buffer, EWMA value will be
GOOD_PACKET_LEN.

These sizes are a hint, clamped between 1500 and PAGE_SIZE.

We do not care of very first allocated buffers, they are good enough.

We only care of the million of following allocations.

Also note the EWMA is per queue, not global to the device.

Of course, there is no 'one size' perfect for all usages.


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