[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b90f4f6-6911-017b-6d37-50354003900e@linux.intel.com>
Date: Mon, 16 May 2022 13:57:00 -0700
From: "Martinez, Ricardo" <ricardo.martinez@...ux.intel.com>
To: Sergey Ryazanov <ryazanov.s.a@...il.com>,
Ziyang Xuan <william.xuanziyang@...wei.com>
Cc: "Devegowda, Chandrashekar" <chandrashekar.devegowda@...el.com>,
Intel Corporation <linuxwwan@...el.com>,
chiranjeevi.rapolu@...ux.intel.com,
Haijun Liu (刘海军)
<haijun.liu@...iatek.com>,
M Chetan Kumar <m.chetan.kumar@...ux.intel.com>,
Loic Poulain <loic.poulain@...aro.org>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: wwan: t7xx: fix GFP_KERNEL usage in
spin_lock context
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@...wei.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().
Powered by blists - more mailing lists