Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2825062pxb; Tue, 9 Mar 2021 11:48:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKfLCAeKcA2ccaMQt2Q35poaJ7TZzgvtEXp+ROy+N4cQnUF9ossh6YDOBHop6/9MA/hr/g X-Received: by 2002:a05:6402:312b:: with SMTP id dd11mr6063027edb.149.1615319317775; Tue, 09 Mar 2021 11:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615319317; cv=none; d=google.com; s=arc-20160816; b=A7orK9EumjstC7q3ChvA+JAviWyrgu7KMrhAM3ubuHKTGX3FipCJS9uRoaMZMc/t2l yrKGc1+BC5uZStNAnoquO4jklF7jyR/PgSTZqPNEbtZPflwAwXJ2rdRa68ljepbK/EZG D8AmaNErT1fEuPAhWpBOHpZ/uRMwqB5kOj5X3N086XFNejz+kqLNy8br4NqRKeKhKs5G HHrwuRDQs6wtjOjEU259ko9F+Q5NTREE4DR4CWFPcuen47sjfSZe7zFXMXPeIs1JLC71 Db9QS0bV0SlxJdyBDCzp3DNC9RpUjA7qbkVyLR9AuaWmEDaMqxiA9Y5UbYBDJhx/8zAH Ttjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h0LdCjjwzecnp1EYokdW4ebJBaUE+V7zj86mopJQUfk=; b=ar9lp7X3hNENlsZfIiDNzFdwEL8XUsLEY2lTsuwRRQ5a/rBf3w9UWd2KhInDvi8mjo ttmgTrTKGDstDbiNHZvV8NvBO8A7viF9WWY/c9ZwyfdwIpOxRzKEIALCcfERpSjMOlaY SyTg+b5LUL2lv3enFFnjgXZ/uDfQ0q2xrgOyl+cdaMZp50cQTArbsbVQK3oNAT6przjG EYVuO38HUDy7ib2cJDvnsHnnqN+rzz3vdwmribBaQ9p02r1kSuNT/F0PqaHP7u5pwoV0 DXTgY4ebSYhRwgwuo3bhyD+9VJq2sQCS0XLsj2HPHlqeRMM1z5ypORU+34EMIcKoqyBf KqPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kGKbT37s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si9928329ejh.313.2021.03.09.11.48.13; Tue, 09 Mar 2021 11:48:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kGKbT37s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231489AbhCITou (ORCPT + 99 others); Tue, 9 Mar 2021 14:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbhCIToR (ORCPT ); Tue, 9 Mar 2021 14:44:17 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA04C06174A; Tue, 9 Mar 2021 11:44:17 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id o11so15303775iob.1; Tue, 09 Mar 2021 11:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h0LdCjjwzecnp1EYokdW4ebJBaUE+V7zj86mopJQUfk=; b=kGKbT37spDgGsq64b2yUwd05ipI+8eRT+NKbHxXN/JRiGVRW/3lpfcSGRLEh0PgUxm S+fzmf0yeP8Z2TqhFZtTHZzF+Ce7QrXg2RFRXFCEN/z847MuyOFOtPpI+llRKWc4Xa+7 zZHTxAxs5zjqeqBFu5rFXVNuA+Dtps1Msvwd8KLv+FTFZVSvlKUUedwXBl5IOP/ilJSt 8emDedCKrXwSrUjgPIyrRXnXQG71WdL3rnOIKvtEVJq5pnj5lR9cV44CN4fEFb9Es0Fe qHu/mOJoiM9ieSNimMDWVhpOftTUFSGH9SbMMjzjWTeTL5XWKVctMVMvU1lmjiaGrjdR 08Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h0LdCjjwzecnp1EYokdW4ebJBaUE+V7zj86mopJQUfk=; b=NUmqnbG5WIYw3m+bh29WQvNJqmcqlGHQHkrvuVD+6BLo6BiAhsruS7yyug8FK7GhpF I9rNazlMmP5dgD3mqaMxxakizawUjqyL21KdDHUMlUj9N/u6+42zbfNh43n/TrGvAJhq w20U+sfcI3MZoaDfYvWDI+13H79XuAb8gZ3ZjzA2jER0uE4k9B7xeOEvG4pCGHpYOVxs AkTCmDKOchj1e8AaeLSyQHvsz9GttkMj+1VHDq8bi0AW5upRAilf2HqL5N7JZptlxAQ3 juQXkwPIoCtqiIjNhxTMjKRBEpe3DP+YnoFk58IZA7hDNn2dbqjrJsjA8Sd0TYlvEqYG L1MA== X-Gm-Message-State: AOAM530tcRW7qVvH/i8hXy0CI2oImWWiyfEfEI/smjhAe5AaVFlp4sNr Pek98leLoXOgy2777z3/OBcVygGr1PXomftfZUg= X-Received: by 2002:a5e:990a:: with SMTP id t10mr24345727ioj.161.1615319056963; Tue, 09 Mar 2021 11:44:16 -0800 (PST) MIME-Version: 1.0 References: <20210309152354.95309-1-mailhol.vincent@wanadoo.fr> <20210309152354.95309-2-mailhol.vincent@wanadoo.fr> In-Reply-To: <20210309152354.95309-2-mailhol.vincent@wanadoo.fr> From: Dave Taht Date: Tue, 9 Mar 2021 11:44:05 -0800 Message-ID: Subject: Re: [RFC PATCH 1/1] dql: add dql_set_min_limit() To: Vincent Mailhol Cc: Marc Kleine-Budde , linux-can@vger.kernel.org, LKML , Linux Kernel Network Developers , Tom Herbert , Eric Dumazet , Peter Zijlstra , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I note that "proof" is very much in the developer's opinion and limited testing base. Actual operational experience, as in a real deployment, with other applications, heavy context switching, or virtualization, might yield better results. There's lots of defaults in the linux kernel that are just swags, the default NAPI and rx/tx ring buffer sizes being two where devs just copy/paste stuff, which either doesn't scale up, or doesn't scale down. This does not mean I oppose your patch! However I have two points I'd like to make regarding bql and dql in general that I have long longed be explored. 0) Me being an advocate of low latency in general, does mean that I have no problem and even prefer, starving the device rather than always keeping it busy. /me hides 1) BQL is MIAD - multiplicative increase, additive decrease. While in practice so far this does not seem to matter much (and also measuring things down to "us" really hard), a stabler algorithm is AIMD. BQL often absorbs a large TSO burst - usually a minimum of 128k is observed on gbit, where a stabler state (without GSO) seemed to be around 40k on many of the chipsets I worked with, back when I was working in this area. (cake's gso-splitting also gets lower bql values in general, if you have enough cpu to run cake) 2) BQL + hardware mq is increasingly an issue in my mind in that, say, you are hitting 64 hw queues, each with 128k stored in there, is additive, where in order to service interrupts properly and keep the media busy might only require 128k total, spread across the active queues and flows. I have often thought that making BQL scale better to multiple hw queues by globally sharing the buffering state(s), would lead to lower latency, but also that probably sharing that state would be too high overhead. Having not worked out a solution to 2), and preferring to start with 1), and not having a whole lot of support for item 0) in the world, I just thought I'd mention it, in the hope someone might give it a go.