From: Kalle Valo <kvalo@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: 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>, <ath11k@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <llvm@lists.linux.dev>
Subject: Re: [PATCH 1/3] wifi: ath11k: mark some QMI driver event helpers as noinline
Date: Thu, 21 Nov 2024 13:20:01 +0200 [thread overview]
Message-ID: <87y11cx28u.fsf@kernel.org> (raw)
In-Reply-To: <20241119-ath11k-noinline-v1-1-4ec0a8aa30b2@quicinc.com> (Jeff Johnson's message of "Tue, 19 Nov 2024 07:47:38 -0800")
Jeff Johnson <quic_jjohnson@quicinc.com> writes:
> When compiling the ath11k driver using clang with KASAN enabled, the
> following warning is observed:
>
> drivers/net/wireless/ath/ath11k/qmi.c:3199:13: warning: stack frame size (1560) exceeds limit (1024) in 'ath11k_qmi_driver_event_work' [-Wframe-larger-than]
>
> This is similar to the issue found in ath12k/qmi.c that was discussed
> in [1] and fixed with [2]. The issue is that clang inlining can
> explode stack usage.
>
> Just as in ath12k, ath11k_qmi_driver_event_work() itself is a pretty
> lightweight function, but it dispatches to several other functions
> which do the real work:
>
> ath11k_qmi_driver_event_work()
> ath11k_qmi_event_server_arrive()
> ath11k_qmi_fw_ind_register_send()
> ath11k_qmi_host_cap_send() *
> ath11k_qmi_event_load_bdf()
> ath11k_qmi_event_mem_request()
> ath11k_qmi_respond_fw_mem_request()
> ath11k_qmi_event_load_bdf()
> ath11k_qmi_wlanfw_m3_info_send() *
> ath11k_qmi_m3_load()
> ath11k_qmi_process_coldboot_calibration()
>
> Of these, the two marked with * have non-trivial stack usage. Mark
> those functions as 'noinline_for_stack' to prevent them from being
> inlined in ath12k_qmi_driver_event_work(), thereby eliminating the
> excessive stack usage.
>
> Note that this approach is a bit more "surgical" than the ath12k
> approach as only the two functions with the largest stack usage are
> modified.
>
> Link: https://msgid.link/bc214795-1c51-4cb7-922f-67d6ef98bff2@quicinc.com # [1]
> Link: https://patch.msgid.link/20241028-ath12k_qmi_driver_event_work-v1-1-0d532eb593fa@quicinc.com # [2]
> 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
next prev parent reply other threads:[~2024-11-21 11:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 15:47 [PATCH 0/3] wifi: ath11k: Fix clang+KASAN stack frame size warnings Jeff Johnson
2024-11-19 15:47 ` [PATCH 1/3] wifi: ath11k: mark some QMI driver event helpers as noinline Jeff Johnson
2024-11-21 11:20 ` Kalle Valo [this message]
2024-11-19 15:47 ` [PATCH 2/3] wifi: ath11k: mark ath11k_dp_rx_mon_mpdu_pop() " Jeff Johnson
2024-11-21 11:20 ` Kalle Valo
2024-11-19 15:47 ` [PATCH 3/3] wifi: ath11k: mark ath11k_wow_convert_8023_to_80211() " Jeff Johnson
2024-11-21 11:20 ` Kalle Valo
2024-11-21 16:12 ` [PATCH 0/3] wifi: ath11k: Fix clang+KASAN stack frame size warnings 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=87y11cx28u.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=arnd@kernel.org \
--cc=ath11k@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.