From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB2BC433EF for ; Mon, 23 May 2022 04:48:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F7636B0005; Mon, 23 May 2022 00:48:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A8996B0006; Mon, 23 May 2022 00:48:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED9F96B0007; Mon, 23 May 2022 00:48:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id DEFBF6B0005 for ; Mon, 23 May 2022 00:48:22 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B67F134969 for ; Mon, 23 May 2022 04:48:22 +0000 (UTC) X-FDA: 79495776444.20.4893690 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf10.hostedemail.com (Postfix) with ESMTP id 8D9E1C0013 for ; Mon, 23 May 2022 04:47:47 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 30684B80EAD; Mon, 23 May 2022 04:48:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8F39C385AA; Mon, 23 May 2022 04:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653281299; bh=UAsQaM3XapPuVS8owCcWhOqf2ldnFQUOPTmA49wofLw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=hKBgwlySIzKch9x8LZ086v01hxYtPmJ++Xy69xLtC6JNIArX6eTE+GpsIcSDWoaV6 +/4lok4Z4/LJbdFAHGnHBOC3u83i6dIcKS/iG33d08PDn3zV7lzlcxV+YAiJJJfxFF Pn2mjfWGqa601qXuq/F8F1SDgXCbxLb0NMDf44cjAKYABJt17RNkV3+P+89KJtJTrJ xTRbHD+ZBGfxZZqE2tHizQ2G7tY8VWiTlVkSTpqljdgRwo9FVRE/yUGWvU0UliML+8 HT7pzzeb3FvZLkKlQ/NU0X+iLZWO8HmaowwfHcf1fai6TunBVlKt/qOFMe9RJRm4Rn WxIKWP8Er6cZg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 8AE4D5C033A; Sun, 22 May 2022 21:48:18 -0700 (PDT) Date: Sun, 22 May 2022 21:48:18 -0700 From: "Paul E. McKenney" To: Stefan Wahren Cc: Marcelo Tosatti , Andrew Morton , Nicolas Saenz Julienne , Borislav Petkov , Minchan Kim , Matthew Wilcox , Mel Gorman , Juri Lelli , Thomas Gleixner , Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linux ARM , Phil Elwell , regressions@lists.linux.dev, riel@surriel.com, viro@zeniv.linux.org.uk Subject: Re: vchiq: Performance regression since 5.18-rc1 Message-ID: <20220523044818.GS1790663@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <77d6d498-7dd9-03eb-60f2-d7e682bb1b20@i2se.com> <20220521234616.GO1790663@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hKBgwlyS; spf=pass (imf10.hostedemail.com: domain of "SRS0=uRPJ=V7=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=uRPJ=V7=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org"; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Stat-Signature: rz354n1m9chbyhjcwh4si58du5rfwzr1 X-Rspamd-Queue-Id: 8D9E1C0013 X-Rspamd-Server: rspam01 X-HE-Tag: 1653281267-182880 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, May 22, 2022 at 05:11:36PM +0200, Stefan Wahren wrote: > Hi Paul, > > Am 22.05.22 um 01:46 schrieb Paul E. McKenney: > > On Sun, May 22, 2022 at 01:22:00AM +0200, Stefan Wahren wrote: > > > Hi, > > > > > > while testing the staging/vc04_services/interface/vchiq_arm driver with my > > > Raspberry Pi 3 B+ (multi_v7_defconfig) i noticed a huge performance > > > regression since [ff042f4a9b050895a42cae893cc01fa2ca81b95c] mm: > > > lru_cache_disable: replace work queue synchronization with synchronize_rcu > > > > > > Usually i run "vchiq_test -f 1" to see the driver is still working [1]. > > > > > > Before commit: > > > > > > real    0m1,500s > > > user    0m0,068s > > > sys    0m0,846s > > > > > > After commit: > > > > > > real    7m11,449s > > > user    0m2,049s > > > sys    0m0,023s > > > > > > Best regards > > > > > > [1] - https://github.com/raspberrypi/userland > > Please feel free to try the patch shown below. Or the pair of patches > > from Rik here: > > > > https://lore.kernel.org/lkml/20220218183114.2867528-2-riel@surriel.com/ > > https://lore.kernel.org/lkml/20220218183114.2867528-3-riel@surriel.com/ > > I tried your patch and Rik's patches but in both cases vchiq_test runs 7 > minutes instead of ~ 1 second. That is surprising. Do you boot with rcupdate.rcu_normal=1? That would nullify my patch, but I would expect that Rik's patch would still provide increased performance even in that case. Could you please characterize where the slowdown is occurring? Thanx, Paul > Best regards > > > > > There is work ongoing to produce something better, but ongoing slowly. > > Especially my part of that work. > > > > Thanx, Paul > > > > ------------------------------------------------------------------------ > > > > From paulmck@kernel.org Mon Feb 14 11:05:49 2022 > > Date: Mon, 14 Feb 2022 11:05:49 -0800 > > From: "Paul E. McKenney" > > To: clm@fb.com > > Cc: riel@surriel.com, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, > > linux-fsdevel@vger.kernel.org, kernel-team@fb.com > > Subject: [PATCH RFC fs/namespace] Make kern_unmount() use > > synchronize_rcu_expedited() > > Message-ID: <20220214190549.GA2815154@paulmck-ThinkPad-P17-Gen-1> > > Reply-To: paulmck@kernel.org > > MIME-Version: 1.0 > > Content-Type: text/plain; charset=us-ascii > > Content-Disposition: inline > > Status: RO > > Content-Length: 1036 > > Lines: 32 > > > > Experimental. Not for inclusion. Yet, anyway. > > > > Freeing large numbers of namespaces in quick succession can result in > > a bottleneck on the synchronize_rcu() invoked from kern_unmount(). > > This patch applies the synchronize_rcu_expedited() hammer to allow > > further testing and fault isolation. > > > > Hey, at least there was no need to change the comment! ;-) > > > > Cc: Alexander Viro > > Cc: > > Cc: > > Not-yet-signed-off-by: Paul E. McKenney > > > > --- > > > > namespace.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/namespace.c b/fs/namespace.c > > index 40b994a29e90d..79c50ad0ade5b 100644 > > --- a/fs/namespace.c > > +++ b/fs/namespace.c > > @@ -4389,7 +4389,7 @@ void kern_unmount(struct vfsmount *mnt) > > /* release long term mount so mount point can be released */ > > if (!IS_ERR_OR_NULL(mnt)) { > > real_mount(mnt)->mnt_ns = NULL; > > - synchronize_rcu(); /* yecchhh... */ > > + synchronize_rcu_expedited(); /* yecchhh... */ > > mntput(mnt); > > } > > } > >