Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp741753pxj; Thu, 17 Jun 2021 12:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7cVrLNI1U4VnlmfYCgrxy1YPKjiAjeA4i/nq+J1ue4NKiseD3r6F22AK9RSxseLQXF22O X-Received: by 2002:aa7:c1da:: with SMTP id d26mr8848508edp.92.1623959122991; Thu, 17 Jun 2021 12:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623959122; cv=none; d=google.com; s=arc-20160816; b=QXWp62FjdSBSS/mGaVxAgxjZ9JoQ9U7y9MMCJkbX88XTIbktSyw+GDCuzwou2lRguP 7vyGCVdt7BvkQP8L3ld4UgadFgH6AC07N5u/vucvtLiv740/s8Ky88JcWWpZGR66kpK+ KiVFZdlDs04WTHOrvgq25lPv4D7pzI3q6qcAKrbEeFm8JLQRh1IuPOicDDER5Giul902 9ynv7XOdDZt/tht51gjfJhiA6NVIIUpZ3Uf6FMRRIxYr1fEGVAZuYx8fxCPMEr3KE4Iu Pf/+u9FEuW9pYqf5EBmWzDXY7cpTvyvRJGiGt7SSS6wwkCfCQIkOlUAeM45YPRaJZNFR QKAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=v40nMHwOtRaKTUDeGhfNF5508cHey0NmopoGXvvxr+M=; b=QZPu1QglFNYAoLONWjpteYR4BNTR3udZ+l5YNPigqxDXhjHAswO+XgvpDVaU6QyBA3 ZqgZZGSu/AUnwJRyyn93DfSBfZ/tBFkXZbMbL7GnjZ4S5D+msA0QgLxTd6B7o/ccjmH2 bU/Vas3UXz/mn5K+xHADULMGCdivS84vYBEEKDKptmVRUyglBnBMYP0VAOIzEb2fhYOx zvrHl1KGxXPnL9S2PbWbe6jFt1DhIGeskR1/4n/52IRt2p6OSkegGkMrAEi7vImRWQha KwbPfh8+wq/EjaKO9AC7aWRpMBHAwQp6rFhc9RZ7DiN/8Q0imL42xfmk0yWa9lYf9hAq poeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=JKxqz9SX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm18si6176711edb.404.2021.06.17.12.44.53; Thu, 17 Jun 2021 12:45:22 -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=fail header.i=@nbd.name header.s=20160729 header.b=JKxqz9SX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233319AbhFQSBz (ORCPT + 99 others); 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