From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance Date: Wed, 13 Nov 2013 06:19:08 -0800 Message-ID: <1384352348.28458.102.camel@edumazet-glaptop2.roam.corp.google.com> References: <1384294885-6444-1-git-send-email-mwdalton@google.com> <1384294885-6444-4-git-send-email-mwdalton@google.com> <52833C9B.7070908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Michael Dalton , "Michael S. Tsirkin" , netdev@vger.kernel.org, Daniel Borkmann , virtualization@lists.linux-foundation.org, Eric Dumazet , "David S. Miller" To: Ronen Hod Return-path: In-Reply-To: <52833C9B.7070908@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org On Wed, 2013-11-13 at 10:47 +0200, Ronen Hod wrote: > I looked at how ewma works, and although it is computationally efficient, > and it does what it is supposed to do, initially (at the first samples) it is strongly > biased towards the value that was added at the first ewma_add. > I suggest that you print the values of ewma_add() and ewma_read(). If you are > happy with the results, then ignore my comments. If you are not, then I can > provide a version that does better for the first samples. > Unfortunately, it will be slightly less efficient. Value is clamped by (GOOD_PACKET_LEN, PAGE_SIZE - hdr_len) So initial value is conservative and not really used. Thanks