Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp639745yba; Fri, 26 Apr 2019 06:24:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDisKWnNDMGDVTUEVrVUrBfkvNNsCISZq4JzJDmrwDG0O3+3nuQdewmUkvjUxhYQeAGp3Y X-Received: by 2002:a65:6282:: with SMTP id f2mr21654706pgv.152.1556285052777; Fri, 26 Apr 2019 06:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556285052; cv=none; d=google.com; s=arc-20160816; b=LBDITjj+ZSluBj3UVSQaaZb+W7Eg+V5tP4DdQqmjhbDb8IHMlZh1zdc5kgeDA95bTE 6ovdn3LQXe4PPN2DDMvMuuKpDAk1yZXywYLJ1eMGIqDlEWA0gE2GcNCPYhV4Fn/fzFvb sGPOOX435jyPRi82id/9IWnbMev70XJ50w7Xn/7Mo/8Y9CgsbpNqroTJtsp/vnTXxr/O Ym9i+821qJjiBlI3BxOu7HIs/yzrDu7hG5k6TrjMmKheDxhyAWycpZdLtnuhxLmNJF46 tzodpuDxm0bPKj8eKg6BGMSb/wAOHB7NTr1fFCvnEwQruc47nMZL5ftT2/Zw2vRpajWh ybyw== 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=dS8ZU/JpGHXFJnds8W/ZhOyK6T0IGm7AiVsgTxnccrQ=; b=qC6TCXHPeYsoJ9mDM8zI5Z2QTYzYzOsKnc96+bfqI09wXa6hxFCDEeW9ME/ChN1n+f tIx46JMSSMaNe9N0mRUWO5Ig3iNFqj5W1+dyx1z4/D4kZ0/5wyGwvbOXy0a/m6ZFqRs6 KAZG8BZRdxtSqK1gZbbFjHDglYgbYTv5M5/MasYMxkz7lF8Fzbc8ZuirU+A/Za3WqgsV G+3MVJbf/vomg+PHfXiNt9mC0fbVMS9N9HS34z8DdEfjqQ2QgeuWKM7ejPX05aL5VZXq BnTewLfrfO70ygCDBzV96TQTMqJvh0sKBeW2+nk8yW9s0cMJ3yk8ihqUkls7pTcmt/4A U57g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=DIzwemiS; 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 l1si25327121pff.206.2019.04.26.06.23.49; Fri, 26 Apr 2019 06:24:12 -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=DIzwemiS; 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 S1726303AbfDZNVd (ORCPT + 99 others); Fri, 26 Apr 2019 09:21:33 -0400 Received: from [208.74.158.174] ([208.74.158.174]:54314 "EHLO mail3.candelatech.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1726069AbfDZNVd (ORCPT ); Fri, 26 Apr 2019 09:21:33 -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 45DB313C283; Fri, 26 Apr 2019 06:21:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 45DB313C283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1556284892; bh=BFTyDJC4GQT0Hq8AnB5sORQ/jFWqAvTeIusQfE0Hikg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=DIzwemiSugt+JQFLHmqnh/AfwxG3wzQcjWdfWblVIQLkgarBM/n6Vups3Yn1Fd15Q 506zNlVqflBalsQa8yCK+4UqFnF6zMLyaqq/Bx9LJrkvotJSGpE6dhlZv/BSKI25T1 l9OV6ZKQHhuzE6eZUJitDvgI17GU5xHle/dgP7H0= Subject: Re: [PATCHv2] ath10k: Add wrapper function to ath10k debug To: Venkateswara Naralasetty , ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Kan Yan References: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> From: Ben Greear Organization: Candela Technologies Message-ID: Date: Fri, 26 Apr 2019 06:21:31 -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: <1556283505-29539-1-git-send-email-vnaralas@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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; Do you still need the check later in this method: if (ath10k_debug_mask & mask) since you already checked in the ath10k_dbg() macro? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com