Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1927167rwb; Fri, 19 Aug 2022 11:51:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5MMGSGvrjF4Vo6MZ9pAJDc8OZUx28wg76NmobTNRbLdMzV+kyQ04pj8012XVkHLmOaNqXQ X-Received: by 2002:a17:90a:404f:b0:1fa:eaac:4fd1 with SMTP id k15-20020a17090a404f00b001faeaac4fd1mr3603446pjg.113.1660935071951; Fri, 19 Aug 2022 11:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660935071; cv=none; d=google.com; s=arc-20160816; b=KIDrUF4mpOO3le6LWkzzBzDE+G80JmOutDBgoKFmTDcs9N22XiNnV04Jruj36h2Ack sk7fkF9wktdkZr1edcgIdBX757FJwAUOEayavBsdj4hxtrEDH4cMXkxgrCkl7m3eFapY Q4+h6zKxthKuxFkdb+RnSNkrSpBZxTPjai/rdFIok1n8LedwObil0Ana5YXYul57wRQl w1x/0/cSCa+T5EEfQulp3Nlxt51KVs5nP9AwwGOUXITbRHkjfjnRPmGHtspO0Or9ViV6 cU0oJj4VJdzOr+axQVsfcKTkHzRcL321qNz9TPsS8QxHg5DzE8j69ONFhk43rSkxZdgD AJWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=q/AKxBAoGuIGbw50ofhyCLKrbO9AgUVTeplds+BuUCU=; b=uaSV4V63IvwjdTresgqkeSX67Ak0AN+/Exc04wea9lQHpdex8ZO7z8VYc19gBTPEDU 2agqI8y+qIm7rOvTN5/0dhk1ucqrTOIRVM/2BvxVvjMKA2LwI0eLNQ+E1Au3UFQ6ZZTR Po8LMhJOrOSVy9EtO4WviOAbvNspXZaKAbFCfCDL0WtzkxdDjq6W1U/DwNHPM0Ie6j1H jeDCOcHo5eV9IX2vWyczm5E4xDSS3bLj4tgYq96aS+T3i0UeOJr0TFmSjIT55B30DFFr Yiaj+8kLOATz9eLqmmFXXUr3O1txAOp1NqIZZgRokHzjxzeDidJANi4N7/YIrEUkChFj TkYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=uH5PyXDm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a170902da8b00b001714c3773d5si5032812plx.571.2022.08.19.11.51.01; Fri, 19 Aug 2022 11:51:11 -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=@joelfernandes.org header.s=google header.b=uH5PyXDm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350693AbiHSS3o (ORCPT + 99 others); Fri, 19 Aug 2022 14:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349836AbiHSS3m (ORCPT ); Fri, 19 Aug 2022 14:29:42 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6640BA9C2 for ; Fri, 19 Aug 2022 11:29:41 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id o14so2712648ilt.2 for ; Fri, 19 Aug 2022 11:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=q/AKxBAoGuIGbw50ofhyCLKrbO9AgUVTeplds+BuUCU=; b=uH5PyXDmPHsIXPrkyxT6Y3rEqmV112PumYE2Or+P8B65EMPD1ZEwogxLhwssPzz4sr hFxwtYsIWikwlqkaPRuZOjxbQry6cBwmgZfe9T5dJVChsgE1PHUec0wSeUWfcarAbXYh xoMp4Z1U1cmuG4d7IlAUhK30gWFwvLuRhJp4w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=q/AKxBAoGuIGbw50ofhyCLKrbO9AgUVTeplds+BuUCU=; b=Auy7I4dDKovrrjZHm89o0hKu0LecctocelL1fYXMSLzBK9VxrKuaSBCL70i1xynYZi +Iiv8V1z2f9IRo7FmFfdxSzCtmm+wBFeZlvKIeiWuLDA+/hHpenZtgox9fzlRbi8OdO9 OJ4hqnv5f3XbnsOzNs3kFSNv++aDLIO5/AStMP3OxsufUw2rOaTWRiUgn0I636/UykG5 JWeWoxtV6ffr2KGxgEBSkDRLv/+fwsdhbWBiVKXqpyjlkMOCHFIbAxSi+79lpp5PJ/Cz S4gSMyVsmkhAjh4LiYqZ46iX2szowGue98hClZqnvzOmmPXkcKzCZPT2rvrEJXfsde8b L3nw== X-Gm-Message-State: ACgBeo1ID5GTRoJpg69Jr73/ATt2tL2DenKatjX1Os14x9znUCXvDa3+ Z3+EEHPhon6cH/04vmI4p7HUYDsxR+0Frm8QfgWtdU9FJyc= X-Received: by 2002:a05:6e02:1c26:b0:2e5:8680:e842 with SMTP id m6-20020a056e021c2600b002e58680e842mr4386935ilh.148.1660933781301; Fri, 19 Aug 2022 11:29:41 -0700 (PDT) MIME-Version: 1.0 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> <20220819182645.GQ2125313@paulmck-ThinkPad-P17-Gen-1> In-Reply-To: <20220819182645.GQ2125313@paulmck-ThinkPad-P17-Gen-1> From: Joel Fernandes Date: Fri, 19 Aug 2022 14:29:29 -0400 Message-ID: Subject: Re: [PATCH v3 resend 4/6] fs: Move call_rcu() to call_rcu_lazy() in some paths To: "Paul E. McKenney" Cc: LKML , Rushikesh S Kadam , "Uladzislau Rezki (Sony)" , Neeraj upadhyay , Frederic Weisbecker , Steven Rostedt , rcu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 2:26 PM Paul E. McKenney wrote: > > 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? Yes, that's possible :) Thanks, I will consider this idea. Thanks, - Joel