From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43B5BC49361 for ; Thu, 17 Jun 2021 17:59:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CDFD613D5 for ; Thu, 17 Jun 2021 17:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233319AbhFQSBz (ORCPT ); Thu, 17 Jun 2021 14:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233262AbhFQSBm (ORCPT ); Thu, 17 Jun 2021 14:01:42 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B359C0613A2 for ; Thu, 17 Jun 2021 10:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v40nMHwOtRaKTUDeGhfNF5508cHey0NmopoGXvvxr+M=; b=JKxqz9SXxD33n/K1sgphRSadPB fE858ogNbnGN0OVdQW496blpRWNjehYrVn3ZlOspz6yzDdXBLTUUG4CYijZyJQCSdxdBvXqscPSC0 shF61mpsnBmNabjZyjM69ZNPozPMWN0YAUL4C2vX74JL8SGxp1Co1ppfawLzJmUKLPxM=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ltwIZ-0007zT-1t; Thu, 17 Jun 2021 19:59:27 +0200 Subject: Re: [PATCH v2 1/4] mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue From: Felix Fietkau To: Ryder Lee , Johannes Berg Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: <2176023d8f13d82d093452e1c105609396c30622.1622164961.git.ryder.lee@mediatek.com> Message-ID: <4d652f4a-c258-f248-911f-28238531ae4d@nbd.name> Date: Thu, 17 Jun 2021 19:59:26 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-06-17 12:50, Felix Fietkau wrote: > > On 2021-05-28 08:05, Ryder Lee wrote: >> Make ieee80211_tx_h_rate_ctrl() get called on dequeue to improve >> performance since it reduces the turnaround time for rate control. >> >> Signed-off-by: Ryder Lee >> --- >> change since v2 - roll ieee80211_tx_h_rate_ctrl checks into one condition > There were some OpenWrt crash reported which appear to be related to > this patch. I was able to reproduce a deadlock with ath9k, and I'm > currently looking into it. Some more information about the crash: - ath9k calls ieee80211_tx_dequeue with the tx queue lock held - ieee80211_tx_dequeue calls minstrel get_rate - get_rate calls minstrel_aggr_check - minstrel_aggr check calls ieee80211_start_tx_ba_session - ieee80211_start_tx_ba_session tries to send a frame - ath9k tries to acquire the tx lock it already holds I've fixed this in v3 by moving the logic of minstrel_aggr_check into mac80211 - Felix From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03545C48BE5 for ; Thu, 17 Jun 2021 17:59:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C21E3613D5 for ; Thu, 17 Jun 2021 17:59:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C21E3613D5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nbd.name Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:Cc:To:From:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fUuputye78v1xmP/8pX5p1QDTQm5jaszpcw3rdZdyE0=; b=djKVmZdsGYrZ0m6Di24QjBuPK/ KJ2dhl3TfhqkV/u+/nlX/6j6as6psmhSrNENgXA9kFFbH2tRfaZLb9t5TAQebN3ilcCf9wyk5ilA4 3BItgnXOfVO+IuL//wcJirlbRjkMTCSQpH8XXAMA2rCWeYSt5vU29C8UmkqB4U5yR2sZSI5IKqui8 wpCenDqRgTXEytmog0cZ8PrNuJboAvkFywtpktQOEnvNYd/zOSJEIGspZ3OlvcGGoZKCYKQ2MLbzD sfdJPWY+abp2+2JZmV/kAigP7LRAZfmwDMhjtujOcAY8PZg4bFLqmXrZxcqVqGPeLpX1zXUvBtTqN rndf+sUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwIl-00BJQA-Bi; Thu, 17 Jun 2021 17:59:39 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltwIh-00BJNO-3A for linux-mediatek@lists.infradead.org; Thu, 17 Jun 2021 17:59:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v40nMHwOtRaKTUDeGhfNF5508cHey0NmopoGXvvxr+M=; b=JKxqz9SXxD33n/K1sgphRSadPB fE858ogNbnGN0OVdQW496blpRWNjehYrVn3ZlOspz6yzDdXBLTUUG4CYijZyJQCSdxdBvXqscPSC0 shF61mpsnBmNabjZyjM69ZNPozPMWN0YAUL4C2vX74JL8SGxp1Co1ppfawLzJmUKLPxM=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ltwIZ-0007zT-1t; Thu, 17 Jun 2021 19:59:27 +0200 Subject: Re: [PATCH v2 1/4] mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue From: Felix Fietkau To: Ryder Lee , Johannes Berg Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: <2176023d8f13d82d093452e1c105609396c30622.1622164961.git.ryder.lee@mediatek.com> Message-ID: <4d652f4a-c258-f248-911f-28238531ae4d@nbd.name> Date: Thu, 17 Jun 2021 19:59:26 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210617_105935_433335_A2EDF156 X-CRM114-Status: GOOD ( 10.42 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 2021-06-17 12:50, Felix Fietkau wrote: > > On 2021-05-28 08:05, Ryder Lee wrote: >> Make ieee80211_tx_h_rate_ctrl() get called on dequeue to improve >> performance since it reduces the turnaround time for rate control. >> >> Signed-off-by: Ryder Lee >> --- >> change since v2 - roll ieee80211_tx_h_rate_ctrl checks into one condition > There were some OpenWrt crash reported which appear to be related to > this patch. I was able to reproduce a deadlock with ath9k, and I'm > currently looking into it. Some more information about the crash: - ath9k calls ieee80211_tx_dequeue with the tx queue lock held - ieee80211_tx_dequeue calls minstrel get_rate - get_rate calls minstrel_aggr_check - minstrel_aggr check calls ieee80211_start_tx_ba_session - ieee80211_start_tx_ba_session tries to send a frame - ath9k tries to acquire the tx lock it already holds I've fixed this in v3 by moving the logic of minstrel_aggr_check into mac80211 - Felix _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek