From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBF51C4360F for ; Tue, 2 Apr 2019 10:36:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1AFF2084C for ; Tue, 2 Apr 2019 10:36:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728909AbfDBKgd convert rfc822-to-8bit (ORCPT ); Tue, 2 Apr 2019 06:36:33 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:43096 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfDBKgc (ORCPT ); Tue, 2 Apr 2019 06:36:32 -0400 Received: by mail-ed1-f67.google.com with SMTP id d26so11157392ede.10 for ; Tue, 02 Apr 2019 03:36:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=SIhpbxmTi5exDv0aD9sN1jXB3KJEq5/Sxjrisf0TVeI=; b=Lo3yfhHH7U6i3LLGUBuLrqbnun7wLnA2G9LS4oRubId8/23DuHoA/v1XQLd3EJNYG2 knUzRyh/WNeUZeWnc43Vd1+fonun4YXKrGZHHdCIW1UM2t0SD2fW/E59hh6olPqNI2eL G/nzWWBkYrNQijtFrxvQpjwUyUAzzvoNp3j29zjehgiMd/Hm9T2QFniB3Nlp4XoIWn3+ IRTra4eK0xzXoH/5DydOyrnzg5GFebGs4M8pW3ooDvS0vu0tuoBCczKcvQQulbb0CxUm CRvtzi+MMZ6B/qnTx+J7bg3ifJiX90TMldRZl9yz16zK+mI5yKgsyvuSOwMyCkx5QcTw HPRg== X-Gm-Message-State: APjAAAU0nZkat1XZpidyGFQI/rnAqr9RAugryBtBDTo14LARQanZu+QW cnHUeHrwX8S/TlryYOzvG0oSlg== X-Google-Smtp-Source: APXvYqwiq0b06qLw/N9ziO0+ywv2TlUN/2fAPkGnIpE8gz1w6l0czhaE8Puko3LMQps4KYYAJ31zbg== X-Received: by 2002:a17:906:5946:: with SMTP id g6mr11486997ejr.58.1554201390909; Tue, 02 Apr 2019 03:36:30 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id o1sm2386648eja.18.2019.04.02.03.36.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Apr 2019 03:36:30 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 89E1518200F; Tue, 2 Apr 2019 12:36:29 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Gautam Ramakrishnan Cc: Jamal Hadi Salim , davem@davemloft.net, netdev@vger.kernel.org, "Mohit P . Tahiliani" , "Sachin D . Patil" , Mohit Bhasi , "V . Saicharan" , Leslie Monis , Dave Taht Subject: Re: [RFC net-next 0/2] net: sched: add Flow Queue PIE AQM In-Reply-To: References: <20190331174005.5841-1-gautamramk@gmail.com> <87zhpaorss.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 02 Apr 2019 12:36:29 +0200 Message-ID: <87d0m4puc2.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Gautam Ramakrishnan writes: > On Mon, Apr 01, 2019 at 02:04:19PM +0200, Toke Høiland-Jørgensen wrote: >> Gautam Ramakrishnan writes: >> >> > Flow Queue PIE packet scheduler >> > >> > This patch series implements the Flow Queue Proportional >> > Integral Controller (FQ-PIE) active queue management >> > algorithm. It is an enhancement over the PIE algorithm. >> > It integrates the PIE aqm with a deficit round robin >> > scheme. >> > >> > It is implemented over RFC 8033 aligned version of PIE. >> > In this patch, Little's law is used for queue delay >> > estimation like PIE. This patch doesn't yet have the >> > timestamp based queue delay estimator like freebsd, that >> > Dave Taht thinks is better. >> > >> > We are looking for suggestions on cleanups and >> > improvements for this patch. >> >> Is the fq_ part basically identical to fq_codel? Might make sense to >> share some code in that case; might not be a trivial refactoring, >> though... >> >> -Toke > > The fq_ part is mostly the same, except for the batch dropping. But > the structure of flows are different. Any particular suggestions on > the refactoring? Well, fq_pie_enqueue() is quite close to fq_codel_enqueue(); same thing for *_dequeue(). So it should be possible to divide them up into a common part, followed by the bits that differ. Then the common parts can be factored out into a common function to be included by both. You don't have to do the actual factoring out of the common bits in this patch series, but it would be good if you could structure the fq_pie code so it is as close to the fq_codel code as possible, to make it easier to split out common parts later. This includes the enqueue and dequeue functions, as well as the data structures. Doing this also has the added bonus that you'll have to think about (and preferably explain the reasoning behind) any deviations between the two variants. I'll send a couple of concrete suggestions in a separate email. -Toke