Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp661619yba; Fri, 26 Apr 2019 06:47:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqw92Z1dWj4BrmMvDiIPAkWfvBbN6P5ZqJ4qnCiqkk9pqRI8ZiEF0Yt7X3rvMnDxa8R5qnJ+ X-Received: by 2002:a65:625a:: with SMTP id q26mr1342808pgv.68.1556286433523; Fri, 26 Apr 2019 06:47:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556286433; cv=none; d=google.com; s=arc-20160816; b=OCq1KPI8wfIG+ZfKV3ReprNl4Io063C0l0lughxVMHa2JK45Dh81t8HKRkZfp7BHyS oCQd93PSMXSLJDB5PXEx6VLvpn0AigT0idYmUH/k1N5Tijp2Yz19iBVbdkCRgNhp39G3 R9tGlR4CYbF76CrP4pE+e1DWzUFxAsjGQTmJAWAerA6Y+DqJjrxqcdpwwZPtF/UZCvbl 5GcmfZt971LN5X/80yobhZTyHldmwKSUSST9SrlE8GfzrkZVqHFYmH9AevoOpY8M0BH6 qplEZw14IlpT//yF5kvT6spH6Cl4w2zYvDxVkRrlSB1RnlSJI1MWY7/p+ALMvyhuoIPK 29ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1ux5ikJOCxQmKgLDE3SOWwTg3wjwO+m8Zs+TtIBn8U0=; b=Cns/TN/zaRhGORiVONO28jvJKMVxo2slQ+Q0xVKUEMVodvYPyaGnQAE3CtH4w0usnF 5CNwMI2NOdho/l44Ah4SFlUu3pEgmUQjr3krGmVU8n8u2FgDQDGuEbokA0zuLMJaE6UE IpIACy+VM1irqbJL2821EChrnZB0pcQZ8woLUn3dESWRyMwY1vDHsBZ+enjrX8F3Bk54 8lTI9cCkdKFkjkBJ9h0d3xE1qECWVtNfspP2YM3N1LmHmOnfsnA0kp0iw5aQvnBSkEdN a9iDTNI2l7VI4/WTbvW3a2z9j3eIGafgz9OBJbpxWWD6pMdrFR4Vuoeb0eNQwxt+s7i6 vOTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IRdqI1ub; 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=QUARANTINE dis=NONE) header.from=gmail.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.46.58; Fri, 26 Apr 2019 06:47:13 -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=@gmail.com header.s=20161025 header.b=IRdqI1ub; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbfDZNpM (ORCPT + 99 others); Fri, 26 Apr 2019 09:45:12 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:45210 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbfDZNpM (ORCPT ); Fri, 26 Apr 2019 09:45:12 -0400 Received: by mail-qt1-f196.google.com with SMTP id b3so4051258qtc.12 for ; Fri, 26 Apr 2019 06:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1ux5ikJOCxQmKgLDE3SOWwTg3wjwO+m8Zs+TtIBn8U0=; b=IRdqI1ub7TCPzDPJuueMR2jzrwDnZ5crcnVOoYw7SY1TW63RWfFGp6R9i7Ynem7rxq P398xi3Jr6GarwN03PBCGkGwqRQHRX1pzJiHYT+nA3HhJz0TSF3V5DX4tcClTA560ooC g/vhjaIwK6Ln38H45z41A9ed4mHlOlzN8XMK74ONN7LXosIDV3lxifXpF0PaJw0RdO6M ULzGizjX81je2PAZgIvXTiLsUBILhIo4FNQKyW95tOqESVrgOhggXkQhWTEOc8uymB4e 6bwNc8reB3kgQxerVxaRt1XLnoAiErw79jj3xL25x9oyocTGPjElMri2lyohmREimLMr 1ReQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1ux5ikJOCxQmKgLDE3SOWwTg3wjwO+m8Zs+TtIBn8U0=; b=WFDQQ2Cd1ifJaY2Awah+bWplwdO7m6rL9rgz8I/Ax25jFBnwqcvaIMI4fl7yTPY3q5 S/SUxha9eW6Z4khnO9IOQK2wqbFxfvAACI2O0VgyjXXNGMRE1ibt+ObFCesVnN0vvSCd vfro8EjeCDTNCEktfsPYykY1D2zg5YBm/qiBGh+UEumTh54xdmWtx5Ry4wzTfBEsM/Hv lDXeZio7fT1fcrseR4ImRUMce2rZaVi1m7DsTr/UHLgdRjCf733khRoXJAnMVuShpd/m zIz1ShMc5SrCSh1cUXadNf7z0eOGVaRkKr1Git6WmYAS5EhAVrbEbfwG6kZGg9ErQfh8 XNVQ== X-Gm-Message-State: APjAAAVVV8i1P2GIDXx94yor2/of2t2EYEEAkTL4V1DRGBx5Plm9Vhr5 9ilaqJbv/O8B6RebsVYLY0NwxyLodpWDMHpEJVQ= X-Received: by 2002:a0c:9d02:: with SMTP id m2mr26830605qvf.32.1556286311398; Fri, 26 Apr 2019 06:45:11 -0700 (PDT) MIME-Version: 1.0 References: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> In-Reply-To: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> From: =?UTF-8?Q?Micha=C5=82_Kazior?= Date: Fri, 26 Apr 2019 15:44:59 +0200 Message-ID: Subject: Re: [PATCHv2] ath10k: Add wrapper function to ath10k debug To: Venkateswara Naralasetty Cc: ath10k@lists.infradead.org, linux-wireless , Kan Yan Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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. Michal