Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp872866imm; Mon, 21 May 2018 16:12:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZryPAj3AW58xQBSJZsZqvddo9FON2C9ZiCjO95Y5pHGigjxI1zUV2/Jclb/jtOtEPvCjAP2 X-Received: by 2002:a63:bd09:: with SMTP id a9-v6mr17027428pgf.250.1526944362205; Mon, 21 May 2018 16:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526944362; cv=none; d=google.com; s=arc-20160816; b=pgB7tPrNlhjIUWjS8OusyPpSeLAGgfjIngWSy7ZilvLzDDdEcYW4mzucmPQz6Sa4yi GYHrBhWKKv65Vakt8CBIH6mNy1GmwAA4vKNS4+HaOZuvtQHuQRHGF4lqwh0lwGiGgGjZ SAxnHqRpHHw0Tet09RoLc0gcm3uuY8UM2bxNVtoKCR71FHn9iv8znF5X4cIQ1F0ObH6U 1Ih1aj9v9uodJ+1Yh2t1KU4mCVbi83h3UZxN+omoru3g0upn7xc9bkuxNuub8TK2e6uw 77NbqroyEG4z/FmnHngNVuyyIG7t7JLZt7h3X5AuN8Whssq0KiWtpPlXMttsTmmd/VFx R0Mw== 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 :arc-authentication-results; bh=NyLW8yg6KxOoISKhvUQRMINKllfpiHI5hvskpsUhJVk=; b=XHmYghvEw3fapScrChgRX0FJYntd0ur1AN3HX5IF0UmGl3YNIwPxwRjSVHt4JPUuGJ YvfjJj32g97QIeTofnFlOA3jQFDm2b9GJM/iSf52RaOkw3ejv+kbvyn6yCRt3O5nE4mq p8U8mi4VZyOxurdM9z2lachnxrkRpZO+wV3jLKgkT76ahnayUOkASwWziiLrsivGA9ES LcBpIperwgtlyNvi1v4Nsffa63mtzdfDPEYSnz3c1Fb3BwDxHzHMXJgsgLaUiB+J9nkp nc9cIxsh/dZBkxc9Zuwm5FhtP4IDWZWaYJ/iNAYwvfs96ocdPcEK/QQnjkXapLuSlnhi aneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=iZouWmWB; dkim=pass header.i=@codeaurora.org header.s=default header.b=iZouWmWB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7-v6si14749577pfa.78.2018.05.21.16.12.27; Mon, 21 May 2018 16:12:42 -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=@codeaurora.org header.s=default header.b=iZouWmWB; dkim=pass header.i=@codeaurora.org header.s=default header.b=iZouWmWB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbeEUXLl (ORCPT + 99 others); Mon, 21 May 2018 19:11:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38616 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbeEUXLj (ORCPT ); Mon, 21 May 2018 19:11:39 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BBD59602BC; Mon, 21 May 2018 23:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526944298; bh=8NRA9hld5dUvzotu+dnko/SZ2BNYSQLiAnWeVR52p8k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iZouWmWB5TxnSRf252goshyb4Tj0YOEv5lup/IClzXNZAYsgEBF8haqsPZyWiXfWi jvf5bI9PtGcis1BILbVwQ/2xTOYyCLD1KRSOLhLyhIkJRakgq4KGlWZGvRg+H8vF1v IEt7Yybdluy/q0zJgxXLwPtf8TNPBAP/z+2pf6nE= 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.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID 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 051B560314; Mon, 21 May 2018 23:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526944298; bh=8NRA9hld5dUvzotu+dnko/SZ2BNYSQLiAnWeVR52p8k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iZouWmWB5TxnSRf252goshyb4Tj0YOEv5lup/IClzXNZAYsgEBF8haqsPZyWiXfWi jvf5bI9PtGcis1BILbVwQ/2xTOYyCLD1KRSOLhLyhIkJRakgq4KGlWZGvRg+H8vF1v IEt7Yybdluy/q0zJgxXLwPtf8TNPBAP/z+2pf6nE= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 21 May 2018 16:11:38 -0700 From: Rajkumar Manoharan To: Niklas Cassel Cc: Kalle Valo , "David S. Miller" , 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 In-Reply-To: <20180521204359.23884-1-niklas.cassel@linaro.org> References: <20180521204359.23884-1-niklas.cassel@linaro.org> Message-ID: <8195be7603a8cd659d25a9c3d898b891@codeaurora.org> X-Sender: rmanohar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-21 13:43, Niklas Cassel wrote: > The following problem was observed when running iperf: [...] > > In order to avoid trying to flush the queue every time we free a frame, > only do this when there are 3 or less frames pending, and while we > actually have frames in the queue. This logic was copied from > mt76_txq_schedule (mt76), one of few other drivers that are actually > using wake_tx_queue. > > Suggested-by: Toke Høiland-Jørgensen > Signed-off-by: Niklas Cassel > --- > Changes since V1: use READ_ONCE() to disallow the compiler > optimizing things in undesirable ways. > > drivers/net/wireless/ath/ath10k/txrx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c > b/drivers/net/wireless/ath/ath10k/txrx.c > index cda164f6e9f6..264cf0bd5c00 100644 > --- a/drivers/net/wireless/ath/ath10k/txrx.c > +++ b/drivers/net/wireless/ath/ath10k/txrx.c > @@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, > wake_up(&htt->empty_tx_wq); > spin_unlock_bh(&htt->tx_lock); > > + if (READ_ONCE(htt->num_pending_tx) <= 3 && !list_empty(&ar->txqs)) > + ath10k_mac_tx_push_pending(ar); > + Niklas, Sorry for the late response. ath10k_mac_tx_push_pending is already called at the end of NAPI handler. Isn't that enough to process pending frames? Earlier we observed performance issues in calling push_pending from each tx completion. IMHO this change may introduce the same problem again. -Rajkumar