Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1927440rwb; Fri, 19 Aug 2022 11:51:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7b81u+elcilYZ/vHKMd7QLzfCS49B0FP9eHCYcv8oiKCo81WoGe68C/6//RnYLH9UDle6r X-Received: by 2002:a05:6402:27d2:b0:43e:3ff6:ad58 with SMTP id c18-20020a05640227d200b0043e3ff6ad58mr7023837ede.234.1660935092692; Fri, 19 Aug 2022 11:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660935092; cv=none; d=google.com; s=arc-20160816; b=B+ZiL6mtpI8v2ue+YQXnFlNPEL30CK3q5VV8FPwLJNEQZGlqjm87hLRo385edvqebb fHn8dcG2KAHFYQLy4wJzTHXuSe9D8lmpRA9tkpZP5KDUTzb99NF8R+s2p2eY7IEkxYaf /5EHqNbGdryUy/srbdir24TzgaD7Hz4o3WEXA9QfYC6mm/t0KYpVO0jN+jddJeVzGVqB 9JAD5zJ4ieh1tnGYepfr2f98D0Z+Ekro2dYRSOhaklc4pxA1hUf3QhwG11L2NRRdSpKR N9Bkhax5Jf/otk+FdlxOqEyav2yqH0//J1mdWQW19J/lWLQvQ8RZ7WrhSLxu72Brg/s7 JVRw== 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-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HCEWK4eKDYK0j3KjiaEhaicmd76PcQ5NalBrYiXVw58=; b=cA28ua8kRvDfBczZMm2eqGsv5oEOGbdMD3Gmoqeg6IWmfEvU5gr15BJm5JBIQ8Co7l +B1EpPVM4dlTeb+Kg6ofzNAQTiw3bBmYT8xIjkQORd4OtBWjJHRGXUU/8FmGagcXiScF ggKB9iY2GaU1jITrOrxZhrA7C7Z4XK2Tu8Vm9JytAmqIMNosPKOYIL04x+mdWkvFCWhZ eiOdUKk0a6M8mq4zE+d/YhuSmlEnIkxvOb2MGpEzhhIdZl9021Qhqjxh4khx07Ym6jCl r0nnws2VIViS8Fb6IBYK6/baMb6HMVEg4aSoD2k4L5NElOloqQ5kIPEJ163Ei5DVHqLN qW5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iAIg127P; 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 l14-20020a170906794e00b00732f6d8454fsi4083024ejo.656.2022.08.19.11.51.06; Fri, 19 Aug 2022 11:51:32 -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=iAIg127P; 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 S1350505AbiHSS0t (ORCPT + 99 others); Fri, 19 Aug 2022 14:26:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349705AbiHSS0r (ORCPT ); Fri, 19 Aug 2022 14:26:47 -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 E6B4FC741E; Fri, 19 Aug 2022 11:26:46 -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 8332460B92; Fri, 19 Aug 2022 18:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2A5CC433C1; Fri, 19 Aug 2022 18:26:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660933605; bh=QGIx0uM/G/2giC5AwzHmtZuCIltms+An/DdTszHehEc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=iAIg127PzjLBBUm8S1tO5vEcoEL5CEPWJfupHgqR8Hn54dsqx/PAEGW13KNOypwef Xtd4p54Dwy4ReB/i2BQcth/owSH76/r3wgKaKNs6/puKrW5iWLkGYm7ho9UWG2YY0F eYnqpPiLLLqzMjM+8lyvVVTzz5cfYh7lDQLlQny/38qgB5Jt5qAp56EFlQlMC0DzSZ jMDOT58fOxZaI7t5Dc8srf3vhl4j+tqzjTeQ2RtYjodhay+I6OtJ+ikZZEg1YBV2Km LieEdoZjeTEvpGoUM4pUs6xaLXqlukBBbc4M4I+ePSV9eSUESHILf9zSdn0d8/iE2M M5brxJT+VLLig== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 6BDF85C0164; Fri, 19 Aug 2022 11:26:45 -0700 (PDT) Date: Fri, 19 Aug 2022 11:26:45 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: LKML , Rushikesh S Kadam , "Uladzislau Rezki (Sony)" , Neeraj upadhyay , Frederic Weisbecker , Steven Rostedt , rcu Subject: Re: [PATCH v3 resend 4/6] fs: Move call_rcu() to call_rcu_lazy() in some paths Message-ID: <20220819182645.GQ2125313@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220809034517.3867176-5-joel@joelfernandes.org> <20220819023550.GN2125313@paulmck-ThinkPad-P17-Gen-1> <4deb7354-bac7-b530-47ba-54cf50cfce58@joelfernandes.org> <2d56e4ad-7d6e-2abb-461f-15f20128d42b@joelfernandes.org> <20220819171249.GP2125313@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 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 Fri, Aug 19, 2022 at 02:17:32PM -0400, Joel Fernandes wrote: > On Fri, Aug 19, 2022 at 2:14 PM Joel Fernandes wrote: > [..] > > >> Things are much better with the following change. However, this brings > > >> me to a question about lock-contention based or any deferring and boot time. > > >> > > >> If you have a path like selinux doing a synchronize_rcu(), shouldn't we > > >> skip the jiffie waiting for the bypass timer? Otherwise things > > >> synchronously waiting will slow down more than usual. Maybe bypassing > > >> should not be done for any case until boot up is done. I'm curious to > > >> see if that improves boot time. > > > > > > Why not simply disable laziness at boot time and enable it only after > > > booting is complete? The exiting rcupdate.rcu_normal_after_boot kernel > > > boot parameter uses a similar scheme. > > > > That sounds like the right thing to good, but unfortunately it wont help > > this problem. The boot time issue happens after init has started. So the > > OS is still "booting" even though the kernel has. > > > > Also the problem can happen after boot as well, like if RCU > > lazy/non-lazy callbacks come back to back quickly, or so. > > > > But yes nonetheless, I can see the value of disabling it till the > > in-kernel boot completets. > > My mail client is acting weird. I meant to add to this, I wonder if > there is a way other subsystems detect when userspace boots using some > heuristic? I don't know of one, but I bet that ChromeOS has ways. If nothing else, might you add a sysfs write to one of the boot-up phases? Thanx, Paul