All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: <ath12k-devel-internal@qti.qualcomm.com>,
	 Jeff Johnson <jjohnson@kernel.org>,
	 Nathan Chancellor <nathan@kernel.org>,
	 Nick Desaulniers <ndesaulniers@google.com>,
	 Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	 Arnd Bergmann <arnd@kernel.org>,
	<linux-wireless@vger.kernel.org>,  <ath12k@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,  <llvm@lists.linux.dev>
Subject: Re: [PATCH] wifi: ath12k: mark QMI driver event helpers as noinline
Date: Thu, 31 Oct 2024 16:04:53 +0200	[thread overview]
Message-ID: <87bjz0fjwa.fsf@kernel.org> (raw)
In-Reply-To: <20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com> (Jeff Johnson's message of "Mon, 28 Oct 2024 07:08:40 -0700")

Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> As described in [1], compiling the ath12k driver using clang with
> KASAN enabled warns about some functions with excessive stack usage,
> with the worst case being:
>
> drivers/net/wireless/ath/ath12k/qmi.c:3546:13: warning: stack frame size (2456) exceeds limit (1024) in 'ath12k_qmi_driver_event_work' [-Wframe-larger-than]
>
> Nathan [2] highlighted work done by Arnd [3] to address similar
> issues in other portions of the kernel.
>
> ath12k_qmi_driver_event_work() itself is a pretty lightweight
> function, but it dispatches to several other functions which do the
> real work:
> ath12k_qmi_driver_event_work()
> 	ath12k_qmi_event_server_arrive()
> 		ath12k_qmi_host_cap_send()
> 	ath12k_qmi_event_mem_request()
> 		ath12k_qmi_respond_fw_mem_request()
> 	ath12k_qmi_event_load_bdf()
> 		ath12k_qmi_request_target_cap()
> 		ath12k_qmi_load_bdf_qmi()
> 		ath12k_qmi_wlanfw_m3_info_send()
>
> Mark all of those underlying functions as 'noinline_for_stack' to
> prevent them from being inlined in ath12k_qmi_driver_event_work(),
> thereby eliminating the excessive stack usage.
>
> Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1]
> Link: https://msgid.link/20241025223321.GA3647469@thelio-3990X # [2]
> Link: https://lore.kernel.org/all/?q=f:arnd@kernel.org+Wframe-larger-than # [3]
> Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>

Acked-by: Kalle Valo <kvalo@kernel.org>

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


  reply	other threads:[~2024-10-31 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 14:08 [PATCH] wifi: ath12k: mark QMI driver event helpers as noinline Jeff Johnson
2024-10-31 14:04 ` Kalle Valo [this message]
2024-11-04 15:43 ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bjz0fjwa.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=arnd@kernel.org \
    --cc=ath12k-devel-internal@qti.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=quic_jjohnson@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.