From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 8017A3B29E for ; Fri, 12 Apr 2019 15:57:13 -0400 (EDT) Received: by mail-ed1-f50.google.com with SMTP id g6so5424926edc.8 for ; Fri, 12 Apr 2019 12:57:13 -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; bh=WRztn0f0sRoTyj/VLdvg3ZhSjqDgOAfE8Hj8NWB1MJ0=; b=KwOSzEP4RXya3+HR8a8Z6juAV7B/Wfjsuf9OxzNtnTvsa0R7MIsXDprdK3MNIVXgE1 xpPMGhViOerH79/syfPhBTxVMLRJJfUGrE+aF2MTGmoljl9wtJBsI/NJv0cOgvhu/NjN ifBqsbfQKPvgyr5xjfiovqrIDV5QBrpecaso2FqqEUbvoUuI6K1U2A97TXlD4jy96roC +7RKGSZtVSKChW6hw3XqCEDWVzGzu+ttxYMpFQhjRBr//Rk80Va+VPhTBrhAItU5G5rB 0ieS25IqyinZ7AzoKSn4DTF8U8jvaafmwcTxhWRzowlZejbV5I5dkOYHl1LTmD8zK6e0 RvOw== X-Gm-Message-State: APjAAAWX2JX0i0Q3dQlZJrj+c3BFx+dmpi5UWNlRzYJkE33ZMghvXfhQ qEBtCtk09ADk/paFfi925qG/lQ== X-Google-Smtp-Source: APXvYqzCdWjMsu/bdoefFVieKHKS3gj7C/fdCGxdfazvmCThSalnIfhRRAr42G+RukMRDMvoyfp+0Q== X-Received: by 2002:a17:906:364f:: with SMTP id r15mr32521216ejb.215.1555099032577; Fri, 12 Apr 2019 12:57:12 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (alrua-x1.vpn.toke.dk. [2a00:7660:6da:10::2]) by smtp.gmail.com with ESMTPSA id l18sm11879564edc.17.2019.04.12.12.57.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Apr 2019 12:57:11 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 055A71800E9; Fri, 12 Apr 2019 21:57:10 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Joshua Zhao Cc: make-wifi-fast@lists.bufferbloat.net In-Reply-To: References: <878swfshsk.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 12 Apr 2019 21:57:10 +0200 Message-ID: <87ftqnvvxl.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Make-wifi-fast] tx queue stuck for many minutes X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2019 19:57:13 -0000 Joshua Zhao writes: > Hi, > Thanks for the reply! I've also emailed the ath10k and linux-wireless list > and waiting to hear back suggestions. > In the meantime can you educate me how the aqm queue interacts with wifi > driver? Is that the driver pulls from the queue from time to time, instead > of aqm pushes to the network interface? How often or what triggers the > driver to pull? Generally two paths: 1. Packet comes in from upper netdev -> mac80211 queues the packet to tx -> driver is notified through wake_tx_queue() op, driver initiates transmission scheduling and pulls from TXQ and 2. Driver gets notification from hardware (mostly TX completion) -> driver initiates TX scheduling and pulls from TXQ There are some more cases that are variants of the above (e.g., wakeup from powersave etc). My guess is that in your case it is one of the cases in the second category that goes wrong... > I hope I can verify that if you can point me to the code to check that > :) And, for the queue itself, how long it's supposed to drop packets > and clean up? Well, when the hardware is reset, or the station is disassociated, the queue will be flushed. Other than that, there's no separate "cleanup" per se; rather, the two mechanisms outlined above should ensure that packets keep flowing towards the station at the other end. > It seems that when it's full, it notifies back-pressure to the socket > instead of simply dropping the packets from the head or the tail of > the queue? No, it doesn't generally do much back-pressure. Rather, when it fills up, it will drop packets from the head of the longest flow to clear space (see fq_tin_enqueue()). The limit is pretty high, though - 8192 packets or 16 Mbytes of memory... -Toke