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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED 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 C9275C43219 for ; Fri, 26 Apr 2019 13:56:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 998B42077B for ; Fri, 26 Apr 2019 13:56:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b="BwwPax0P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbfDZN4d (ORCPT ); Fri, 26 Apr 2019 09:56:33 -0400 Received: from [208.74.158.174] ([208.74.158.174]:55288 "EHLO mail3.candelatech.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfDZN4c (ORCPT ); Fri, 26 Apr 2019 09:56:32 -0400 Received: from [192.168.100.195] (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 106D013C283; Fri, 26 Apr 2019 06:56:31 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 106D013C283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1556286991; bh=176ZJmXrE5Ffios5h1F6VNQEhzbC3d6Sn0napwsYuYo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BwwPax0PQKjUNkKDE1cMXq2PMFm35XRnbqn+xhNlO39JfvPFnRzo70bq909ZytqNW XM+gylcZ3CfffIbFBmwLUEkuTxvS55Yxqw5ssSOa6cUiO4fFp+zMjbLym8dkDm9l8N lfQRxhMCx5TmFMvFTGSVdxFXPDpoFlq39687ryLw= Subject: Re: [PATCHv2] ath10k: Add wrapper function to ath10k debug To: =?UTF-8?Q?Micha=c5=82_Kazior?= , Venkateswara Naralasetty Cc: ath10k@lists.infradead.org, linux-wireless , Kan Yan References: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> From: Ben Greear Organization: Candela Technologies Message-ID: <52f8d2ff-9bd0-d456-e29a-c60b99a1eb8a@candelatech.com> Date: Fri, 26 Apr 2019 06:56:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 4/26/19 6:44 AM, MichaƂ Kazior wrote: > On Fri, 26 Apr 2019 at 14:58, 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. > [...] > >> +/* Avoid calling __ath10k_dbg() if debug_mask is not set and tracing >> + * disabled. >> + */ >> +#define ath10k_dbg(ar, dbg_mask, fmt, ...) \ >> +do { \ >> + if ((ath10k_debug_mask & dbg_mask) || \ >> + trace_ath10k_log_dbg_enabled()) \ >> + __ath10k_dbg(ar, dbg_mask, fmt, ##__VA_ARGS__); \ >> +} while (0) > > Did you consider using jump labels (see include/linux/jump_label.h)? > It's what tracing uses under the hood. I wonder if you could squeeze > out a bit more performance with that? I guess you'd need to add > `struct static_key ath10k_dbg_mask_keys[ATH10K_DBG_MAX]` and re-do > ath10k_debug_mask enum a bit. Maybe first test with debugging just compiled out to see if there is still any significant overhead with this new patch applied? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from [208.74.158.174] (helo=mail3.candelatech.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hK1L5-0005QJ-Mq for ath10k@lists.infradead.org; Fri, 26 Apr 2019 13:56:33 +0000 Subject: Re: [PATCHv2] ath10k: Add wrapper function to ath10k debug References: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> From: Ben Greear Message-ID: <52f8d2ff-9bd0-d456-e29a-c60b99a1eb8a@candelatech.com> Date: Fri, 26 Apr 2019 06:56:30 -0700 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: =?UTF-8?Q?Micha=c5=82_Kazior?= , Venkateswara Naralasetty Cc: Kan Yan , linux-wireless , ath10k@lists.infradead.org T24gNC8yNi8xOSA2OjQ0IEFNLCBNaWNoYcWCIEthemlvciB3cm90ZToKPiBPbiBGcmksIDI2IEFw ciAyMDE5IGF0IDE0OjU4LCBWZW5rYXRlc3dhcmEgTmFyYWxhc2V0dHkKPiA8dm5hcmFsYXNAY29k ZWF1cm9yYS5vcmc+IHdyb3RlOgo+Pgo+PiBhdGgxMGtfZGJnKCkgaXMgY2FsbGVkIGluIGF0aDEw a19wcm9jZXNzX3J4KCkgd2l0aCBodWdlIHNldCBvZiBhcmd1bWVudHMKPj4gd2hpY2ggaXMgY2F1 c2luZyBDUFUgb3ZlcmhlYWQgZXZlbiB3aGVuIGRlYnVnX21hc2sgaXMgbm90IHNldC4KPj4gR29v Z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