Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp671735yba; Fri, 26 Apr 2019 06:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2BNQwubOQW9uC6pomTE6RvhihrirIjSKtRstxcPfMUblTjoouc8BzUjD9jwnlCmGV9zS+ X-Received: by 2002:a65:6201:: with SMTP id d1mr8337913pgv.28.1556287062467; Fri, 26 Apr 2019 06:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556287062; cv=none; d=google.com; s=arc-20160816; b=vKqzKAB0JoGkevdkoD6AY2q38UjReK0CNlsts+wW2CdK4aEXfV/vmuhv2yH2TTfSJq lLQJ9Rntps/ub/wOs9721ybQrlfx41IDMhmlYWZxP3Z0RkuoW9kWcRWmUdgr1KfjUkSt 478agNT7li6vEW9ErBAb3D9aN1S6wb3kHrDdPeAW3rDwlAsnNYSwZB3O8sN9Hmktvt2S cbnckOKDjMK2DvB7uhqFixvcaDFtIQkPss4BRkK8dHZdRxZTgreIgTv1HAp8qpwSu4oi sYhIzI38jyfqCUQTnAfGZvsrDxBC9l2k6ItOqJaXa6TAAGXz3gaiHUfAtCeB5nqrLbPA SpHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:dkim-filter; bh=seNNnBP4wq4Jesn4GsKW3r5GAcSawNn7n9d7JfBPNJE=; b=Agcqg+U2qgMCBk2sSnKeZnEMKEh3jKanBqWufY1BTVACmKGk+bFl3viRTKmpM/Wj+8 GoDxLaoFC3GaIjJxwLvefdUntZUCjaMD2T951fg8jUwu/uPxstedx6p0U3cn3wQxQS5a HePRyFvFG2BH3T+aIEkxTleb4tb23tXPBQXRkgNlH9pPs42Rxdx3QL162jO/6haDQ2jo 0IUrhOBtfEaUnu8vi3mQNjRHkgMB5yJCTXRnfdet2+Ify3XGHlSoR6x712unCeufx9Y4 jW/p5rgHPl3u5YBxILodv1l36XYXesWJ8v4gCIkm2NrKqz7o43D97zrQrVvQtpxBgvaw edpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=BwwPax0P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si7499496pgq.468.2019.04.26.06.57.19; Fri, 26 Apr 2019 06:57:41 -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=pass header.i=@candelatech.com header.s=default header.b=BwwPax0P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbfDZN4c (ORCPT + 99 others); Fri, 26 Apr 2019 09:56:32 -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