Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5486688pxj; Wed, 23 Jun 2021 02:14:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVDpQiLtOPwGpSRsg4EOirbh+RBUxkwS4i1Vc3pw5+BbSMNd8lZx6JNWHXDlBuADPNGjvD X-Received: by 2002:a6b:f717:: with SMTP id k23mr6280898iog.17.1624439693363; Wed, 23 Jun 2021 02:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624439693; cv=none; d=google.com; s=arc-20160816; b=QWg75Bxmtbv+kbRrNZ/9yjKG5qQjZbof/HHAzilRF5Bz2UmB4ZUfvdd/i4obyZ8tqP HGg/bnn4QcSAQWTUaoY4MGOFocxHii8tzh2O/XQMGixRIQD19aqcNiHSgIY+qXuXzGl8 W4I5jz9M3JIK0HxbQ1iy1egIFUE/FQNw7E4UYFf6IiOkoqXf5C6abGK8V8QiLTOomRYZ q/eH671nSwmTxvq1UPwn807Tx1mrG7muy+Dv4jzw68MGb3CIsnsyQd8EHSfi0IVOUaCL O5iD7625JstMSWiUXz/6ZdDupNB47tUZvV8561syg3JwbPpBoywMbRldZSqKFmhSHWGB FqRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ltFO4z3HzhfBBWIvplDo57JoLJ+E93MNArZ9H3OsGxQ=; b=yP1HN92+UHVCIeCGLwaxu8RqM02vk3Flj7B4e7FpPeLrJSAEHf1zCG1WjTe3gt0PYI wAkE7xwvqweFsT6LNG3Kh9nyjsdBceOBYi5Pqah3WEgNLxtwvelIqcR3M8d4k9XKjrxg dg62TeMMGuIyfjYFxoQRUXH1ZvB1IsDiUbz2azKefUgiSUaYZfzSOJQ9xvBjTtl4hLut xKluimSEvS48vjd85ODO5E+h+NldHUXAEXHWUbHF5ji6QjG4gsAg8z7XgH1zO5TjTtcM eRMmJws4bEN/qM+etDDOuqfvIyv6RswnTkbI2IxCQuivQWvS6k316dANveP+FlTZvpcn FpIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si2457015jan.14.2021.06.23.02.14.34; Wed, 23 Jun 2021 02:14:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhFWJQk (ORCPT + 99 others); Wed, 23 Jun 2021 05:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbhFWJQj (ORCPT ); Wed, 23 Jun 2021 05:16:39 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 992E3C061574 for ; Wed, 23 Jun 2021 02:14:22 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1lvyxf-00AV70-Pb; Wed, 23 Jun 2021 11:14:19 +0200 Message-ID: Subject: Re: [PATCH mac80211-next v8] mac80211: Switch to a virtual time-based airtime scheduler From: Johannes Berg To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , linux-wireless@vger.kernel.org Cc: make-wifi-fast@lists.bufferbloat.net, Felix Fietkau , Rajkumar Manoharan , Kan Yan , Yibo Zhao Date: Wed, 23 Jun 2021 11:14:18 +0200 In-Reply-To: <20210507094851.180838-1-toke@redhat.com> (sfid-20210507_114946_866610_98578A77) References: <20210507094851.180838-1-toke@redhat.com> (sfid-20210507_114946_866610_98578A77) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2021-05-07 at 11:48 +0200, Toke Høiland-Jørgensen wrote: > This switches the airtime scheduler in mac80211 to use a virtual time-based Generally, we prefer <=72 columns in commit messages ... I started reformatting, but then your code also has a lot of places that go over 80 columns, so I gave up ... Can you please do that? Some refactoring, e.g. in sta_apply_parameters(), may also be in order. > +/** > + * struct airtime_sched_info - state used for airtime scheduling and AQL > + * > + * @lock: spinlock that protects all the fields in this struct > + * @active_txqs: rbtree of currently backlogged queues, sorted by virtual time > + * @schedule_pos: the current position maintained while a driver walks the tree > + * with ieee80211_next_txq() > + * @active_list: list of struct airtime_info structs that were active within > + * the last AIRTIME_ACTIVE_DURATION (100 ms), used to compute weight_sum > + * @last_weight_update: used for rate limiting walking active_list > + * @last_schedule_time: tracks the last time a transmission was scheduled; used > + * for catching up v_t if no stations are eligible for transmission. > + * @v_t: global virtual time; queues with v_t < this are eligible for transmission > + * @weight_sum: total sum of all active stations used for dividing airtime > + * @weight_sum_reciprocal: reciprocal of weight_sum (to avoid divisions in fast > + * path - see comment above IEEE80211_RECIPROCAL_DIVISOR_64) > + * @aql_txq_limit_low: AQL limit when total outstanding airtime is < IEEE80211_AQL_THRESHOLD > + * @aql_txq_limit_high: AQL limit when total outstanding airtime is > IEEE80211_AQL_THRESHOLD This is also needlessly way over. Thanks, johannes