Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1404199imm; Wed, 23 May 2018 15:45:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrNI99US6GfAaojJjTWIW0EC3dmVtNh/k8lZmKvGFr/M//ff8pQUnkJ0ZROH6AFtnkNOlk/ X-Received: by 2002:a17:902:7209:: with SMTP id ba9-v6mr2086746plb.119.1527115519743; Wed, 23 May 2018 15:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527115519; cv=none; d=google.com; s=arc-20160816; b=ZhBJJFRWV/uBOqeugGY0pomx0+b2pTnVMBb9RaGqxUxMfzsdmMk2xz61GupJtFXanp 3OV+7oaLuHAagg/Bl8kLkvVRHe+7HM+JkqyYLkQfpaloIAiTGD1Z76Ph4/3soTZ/+JEB JcgNYIITpEX7fHnn/6vriVIyFmuwtTlkwBkNCtLyyCgpzZeyy4/ZYl8gfiAEC5IPxsGD HVFUUosOOdof9V7ECxQw9863WBvK3ppcbkNlcZwR6TG7utnU9tH3ed3jnERJEihVNJLu 3EyPx77dF2aP8wDlcR0o0t1tZIv3hB08Hv2DT9fGMNF8nRqyzh8HXoYSoSSKZ5+BWYbD FGUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=bg3z22U/WrpkTfykijdSKSi3KZamx8y3U2KB/UbTJwA=; b=tA2Xa09+8hwlsFYlVrQiLJJbw57z4+Jn4QQ9wD2YZGz0KM2V3Z3Fvqd5R9fcY6sFDX CBpQ4FDAQV3PJdWBtENzVZmYzXgUNb5WFPAkVloxedkWCqU4td46JHPu67epDxlPRVh6 vWMYb/T7orShf7mR1BfRHyzE0Sf2SiXzS5nF0PkJGAaAqUShACoMcnP6exYS8B/k6d4y OJgmyVtpHPwcNDqjfj80ktUu3x1QeBqhdMzRRceAZoziJIEfB71wI6EH3IRKK5naJCU1 Hjtcpd0xcFRjFIwfQ0B7tiPIXdbsUd4pS8dV9ShKUqLr1e77DJJBiH7Uz7hKmymdrQsP 3ibg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dQkWaAqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22-v6si19838486pll.393.2018.05.23.15.45.03; Wed, 23 May 2018 15:45:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=dQkWaAqR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934761AbeEWWow (ORCPT + 99 others); Wed, 23 May 2018 18:44:52 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39321 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934544AbeEWWot (ORCPT ); Wed, 23 May 2018 18:44:49 -0400 Received: by mail-wm0-f66.google.com with SMTP id f8-v6so13345760wmc.4 for ; Wed, 23 May 2018 15:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bg3z22U/WrpkTfykijdSKSi3KZamx8y3U2KB/UbTJwA=; b=dQkWaAqRe/B8HJ93FrbDKwgC6Kvh93xdzDAzqDknAAMkLgoEOjol2CWp8tw/kd5iCQ /oNQkaLQgN4wBo+X4TYEFg1+ByjFu2EgzC6TvWaCS+w+2SBHGif1rQyDj3eN/isRZlCl TdLez5L7G7ic61395rTsBOZizn8lXzevm9Vc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bg3z22U/WrpkTfykijdSKSi3KZamx8y3U2KB/UbTJwA=; b=aLEuqyzu4aABlXwM76OYMXd+PsmjbFpnWumkUnFbyohPvTGZqvVRszG7pAYQFyqdtQ d1iUunIq8Cqfs+LJJ7M2B3Jo+ts+k1ea7QTseksR7kSCYtqdfJz7q88v9m6fYCRtfpBk 8teJzUvOAS8R+p3GkD/K1COL5yjOBCjawWKa5RTIMom5Y/SERVTGdmBiOb9hwumH66GZ k8HntFmVsFIavHCCLIrAJF16th9I1s/6svkTXQtUJT+IKI4hd85lC2gv+qLej9K9ur84 EX+k9u6jUgXY4e98aLC8Brz18IJ0vZfRPxqfcTrLTMUyEmMlP7X+yvGMFh0yLyR3s2am 6H8g== X-Gm-Message-State: ALKqPweMWDX1hqLy8RcUTJ5qmor3TeDDs+aMCVnvm2918EFRS/7X2qJ2 8NLt91ePkf5K21zG7myWJmgCxw== X-Received: by 2002:a2e:1055:: with SMTP id j82-v6mr2925267lje.94.1527115488507; Wed, 23 May 2018 15:44:48 -0700 (PDT) Received: from localhost.localdomain (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id d8-v6sm937262lfe.95.2018.05.23.15.44.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 15:44:47 -0700 (PDT) Date: Thu, 24 May 2018 00:44:45 +0200 From: Niklas Cassel To: Erik Stromdahl Cc: Rajkumar Manoharan , Kalle Valo , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless-owner@vger.kernel.org Subject: Re: [PATCH v2] ath10k: transmit queued frames after waking queues Message-ID: <20180523224445.GB26565@localhost.localdomain> References: <20180521204359.23884-1-niklas.cassel@linaro.org> <8195be7603a8cd659d25a9c3d898b891@codeaurora.org> <20180522211521.GA26123@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 06:25:49PM +0200, Erik Stromdahl wrote: > > > On 05/22/2018 11:15 PM, Niklas Cassel wrote: > > > > > > > > Earlier we observed performance issues in calling push_pending from each > > > tx completion. IMHO this change may introduce the same problem again. > > > > I prefer functional TX over performance issues, > > but I agree that it is unfortunate that SDIO doesn't use > > ath10k_htt_txrx_compl_task(). > > Erik, is there a reason for this? > The reason is that the SDIO code has been derived mainly from qcacld and ath6kl > and they don't implement napi. > > ath10k_htt_txrx_compl_task is currently only called from the napi poll function, > and the sdio bus driver doesn't have such a function. Ok, thanks for the explanation. Perhaps we can change the SDIO code so that it uses NAPI in the future. > > Another solution might be to change so that we only call > > ath10k_mac_tx_push_pending() from ath10k_txrx_tx_unref() > > if (htt->num_pending_tx == 0). That should decrease the number > > of calls to ath10k_mac_tx_push_pending(), while still avoiding > > a "TX deadlock" scenario for SDIO. > Just out of curiosity, where did the limit of 3 come from? > If it works with a limit of 0, I think it should be used instead. It came from mt76_txq_schedule(): if (hwq->swq_queued >= 4 || list_empty(&hwq->swq)) break; len = mt76_txq_schedule_list(dev, hwq); Since this used a break, I simply inverted the logic, and called ath10k_mac_tx_push_pending() rather than mt76_txq_schedule_list(). However, I've submitted a V4 now that mimics the behavior in ath10k_htt_txrx_compl_task() instead, so now I call ath10k_mac_tx_push_pending() regardless of num_pending_tx. In most cases, ath10k_mac_tx_push_pending() will not dequeue any frames, since the ar->txqs list will be empty, so this shouldn't be so bad after all. > > Another intersting thing that I stumbled upon when looking into the > code (while writing this email) is the *wake_up(&htt->empty_tx_wq);* > > For some reason I have considered it not to be applicable for HL devices. > > The queue is waited for in the flush op (*ath10k_flush*). > I am unsure what it is used for, but I don't think it affects the TX > deadlock scenario. It seems to be called by mac80211 in certain scenarios, but like you said, it doesn't help with this problem. Regards, Niklas