Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp660784yba; Fri, 26 Apr 2019 06:46:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEkohMTxgtIs4XlnrVq23jwe4g8XydDfOetq6xKFCiWapJ+W7v5F0RxybsIYqVDqjxhrse X-Received: by 2002:a17:902:e208:: with SMTP id ce8mr31853657plb.99.1556286378969; Fri, 26 Apr 2019 06:46:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556286378; cv=none; d=google.com; s=arc-20160816; b=pV9XHwxJUQCQkBMqP/X3uJrEGrb1ojkUpZ/ij9pXxiKE+LYBhc82f/iC6JvzMq4ZRO T6HQvuYIsow1ktKId6SYFkJ+BpySu49GfcOnrqMHPujfxufooHK6Rae1rf1qPpXby+WA QTrsdNXcMpdL/qtO/bITI0jQke4QT6vfU0R5r3DVtFS/xYo1RR2EBwh1LStjE3mIRpLt UtxAHfUZRg3MpIrGf9McvCx4OhJ2qRrJrG1K5kRyt5U2164XUi+/4uhpm6CYVteahV47 fYYaBXcEUewatgqmz507QI2YMxeo0BbiLhCoRXB1ANDLQCEg38cnDS/U9/FvWFlMSnii v8kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:cc:to:from:thread-topic:subject:dkim-signature; bh=yylZrDNLAO1JGYTkO9b9slzIHo/Rvlz7zDW71OVPF0g=; b=Crk+XifvbUprCI27Be7hHDBFvjgzOhv+8SO4McpxwkMyCNQ3YNEyFCsk4iViiU21XL Dn22evt488oxqhGmKO2uvoarWIx6DGUkt0eQ1Uh3bOxzK72SpdZTKgGl9fp12w62J0Ka otD5fuoJyL11JzlF/WPiTdO6UoLtDdT8UE7H+UMTRXCQReDjFDho17cPMZSVuYoPXOFj kMhSv+BCnPlUbm7IUALUbtSf9ZNLIltcK4ZWdDdzj8JsGR1OzvqnTl9gj45Sn/dAY1Q+ cuB1hgImUeuZgv30u/77k4tyi6vnLaVAZA3H2nvRlOIApfxo/Pqtm3FoNldyMcEByIwz gpww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@qti.qualcomm.com header.s=qcdkim header.b=HLkX+Ol6; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si18183332plq.240.2019.04.26.06.45.51; Fri, 26 Apr 2019 06:46:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@qti.qualcomm.com header.s=qcdkim header.b=HLkX+Ol6; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726206AbfDZNpF (ORCPT + 99 others); Fri, 26 Apr 2019 09:45:05 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:12763 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbfDZNpF (ORCPT ); Fri, 26 Apr 2019 09:45:05 -0400 X-Greylist: delayed 367 seconds by postgrey-1.27 at vger.kernel.org; Fri, 26 Apr 2019 09:45:05 EDT DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1556286304; x=1587822304; h=from:to:cc:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=FxXewssfjh16gy3kH0I7m4ychNwk0S1CpyahnqM8e5g=; b=HLkX+Ol6V+t1R/bVBMJWWHNyzjItF96v1omIUXklMBUqXIy4/AsqjZzO WOEOkQ1MTgfPhcT+aWx7Tc8L30ihZSlcTh5p+4GBoPmnrIS58Qoaq+3B/ LQaPNVD6WkuNdSgBY6TNb1m1V3+bjlRDoie8KwGzhx//7k9Rwv4fIZ233 Q=; X-IronPort-AV: E=Sophos;i="5.60,397,1549958400"; d="scan'208";a="44796905" Subject: RE: [PATCHv2] ath10k: Add wrapper function to ath10k debug Thread-Topic: [PATCHv2] ath10k: Add wrapper function to ath10k debug Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 26 Apr 2019 06:38:57 -0700 Received: from nasanexm01c.na.qualcomm.com ([10.85.0.83]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/AES256-SHA; 26 Apr 2019 06:38:57 -0700 Received: from APSANEXR01B.ap.qualcomm.com (10.85.0.37) by NASANEXM01C.na.qualcomm.com (10.85.0.83) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 26 Apr 2019 06:38:57 -0700 Received: from APSANEXR01F.ap.qualcomm.com (10.85.0.39) by APSANEXR01B.ap.qualcomm.com (10.85.0.37) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 26 Apr 2019 06:38:54 -0700 Received: from APSANEXR01F.ap.qualcomm.com ([10.85.0.39]) by APSANEXR01F.ap.qualcomm.com ([10.85.0.39]) with mapi id 15.00.1395.000; Fri, 26 Apr 2019 06:38:53 -0700 From: Venkateswara Naralasetty To: Ben Greear , Venkateswara Naralasetty , "ath10k@lists.infradead.org" CC: Kan Yan , "linux-wireless@vger.kernel.org" Thread-Index: AQHU/DMHYOGTaL3nPkmlHm5n3SU94aZObvhA Date: Fri, 26 Apr 2019 13:38:53 +0000 Message-ID: References: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.80.80.8] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: ath10k On Behalf Of Ben > Greear > Sent: Friday, April 26, 2019 6:52 PM > To: Venkateswara Naralasetty ; > ath10k@lists.infradead.org > Cc: Kan Yan ; linux-wireless@vger.kernel.org > Subject: [EXT] Re: [PATCHv2] ath10k: Add wrapper function to ath10k debug >=20 > On 4/26/19 5:58 AM, Venkateswara Naralasetty wrote: > > ath10k_dbg() is called in ath10k_process_rx() with huge set of > > arguments which is causing CPU overhead even when debug_mask is not > set. > > Good improvement was observed in the receive side performance when > > call to ath10k_dbg() is avoided in the RX path. > > > > Since currently all debug messages are sent via tracing > > infrastructure, we cannot entirely avoid calling ath10k_dbg. > > Therefore, call to > > ath10k_dbg() is made conditional based on tracing config in the driver. > > > > Trasmit performance remains unchanged with this patch; below are some > > experimental results with this patch and tracing disabled. > > > > mesh mode: > > > > w/o this patch with this patch > > Traffic TP CPU Usage TP CPU usage > > > > TCP 840Mbps 76.53% 960Mbps 78.14% > > UDP 1030Mbps 74.58% 1132Mbps 74.31% > > > > Infra mode: > > > > w/o this patch with this patch > > Traffic TP CPU Usage TP CPU usage > > > > TCP Rx 1241Mbps 80.89% 1270Mbps 73.50% > > UDP Rx 1433Mbps 81.77% 1472Mbps 72.80% > > > > Tested platform : IPQ8064 > > hardware used : QCA9984 > > firmware ver : ver 10.4-3.5.3-00057 > > > > Signed-off-by: Kan Yan > > Signed-off-by: Venkateswara Naralasetty > > --- > > v2: > > * changed trace enabled check from > IS_ENABLED(CONFIG_ATH10K_TRACING) > > * to trace_ath10k_log_dbg_enabled(). > > > > drivers/net/wireless/ath/ath10k/core.c | 2 ++ > > drivers/net/wireless/ath/ath10k/debug.c | 8 ++++---- > > drivers/net/wireless/ath/ath10k/debug.h | 22 ++++++++++++++++------ > > drivers/net/wireless/ath/ath10k/trace.c | 1 + > > drivers/net/wireless/ath/ath10k/trace.h | 6 +++++- > > 5 files changed, 28 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > > b/drivers/net/wireless/ath/ath10k/core.c > > index cfd7bb2..ab709bf 100644 > > --- a/drivers/net/wireless/ath/ath10k/core.c > > +++ b/drivers/net/wireless/ath/ath10k/core.c > > @@ -26,6 +26,8 @@ > > #include "coredump.h" > > > > unsigned int ath10k_debug_mask; > > +EXPORT_SYMBOL(ath10k_debug_mask); > > + > > static unsigned int ath10k_cryptmode_param; > > static bool uart_print; > > static bool skip_otp; > > diff --git a/drivers/net/wireless/ath/ath10k/debug.c > > b/drivers/net/wireless/ath/ath10k/debug.c > > index 32d967a..1b63929 100644 > > --- a/drivers/net/wireless/ath/ath10k/debug.c > > +++ b/drivers/net/wireless/ath/ath10k/debug.c > > @@ -2620,8 +2620,8 @@ void ath10k_debug_unregister(struct ath10k *ar) > > #endif /* CONFIG_ATH10K_DEBUGFS */ > > > > #ifdef CONFIG_ATH10K_DEBUG > > -void ath10k_dbg(struct ath10k *ar, enum ath10k_debug_mask mask, > > - const char *fmt, ...) > > +void __ath10k_dbg(struct ath10k *ar, enum ath10k_debug_mask mask, > > + const char *fmt, ...) > > { > > struct va_format vaf; > > va_list args; >=20 > Do you still need the check later in this method: >=20 > if (ath10k_debug_mask & mask) >=20 > since you already checked in the ath10k_dbg() macro? Yes, we need this check. Otherwise all debug messages will be printed even without any debug mask se= t in case of tracing enabled.=20 >=20 > Thanks, > Ben >=20 >=20 > -- > Ben Greear > Candela Technologies Inc http://www.candelatech.com >=20 >=20 > _______________________________________________ > ath10k mailing list > ath10k@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/ath10k