[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8216dee8-5e52-421e-026a-4c75d654be54@gmail.com>
Date: Mon, 9 Apr 2018 07:42:20 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jia-Ju Bai <baijiaju1990@...il.com>, gerrit@....abdn.ac.uk,
davem@...emloft.net
Cc: dccp@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: dccp: Replace GFP_ATOMIC with GFP_KERNEL in
dccp_init
On 04/09/2018 07:10 AM, Jia-Ju Bai wrote:
> dccp_init() is never called in atomic context.
> This function is only set as a parameter of module_init().
>
> Despite never getting called from atomic context,
> dccp_init() calls __get_free_pages() with GFP_ATOMIC,
> which waits busily for allocation.
What do you mean by "waits busily" ?
GFP_ATOMIC does not sleep, does not wait.
> GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
> to avoid busy waiting and improve the possibility of sucessful allocation.
>
> This is found by a static analysis tool named DCNS written by myself.
> And I also manually check it.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
> ---
Powered by blists - more mailing lists