Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6406373iog; Thu, 23 Jun 2022 19:08:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1suJOmPgj1MkgdUePoeQ2cn2lsr8VdcDwNr71iK3fucLDdAzyz7BwvBtLxEbzjvJwuH1ZhE X-Received: by 2002:a63:710c:0:b0:40c:adcf:ce72 with SMTP id m12-20020a63710c000000b0040cadcfce72mr9784564pgc.310.1656036502591; Thu, 23 Jun 2022 19:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656036502; cv=none; d=google.com; s=arc-20160816; b=h/xCeR+ILXjaMZqmGt+Tu2zgedaHfehfkoUB6U+WHz2f7IyYlsu/Hc6nzP+Ai5IYJ7 Tp1OJZDjXxEzE70YSC1F7KoCGYA6HVCqBtiCwwGLLVEeIAxrF4so7rNFFaKacm5oUZef tNTvpXx9LsgxL8ePeXMLwUHZ1dc2MYDhivWJRwhiXqXV+nT0yetDeMaBbFwiX9bQ2vbf 4VlUWz/K4OrEaMxuEVk/zQBVGi8e88nax5IHqOkQrc44Dg/lgiWbGyzgZgJSqgARpw9d ifhWhf5AQ+Jm/cBoglpB75CQyTOCFeKoQmJUb2HrC3B4Mj0I78LQJ1SLeakJka86nk6K M3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=l9twQ1x614mIBqPjiXwhf6kRL8KFt9ovEOrE4OItonM=; b=gsxHig7wOKPf1Oa4ascndLqQ+g63T6hjuIrNvXx7HmRk3NqXr4w7K6a1WBSkfRctvH Ik5V18vAXnczTzy97FJro4dBKcTVngl2a+THI6TI4TKDHKKq0m8xxUIYCZvTJH8xEgRd GjZ1kp9bvI6UaNO12/bQzmlJ7EDskMA2vtHhWcRfQI6wrwFheqK4TLQ9JNiF6mDhLwIa 1pOt6umQpRpMoS7/lV+AACGHVkDdtM9wBC2UhnWRmc6ZurE/PJqqksnEyVFwuPZ7d/PV WCmVuN+7wt5TGD8JKR4cJzC/VzQ5FxwDmpsOwQvq2yPw16KULvpIW1fsaww/Uv1aSRur 0lDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NjKjfESt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a6552c1000000b0040d111eee3asi956215pgp.214.2022.06.23.19.08.06; Thu, 23 Jun 2022 19:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NjKjfESt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231366AbiFXB5o (ORCPT + 99 others); Thu, 23 Jun 2022 21:57:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbiFXB5m (ORCPT ); Thu, 23 Jun 2022 21:57:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5237260C76; Thu, 23 Jun 2022 18:57:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E4FA862023; Fri, 24 Jun 2022 01:57:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B392C3411D; Fri, 24 Jun 2022 01:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656035860; bh=A5G1y5zfAakBvev3o+XJTirP3qP3skGJx2wBFS2dMIw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NjKjfEStvKxSWdi9XBcvE5z2PoJQ+rRQOSMkMkbJY0GP0VoRTsPwg9uwXpmXN1cvd xU6FarBJ5y1fQR2qVqKLuGdOHOdhGQRQuJX9ctEO+u1izzWm6xBvbhiefSVZrCnoPX PilF/HnqBRc6tuVGYzt2xvXD2+Lxr6ZtOiEtedEtv9GmJEhWFkaX5rqDDGyxwjV4N8 wId5i2oWRkpJ5yRyitMGL4QJ6wWk3Am92+3kp8HX+9MjWEFXcvfYQACVljd0P8mwmj uwbSRHSLYlTYBy57r5Yaam5U1qLUZvo5XbLYt7E+Q9m2mcLXLDsC4m8Jf5AqATNa1O SNi52mAnS305Q== Date: Thu, 23 Jun 2022 18:57:30 -0700 From: Jakub Kicinski To: Xin Long Cc: Marcelo Ricardo Leitner , kernel test robot , Eric Dumazet , Shakeel Butt , Soheil Hassas Yeganeh , LKML , Linux Memory Management List , network dev , linux-s390@vger.kernel.org, mptcp@lists.linux.dev, "linux-sctp @ vger . kernel . org" , lkp@lists.01.org, kbuild test robot , Huang Ying , feng.tang@intel.com, zhengjun.xing@linux.intel.com, fengwei.yin@intel.com, Ying Xu Subject: Re: [net] 4890b686f4: netperf.Throughput_Mbps -69.4% regression Message-ID: <20220623185730.25b88096@kernel.org> In-Reply-To: References: <20220619150456.GB34471@xsang-OptiPlex-9020> <20220622172857.37db0d29@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Jun 2022 18:50:07 -0400 Xin Long wrote: > From the perf data, we can see __sk_mem_reduce_allocated() is the one > using CPU the most more than before, and mem_cgroup APIs are also > called in this function. It means the mem cgroup must be enabled in > the test env, which may explain why I couldn't reproduce it. > > The Commit 4890b686f4 ("net: keep sk->sk_forward_alloc as small as > possible") uses sk_mem_reclaim(checking reclaimable >= PAGE_SIZE) to > reclaim the memory, which is *more frequent* to call > __sk_mem_reduce_allocated() than before (checking reclaimable >= > SK_RECLAIM_THRESHOLD). It might be cheap when > mem_cgroup_sockets_enabled is false, but I'm not sure if it's still > cheap when mem_cgroup_sockets_enabled is true. > > I think SCTP netperf could trigger this, as the CPU is the bottleneck > for SCTP netperf testing, which is more sensitive to the extra > function calls than TCP. > > Can we re-run this testing without mem cgroup enabled? FWIW I defer to Eric, thanks a lot for double checking the report and digging in!