Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1660823ioo; Sun, 22 May 2022 23:25:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxxy4fMx1s4i5IzOD3XOc7LHUHzIPFWJYNlo/6Pr7MEqAThfPZRNj1RkIwvVWF7SA24JQw X-Received: by 2002:a17:903:2283:b0:161:d0c4:d420 with SMTP id b3-20020a170903228300b00161d0c4d420mr21609510plh.43.1653287138954; Sun, 22 May 2022 23:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287138; cv=none; d=google.com; s=arc-20160816; b=Atn+cbY+BCReZpbUPvsi5bcx55HEXlKm9sbBz1eLo1RsvyLqzhz35wy20rbiyS2Mee tseYE2l1VIeTr+re/FNf1zDA2xNEC1ypIINgJO4RmuaPBzFf921WlExgtcYoJHU6QA+p uUbjG7sIKzc30UhwnHHr5Wg8f0mYYsgQt+GQ80nfvb+CN19VxUxaJ3A+sTObq0nZKxRy lqH3zvJ5GPI5GFaETkoEPyd0SY2ZzRuOLiddfb6wuwZJnis09wbMYfTrqgiZ1wLleX+x Ds9HgRkWORAaZn6coSEZbosKiYMZMKtQ/bMxFS0mTOkRNP3ZS444q1TalIJY5eSYyszA /qTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Za/7/ZJw/b5nnGc2/qmiM8jBdGqjvpxdb4byLsyM/iA=; b=qH0/pvkUV/qvhRMRVPc/eX4vWAqVcKW444mFVipi7u/sG6BTj9iTlPNX5fXXIVMgVf 5CG4lPOn6QZo+QdM8tL9vdYRzBx9a9IanT6CaScQHrmPUMKTnuhsVvZLtqVYteA1VTXp wD4fvPu0sGwOZ5O1/91/mw1Rao2kWcI4cDe3znYYy8+YKwig6HXYLpCKRzo89YSUmT5j q/iq6+x/nJuGpuz50vbSN42McUvcAgxhJl57RHQAKDPtwiEvYlkdKxg6lIr0U96/Q6WJ wCl/ArSw2HxOKrRI1Tii4PwYPNgOSzEER+5/X8OqcZGYtyrxk6Fu1PSjPHIYy3Ezpexu 3Dcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hKBgwlyS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b26-20020a631b1a000000b003c2699c8074si9482087pgb.563.2022.05.22.23.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hKBgwlyS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F0562B19D; Sun, 22 May 2022 23:05:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbiEWEsZ (ORCPT + 99 others); Mon, 23 May 2022 00:48:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiEWEsW (ORCPT ); Mon, 23 May 2022 00:48:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66CA1209C for ; Sun, 22 May 2022 21:48:21 -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 ams.source.kernel.org (Postfix) with ESMTPS id 60C27B80EEA for ; 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: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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); > > } > > } > >