Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp621985ybp; Wed, 9 Oct 2019 01:21:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyItP85+6B0MMTPvt00sy+cDOPDDFqoENmyNF+eHxSynsEcplaTrw7olKIr0zWHx0F9bhJ6 X-Received: by 2002:a17:906:e2d6:: with SMTP id gr22mr1588911ejb.160.1570609272890; Wed, 09 Oct 2019 01:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609272; cv=none; d=google.com; s=arc-20160816; b=tCo+HHFTSpZXhCOQ8g1yxzzHvKWR4cmL7ApjZuLamgcGzxsVmkl4msZndWiDrJvJDx pW4o5siQEzPPYiOtrH3sLQRMSG8fDM/nNvQ4e+wIH9UVUTYIKxOIB7VAdqfqmY5Yy3k6 fIxX5UcBoQNeqXlLkA6rcf5yYiQPw3R5wpmQSrSJ8XN7Q9Nf0HPnCTaQqGq7EpADgzKA Y5ea41JqEcpoJR1ijQpCJukyr3/P0R/eJS+BwQieriHVUYZGcvt8DS7gCW8GSVIPrCWM 50XLlbzEZb8kzULf3UGGkDUfSAADiUD8CKdXVm95caQ3lXzOVqNahO4J1gq44h1+sDTN iWUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=Qhtviy6KFeHtiJR46tLNZ4HdrI8h+tRff1p9M/6mpJI=; b=LNqNh1b0sD+VloZZe2Z+W09hnZURo374j/DxY7fl8ylpH6yKKj3sRd591jYE+3OGc8 5oazvcj6vfBQO0LIGE9pkwPFL7thOoL3KORjBADMhBUxDnbYFLPFjV1WiOvFdj88N1Zc i1wgMNIIGkWIvUfxir4guTQyWFJr/l+0XzogXcj6b3h6r+7Ws3ejguxn7ZP4Q5a9hQ3S 05yZ2g1ZWlMBF8jMPYBcgudo5zLqGpnqVX+f7XQC+eYCSGJTD0KFo5faGbM5NpAC6oH2 5qrzLqpIjHaGG74CpBHjAQEBYaeHsuzVnvNVYj6brCju7jaTzEcYIcQnmGV7/caA0lbw P1IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="ivhG/JU+"; dkim=pass header.i=@codeaurora.org header.s=default header.b="ivhG/JU+"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z35si932759edb.146.2019.10.09.01.20.48; Wed, 09 Oct 2019 01:21:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="ivhG/JU+"; dkim=pass header.i=@codeaurora.org header.s=default header.b="ivhG/JU+"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725989AbfJIISW (ORCPT + 99 others); Wed, 9 Oct 2019 04:18:22 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50992 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfJIISV (ORCPT ); Wed, 9 Oct 2019 04:18:21 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E882861A3D; Wed, 9 Oct 2019 08:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570609100; bh=yVACcIyD8sXXrbvUi7xGYw1ltxq2hUy0puNDsNVcAn4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ivhG/JU+cTVrmdhpnrLdXGsCooIKAEZqO7DYSWKY4G41n8T74SlVcBDJXQJaXhaAV ejpB48gAyWjHlWfw5exQ4EE3NORgezA0C/xbW32EgODzgI+On19IXlResl8QQphaXe JlPYKueW95h0pO4rcSF6GdnH0HCdRXFTyOeqR8to= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 1BC4561A3D; Wed, 9 Oct 2019 08:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570609100; bh=yVACcIyD8sXXrbvUi7xGYw1ltxq2hUy0puNDsNVcAn4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ivhG/JU+cTVrmdhpnrLdXGsCooIKAEZqO7DYSWKY4G41n8T74SlVcBDJXQJaXhaAV ejpB48gAyWjHlWfw5exQ4EE3NORgezA0C/xbW32EgODzgI+On19IXlResl8QQphaXe JlPYKueW95h0pO4rcSF6GdnH0HCdRXFTyOeqR8to= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 09 Oct 2019 16:18:20 +0800 From: Yibo Zhao To: Kan Yan Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, toke@redhat.com, nbd@nbd.name Subject: Re: [PATCH v2 1/2] mac80211: Implement Airtime-based Queue Limit (AQL) In-Reply-To: <20191007043120.67567-2-kyan@google.com> References: <20191007043120.67567-1-kyan@google.com> <20191007043120.67567-2-kyan@google.com> Message-ID: <18630c07d0aa46d16cf660d013f96b3d@codeaurora.org> X-Sender: yiboz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c > index f13eb2f61ccf..dadb643a5498 100644 > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -3669,7 +3669,8 @@ struct ieee80211_txq *ieee80211_next_txq(struct > ieee80211_hw *hw, u8 ac) > { > struct ieee80211_local *local = hw_to_local(hw); > struct ieee80211_txq *ret = NULL; > - struct txq_info *txqi = NULL; > + struct txq_info *txqi = NULL, *head = NULL; > + bool found_eligible_txq = false; > > spin_lock_bh(&local->active_txq_lock[ac]); > > @@ -3680,20 +3681,32 @@ struct ieee80211_txq > *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) > if (!txqi) > goto out; > > + if (txqi == head && !found_eligible_txq) > + goto out; I assume here the only txq in the list that does not meet AQL check will not be dequeued. Right? Will it affect peak throughput once there is only one station. How about dequeuing it anyway regardless AQL because it is the only one active now so it is fine to occupy the rest bandwidth. Otherwise, I am afraid next_txq() will return NULL in the test only one station is present. > @@ -3748,10 +3785,10 @@ bool ieee80211_txq_may_transmit(struct > ieee80211_hw *hw, > struct sta_info *sta; > u8 ac = txq->ac; > > - spin_lock_bh(&local->active_txq_lock[ac]); > - > if (!txqi->txq.sta) > - goto out; > + return true; why return here? I think even a txq without sta info should get removed from list and added it back later in return_txq() if needed. No? > + > + spin_lock_bh(&local->active_txq_lock[ac]); > > if (list_empty(&txqi->schedule_order)) > goto out; -- Yibo