Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1024485ybj; Tue, 5 May 2020 11:36:52 -0700 (PDT) X-Google-Smtp-Source: APiQypIKK/lGjxBpY3B31XFKa91ObJnGPhKR4d1rhG5cfKDr9E3AAmN9+r1pG/mmgiBePWZWTC/B X-Received: by 2002:a50:d6d0:: with SMTP id l16mr4001238edj.317.1588703812729; Tue, 05 May 2020 11:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588703812; cv=none; d=google.com; s=arc-20160816; b=Y0ggxiBpUFfrXOP+yHBW3lTcB9fqkyrU9Bn3wchqKEYjOBSDQu5khNeyPJsH7F2qhC /FoBCJpvBcrh7mBkavr7C0cZ7dhizm3XWWaeRrqK5AGweQt00oEJFOk6F380dQzbjHQn 7cle4lIQa94lzWs9fmWXPKxIxbvM6OYIgcFfdViUmRFzM0XWBLH1ZAyswy7Rzmrsrnut PZXU1VaPA71e7zdzm7tNUnRFF3USg4i1RF0PjVjaE4xKo0VBD0sr3Xg4FBq/IE8h8EmD 6Q5KMI0blHUDudGzxFI5UOdMAY5P6H4DDhYqA5PF/NIOOTR4gCe/Z62Q4xrBkPMS3Q+/ PuJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:dkim-signature; bh=+yD817Ceo4htuXp5Qfj9nfPNfFFZZ68WXswqd/tAUZk=; b=MjpsBJZ35KgjficXxkkXElAsL5uSzOQOZG0sbuUieMWlTTbpT3SKZMBi/cE2XU0rMa a/PR74KZatOxryNXNWhTNN2j+DM7JjfpB69KnH6m/c6+z3f2O0eq2fjntvfXLYYIBYmI xLOLQLMhszoChKRdn9qE0woqYhdYdBT4PPQp5jM3vgE6rnaSIadYiBnOz1ukytTXorKX J3vo4MCcPtQn5g3KQoC9KvXDqEf9B6afSZHxekKr/T8j+yeHk4zpV0dh0C8Qjyk3Ns/p UHMz9ndXVfcm+Wp4GUOc0DLXZ4pEfjKxLOOktVxxSs/wBVZnqmcA0Plq/j8bkE7o1ARj piMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VJdZkGjv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz18si1602571ejb.112.2020.05.05.11.36.28; Tue, 05 May 2020 11:36:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=VJdZkGjv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728888AbgEESfF (ORCPT + 99 others); Tue, 5 May 2020 14:35:05 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:24477 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgEESfE (ORCPT ); Tue, 5 May 2020 14:35:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1588703704; x=1620239704; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=+yD817Ceo4htuXp5Qfj9nfPNfFFZZ68WXswqd/tAUZk=; b=VJdZkGjvMbGABSLpAovhfjBZA53Ec5JO42T0qSNBaMf5qjYtcUB9QErZ sJal/rPIktb7Hi3EfOGZmydMSaqwYXkbs93oCms3lxLQddsAlfsuR64s5 zNRDNGTdjqfkSspOHRLDq15h0wuca4tGY4aK+FZlkY9sXXiiEx7C/mOKl 8=; IronPort-SDR: RPQb8hctXlkWW7Jaw8MfFAq5p78DqW4wIQyRJJBG4unWZb9xCIXtjLUmx/w1+W1TBnEAY3FHlo 53I2fDpQ89pg== X-IronPort-AV: E=Sophos;i="5.73,356,1583193600"; d="scan'208";a="29008117" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1e-a70de69e.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 05 May 2020 18:34:51 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-a70de69e.us-east-1.amazon.com (Postfix) with ESMTPS id C5D02A2071; Tue, 5 May 2020 18:34:47 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 5 May 2020 18:34:46 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.162.200) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 5 May 2020 18:34:39 +0000 From: SeongJae Park To: "Paul E. McKenney" CC: SeongJae Park , Eric Dumazet , Eric Dumazet , David Miller , "Al Viro" , Jakub Kicinski , "Greg Kroah-Hartman" , , netdev , LKML , SeongJae Park , , , Subject: Re: Re: Re: Re: [PATCH net v2 0/2] Revert the 'socket_alloc' life cycle change Date: Tue, 5 May 2020 20:34:02 +0200 Message-ID: <20200505183402.2021-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200505181707.GJ2869@paulmck-ThinkPad-P72> (raw) MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.200] X-ClientProxiedBy: EX13D02UWB001.ant.amazon.com (10.43.161.240) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 May 2020 11:17:07 -0700 "Paul E. McKenney" wrote: > On Tue, May 05, 2020 at 07:56:05PM +0200, SeongJae Park wrote: > > On Tue, 5 May 2020 10:30:36 -0700 "Paul E. McKenney" wrote: > > > > > On Tue, May 05, 2020 at 07:05:53PM +0200, SeongJae Park wrote: > > > > On Tue, 5 May 2020 09:37:42 -0700 Eric Dumazet wrote: > > > > > > > > > > > > > > > > > > > On 5/5/20 9:31 AM, Eric Dumazet wrote: > > > > > > > > > > > > > > > > > > On 5/5/20 9:25 AM, Eric Dumazet wrote: > > > > > >> > > > > > >> > > > > > >> On 5/5/20 9:13 AM, SeongJae Park wrote: > > > > > >>> On Tue, 5 May 2020 09:00:44 -0700 Eric Dumazet wrote: > > > > > >>> > > > > > >>>> On Tue, May 5, 2020 at 8:47 AM SeongJae Park wrote: > > > > > >>>>> > > > > > >>>>> On Tue, 5 May 2020 08:20:50 -0700 Eric Dumazet wrote: > > > > > >>>>> > > > > > >>>>>> > > > > > >>>>>> > > > > > >>>>>> On 5/5/20 8:07 AM, SeongJae Park wrote: > > > > > >>>>>>> On Tue, 5 May 2020 07:53:39 -0700 Eric Dumazet wrote: > > > > > >>>>>>> > > > > > >>>>>> > > > > [...] > > > > > >> > > > > > >> I would ask Paul opinion on this issue, because we have many objects > > > > > >> being freed after RCU grace periods. > > > > > >> > > > > > >> If RCU subsystem can not keep-up, I guess other workloads will also suffer. > > > > > >> > > > > > >> Sure, we can revert patches there and there trying to work around the issue, > > > > > >> but for objects allocated from process context, we should not have these problems. > > > > > >> > > > > > > > > > > > > I wonder if simply adjusting rcu_divisor to 6 or 5 would help > > > > > > > > > > > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > > > > > index d9a49cd6065a20936edbda1b334136ab597cde52..fde833bac0f9f81e8536211b4dad6e7575c1219a 100644 > > > > > > --- a/kernel/rcu/tree.c > > > > > > +++ b/kernel/rcu/tree.c > > > > > > @@ -427,7 +427,7 @@ module_param(qovld, long, 0444); > > > > > > static ulong jiffies_till_first_fqs = ULONG_MAX; > > > > > > static ulong jiffies_till_next_fqs = ULONG_MAX; > > > > > > static bool rcu_kick_kthreads; > > > > > > -static int rcu_divisor = 7; > > > > > > +static int rcu_divisor = 6; > > > > > > module_param(rcu_divisor, int, 0644); > > > > > > > > > > > > /* Force an exit from rcu_do_batch() after 3 milliseconds. */ > > > > > > > > > > > > > > > > To be clear, you can adjust the value without building a new kernel. > > > > > > > > > > echo 6 >/sys/module/rcutree/parameters/rcu_divisor > > > > > > > > I tried value 6, 5, and 4, but none of those removed the problem. > > > > > > Thank you for checking this! > > > > > > Was your earlier discussion on long RCU readers speculation, or do you > > > have measurements? > > > > It was just a guess without any measurement or dedicated investigation. > > OK, another thing to check is the duration of the low-memory episode. > Does this duration exceed the RCU CPU stall warning time? (21 seconds > in mainline, 60 in many distros, but check rcupdate.rcu_cpu_stall_timeout > to be sure.) The benchmark takes about 36 seconds for 10,000 repeats of the test. The value on the test machine is 60. So the duration would not exceeded the warning time and therefore I haven't seen the warning message. As told in other mail, I will also adjust this value to shorter one. > > Also, any chance of a .config? Or at least the RCU portions? I am > guessing CONFIG_PREEMPT=n, for example. I guess this would be ok. # CONFIG_PREEMPT is not set # # RCU Subsystem # CONFIG_TREE_RCU=y CONFIG_RCU_EXPERT=y CONFIG_SRCU=y CONFIG_TREE_SRCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_RCU_FANOUT=64 CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FAST_NO_HZ is not set CONFIG_RCU_NOCB_CPU=y # end of RCU Subsystem Thanks, SeongJae Park