From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH] netfilter: avoid stalls in nf_ct_alloc_hashtable Date: Tue, 24 Jul 2018 12:58:19 +0300 Message-ID: <45afb63e-bd0c-83a7-4f52-7890750dffd0@cogentembedded.com> References: <1532416745-9926-1-git-send-email-lirongqing@baidu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Li RongQing , netdev@vger.kernel.org, pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de Return-path: Received: from mail-lf1-f67.google.com ([209.85.167.67]:40345 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388302AbeGXLEC (ORCPT ); Tue, 24 Jul 2018 07:04:02 -0400 Received: by mail-lf1-f67.google.com with SMTP id y200-v6so2557209lfd.7 for ; Tue, 24 Jul 2018 02:58:20 -0700 (PDT) In-Reply-To: <1532416745-9926-1-git-send-email-lirongqing@baidu.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: Hello! On 7/24/2018 10:19 AM, Li RongQing wrote: > when system forks a process with CLONE_NEWNET flag under the > high memory pressure, it will trigger memory reclaim and stall > for a long time because nf_ct_alloc_hashtable need to allocate > high-order memory at that time. The calltrace as below: > > delay_tsc > __delay > _raw_spin_lock > _spin_lock > mmu_shrink > shrink_slab > zone_reclaim > get_page_from_freelist > __alloc_pages_nodemask > alloc_pages_current > __get_free_pages > nf_ct_alloc_hashtable > nf_conntrack_init_net > setup_net > copy_net_ns > create_new_namespaces > copy_namespaces > copy_process > do_fork > sys_clone > stub_clone > __clone > > not use the directly memory reclaim flag to avoid stall You mean "do not use"? > Signed-off-by: Ni Xun > Signed-off-by: Zhang Yu > Signed-off-by: Wang Li > Signed-off-by: Li RongQing [...] MBR, Sergei