Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4338482ybz; Tue, 28 Apr 2020 09:36:39 -0700 (PDT) X-Google-Smtp-Source: APiQypISM/FR0banc205YS1xctC//xDjT0xJ6htQqFXWeoUDxYKwEWwjO6Jb6yk9Jvgsmmjobg0s X-Received: by 2002:a17:906:1cd5:: with SMTP id i21mr25289611ejh.251.1588091799751; Tue, 28 Apr 2020 09:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588091799; cv=none; d=google.com; s=arc-20160816; b=nBs53ki6I9FNVEjshvjJtRspUR075dVAEFvuJ/rJNijbUByhn4ljoljF0wT7Vjb5Mj UCc4dQCOpYtFoeUpAokdf/AZBLjeRK0+kzwl7zMi6jb6ia7H7y23KTUfM6cZKrO3E/O4 3b5IqZVgTTEQ4q3CYv7BH0qgb+RYNwQ7iyH9OLWC5KgGHf9vN1yVm2w1Y/8AL9sK1uA8 6o+7YpmUKfOIDz2hd93BrVhPEqyWt3uLAzCgzK/7sChr3LIcjmBJhLgK12aW61FbJlhZ YBSarJ9jcnZXezgABO6p6/00sfTmnaEMx9LcvkPTfcH62EjdfEzMHqYXGHD8jNNBcoq5 vqtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:dkim-filter; bh=deX10qsKBIaXJBBSe5YwaMuAcFWHmLPBrEOoxDj91+A=; b=ingPI1nClSOdNaekUtzkCYkOigVU64jyowxm+/9Rq87uEYTedsWArQ01IOlWsy5poC d6sOmGyLCvu902Rj6/axBBsjf1AU44l5mAtHImRoTd7wQZu5ojpC+7JC/tPA9/edgO+e VO0HVNi2HRzKR3V3UnVUgjolcsTIUItm0idQV+qudKX1On4QJLkb9hPeDaeG9/1BLaDp WGNM+yNcSIGuBKFmjuda7TYaEVjQSWEf0Z5r+CIcM+pbqW/uF+b4vSxjwKL2Pf9d/IBn Wqs9Gc0mOHfotYMbfG0pM2fonAYctYPAVMngVT40CAmdXdy2YMipYdPNHtD6K5cSmq/k M3tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=L9r3WdnC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj2si2110537ejb.279.2020.04.28.09.36.13; Tue, 28 Apr 2020 09:36:39 -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; dkim=pass header.i=@candelatech.com header.s=default header.b=L9r3WdnC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728293AbgD1Qf7 (ORCPT + 99 others); Tue, 28 Apr 2020 12:35:59 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:33970 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728129AbgD1Qf7 (ORCPT ); Tue, 28 Apr 2020 12:35:59 -0400 Received: from [192.168.254.4] (unknown [50.34.219.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 4AEB613C283; Tue, 28 Apr 2020 09:35:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 4AEB613C283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1588091758; bh=ZYghGw0vlBWMqmUCZUGpGwpq9saVPWcv8y4CKBdZoMc=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=L9r3WdnCfxqlZ4Vut1ZyN4syYB+DSGQWf5dnd2Z73IGksNcmCJtIJ2ILJtj6WpkSN xIqZbi+HjpbC9alvKk0op63SVOT7YXrcPQAI+5tY2c0TM7wOuF8mrnPlDZaKBKY5Jg 9pcKk21ce0CwktDmhapOTeCTuUXMK11UVd1qGGJY= Subject: Re: [PATCH] ath10k: Restart xmit queues below low-water mark. To: Dave Taht , Steve deRosier References: <20200427145435.13151-1-greearb@candelatech.com> Cc: linux-wireless From: Ben Greear Message-ID: Date: Tue, 28 Apr 2020 09:35:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 04/28/2020 09:27 AM, Dave Taht wrote: > On Tue, Apr 28, 2020 at 7:56 AM Steve deRosier wrote: >> >> On Mon, Apr 27, 2020 at 7:54 AM wrote: >>> >>> From: Ben Greear >>> >>> While running tcp upload + download tests with ~200 >>> concurrent TCP streams, 1-2 processes, and 30 station >>> vdevs, I noticed that the __ieee80211_stop_queue was taking >>> around 20% of the CPU according to perf-top, which other locking >>> taking an additional ~15%. >>> >>> I believe the issue is that the ath10k driver would unlock the >>> txqueue when a single frame could be transmitted, instead of >>> waiting for a low water mark. >>> >>> So, this patch adds a low-water mark that is 1/4 of the total >>> tx buffers allowed. >>> >>> This appears to resolve the performance problem that I saw. >>> >>> Tested with recent wave-1 ath10k-ct firmware. >>> >> >> Hey Ben, >> >> Did you do any testing with this patch around latency? The nature of >> the thing that you fixed makes me wonder if it was intentional with >> respect to making WiFi fast - ie getting rid of buffers as much as >> possible. Obviously the CPU impact is likely to be an unintended >> consequence. In any case, I don't know anything for sure, it was just >> a thought that went through my head when reading this. > > I note that I'd prefer a BQL-like high/low watermark approach in > general... bytes, not packets, or better, perceived > airtime in a revision of AQL... > > ... but we'll try this patch, thx! Is there a nice diagram somewhere that shows where the various buffer-bloat technologies sit in the stack? I suspect such should be above the txqueue start/stop logic in the driver that I mucked with, and certainly the old behaviour has no obvious tie-in with any higher-level algorithms. I doubt my patch will change much except in pathological cases where the system is transmitting frames fast enough to fully fill the tx buffers and also loaded in such a way that it can process just a few tx frames at a time to keep bouncing to full and not full over and over. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com