Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3299867lfo; Mon, 23 May 2022 01:04:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/eoG0ix6HiytzkJMUCX9b5rAPRtRDd5a1lpKoW0wwALaalCalhjNG7lOGp3ngA3P6Qmjk X-Received: by 2002:a17:90b:3010:b0:1df:5016:82d0 with SMTP id hg16-20020a17090b301000b001df501682d0mr25448341pjb.78.1653293096535; Mon, 23 May 2022 01:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293096; cv=none; d=google.com; s=arc-20160816; b=U0ChHVw/x2zSrJs+z2WP8amLpRp78KzQTTLt64XUsl+eqd3oOL+BZvTzK3ia1wxddu cQ4VK8RFcuIbRk21P+4ftHrn4q6Y7qvyVROMLjFIf74lY2W0WpSLraocD3c/86eS06YV Zk/VDMAQrQci1ogbX5Odp0uHpbkBCbuDGf/jpnXfyqoKYu02QDVnIRRBALgjwdL2CLHb Wt8YErQ0oT4Dr1t7k0gFlG4+BktmfVDV6FOhM30KCHYcDRE4LJfK94AaH1Uote6vw4Ju Wnglcw/R1BqnAxIzr8gT5Zf5LmZPz+FjMnfscYhT3GTmoPGyfSzjgMUVpMzVk6s4u6x4 1N2A== 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=TG4CbLkTE4XosKHnqAD4eTTnjrQDDElDpZfDirUtdvs=; b=OINms2C9htkZasI7zm9JrGBkzWafjR7blP1Dz/YUdPUt5U/TG4bP/JcVCp+GPi4wcx clNNkPQSn4+yT35vhGeLnILKJytCFEmOspluIGszpTTZk555yNbtB+YjhuYoo8TxdXc0 vgR+/+2s+Dapf+Io4ks7FFHKQjJy3/M3eCzTFa2CIsMvPqXGoCfuwGeiZ5l48rsI3g4F rYSX478e7U4sz8Iqawlmk4htSNwdNPdh8ud4EuOq9O52+eAmIHYWUipcQcQZhtDMU2E+ 7vexxQ8L8Xo4eERUiOLY4K+/q+qW+9jpdKsqKNVv4pQKbqInwqKhT5RDp2d9zcntYfpc i2PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNscoE2x; 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 ji1-20020a170903324100b0015d02c4c78esi8499590plb.487.2022.05.23.01.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:04:56 -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=XNscoE2x; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E72E022C917; Mon, 23 May 2022 00:08:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346671AbiEUXqZ (ORCPT + 99 others); Sat, 21 May 2022 19:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245043AbiEUXqW (ORCPT ); Sat, 21 May 2022 19:46: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 8E01C23159 for ; Sat, 21 May 2022 16:46:20 -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 0F5C2B80AC8 for ; Sat, 21 May 2022 23:46:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7088EC385A9; Sat, 21 May 2022 23:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653176776; bh=ZvwJRsmyPHVu6xMhRrUXxcn+midJndmIlbuFTRbahrQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=XNscoE2xqCQNZy+sn84caROY4Pxn5GkYOAAbzVz5+lbHEEml6WVMqBNgkiou73QwX Lt7PM5eAxLu5xtIqrEwYC3h4rtDFGAWkntf56M+7gocu+qFwcz85a7NpmqDl2nDnJk IDRdGAKKBpu4Pmk4csxXGDhkU3axPoqKq1AySe+y9IZHoNb3U/ojJBfFrqYlqp7SF4 xWRohg+uDIJrnkQApg+mcNZC/wLCcQI8lM+yAh2v89GwMdmw+5kV0mvCOvEWeaWVh2 N49aNlCAZrVJ6xkaTpiC9dx5IVqXnjbLCWroX7xKJyHK/4RdzRJF9Z40CeUtNt7vEc w4TejJZKiszbg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0C41A5C034F; Sat, 21 May 2022 16:46:16 -0700 (PDT) Date: Sat, 21 May 2022 16:46:16 -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: <20220521234616.GO1790663@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <77d6d498-7dd9-03eb-60f2-d7e682bb1b20@i2se.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <77d6d498-7dd9-03eb-60f2-d7e682bb1b20@i2se.com> X-Spam-Status: No, score=-3.0 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 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/ 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); } }