From: "Martinez, Ricardo" <ricardo.martinez@linux.intel.com>
To: Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Ziyang Xuan <william.xuanziyang@huawei.com>
Cc: "Devegowda, Chandrashekar" <chandrashekar.devegowda@intel.com>,
"Intel Corporation" <linuxwwan@intel.com>,
chiranjeevi.rapolu@linux.intel.com,
"Haijun Liu (刘海军)" <haijun.liu@mediatek.com>,
"M Chetan Kumar" <m.chetan.kumar@linux.intel.com>,
"Loic Poulain" <loic.poulain@linaro.org>,
"David Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in spin_lock context
Date: Mon, 16 May 2022 13:57:00 -0700 [thread overview]
Message-ID: <0b90f4f6-6911-017b-6d37-50354003900e@linux.intel.com> (raw)
In-Reply-To: <CAHNKnsS0D8bRA5GY0xss2ZUCwY2HoLNMgeR0K4ecH-HfmdTefg@mail.gmail.com>
On 5/16/2022 1:36 PM, Sergey Ryazanov wrote:
> Hello Ziyang,
>
> On Sat, May 14, 2022 at 11:57 AM Ziyang Xuan
> <william.xuanziyang@huawei.com> wrote:
>> t7xx_cldma_clear_rxq() call t7xx_cldma_alloc_and_map_skb() in spin_lock
>> context, But __dev_alloc_skb() in t7xx_cldma_alloc_and_map_skb() uses
>> GFP_KERNEL, that will introduce scheduling factor in spin_lock context.
>>
>> Replace GFP_KERNEL with GFP_ATOMIC to fix it.
> Would not it will be more reliable to just rework
> t7xx_cldma_clear_rxq() to avoid calling t7xx_cldma_alloc_and_map_skb()
> under the spin lock instead of doing each allocation with GFP_ATOMIC?
> E.g. t7xx_cldma_gpd_rx_from_q() calls t7xx_cldma_alloc_and_map_skb()
> avoiding any lock holding.
t7xx_cldma_clear_rxq() is a helper for t7xx_cldma_clear_all_qs() which
is only called by t7xx_cldma_exception() after stopping CLDMA, so it
should be OK to remove the spin lock from t7xx_cldma_clear_rxq().
next prev parent reply other threads:[~2022-05-16 21:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 9:14 [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in spin_lock context Ziyang Xuan
2022-05-16 20:36 ` Sergey Ryazanov
2022-05-16 20:57 ` Martinez, Ricardo [this message]
2022-05-17 3:12 ` Ziyang Xuan (William)
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=0b90f4f6-6911-017b-6d37-50354003900e@linux.intel.com \
--to=ricardo.martinez@linux.intel.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haijun.liu@mediatek.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
--cc=william.xuanziyang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox