[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180803163716.7ut6zdlwoyswha6t@salvia>
Date: Fri, 3 Aug 2018 18:37:16 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Li RongQing <lirongqing@...du.com>
Cc: netdev@...r.kernel.org, kadlec@...ckhole.kfki.hu, fw@...len.de,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
edumazet@...gle.com
Subject: Re: [PATCH][v3] netfilter: use kvmalloc_array to allocate memory for
hashtable
On Wed, Jul 25, 2018 at 03:52:13PM +0800, Li RongQing wrote:
> nf_ct_alloc_hashtable is used to allocate memory for conntrack,
> NAT bysrc and expectation hashtable. Assuming 64k bucket size,
> which means 7th order page allocation, __get_free_pages, called
> by nf_ct_alloc_hashtable, will trigger the direct memory reclaim
> and stall for a long time, when system has lots of memory stress
>
> so replace combination of __get_free_pages and vzalloc with
> kvmalloc_array, which provides a overflow check and a fallback
> if no high order memory is available, and do not retry to reclaim
> memory, reduce stall
Applied, thanks.
Powered by blists - more mailing lists