Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp977248rwb; Thu, 18 Aug 2022 16:12:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZqZ+sGglsiYR5QiyYbBTWX3rZgbSeUpmgArPjxiadJQut7SH0jeRTPLxBJOdgogUbG76q X-Received: by 2002:a05:6a00:b8c:b0:52e:d6b4:d5a2 with SMTP id g12-20020a056a000b8c00b0052ed6b4d5a2mr5015368pfj.72.1660864345899; Thu, 18 Aug 2022 16:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660864345; cv=none; d=google.com; s=arc-20160816; b=wsOh1ET8PrD7RnEAw7jnFY6yha6GyIwLG72BlbNbyX/SyeMBT26ILLvYD6XcRCUtGu M6LhxIk8qgZFlbBbfmGHaOkfH0wD4WGQ6vtziUHNRj4K1uv088uIWcyame1erWlDCQx5 TcAFiR5IOqjZ2YskGtKOj6t61I5PKPnXlhjVeXWzWTBSsy5SsDJRXshY7u+PDO7BC8Wo 6AyNmKfzZBdMdp9v9YLk/HQnZkUmu8Mpsnb80f33jUfACSTQP0SuO3wDnu2sj43RkHYu VrQ2kq0z13ZdG4z4X51tJxgQ25pBGWga7aXLk579O2rq2pY5NhZJQMcyIgKkhJ675Ztk Mnqg== 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=DEs4QdwBZh24q/YXet07H+yoRoWFt6AeBiWh1qampiM=; b=ZM/r7d9F5LBIWVgnEwiP5Plrefmc87amilUSuTc+JA9WACoYxlc7tewAjOcWZrfC6k ploE1RHM8bR6JqgnmHT0ury+uMchiNYRW1rDMXjeER4vyFh4zWlIA/FAheo/ZdPWUUlf u5dkps0h16QfZa1FjTyi/QrpPpD0GnL58e7Vap7ZfX6KlzMrTVy9gbD5RUHhagLHkSoZ XC8ArGgCyb4iLXZbKIqx1aeFoubn+MRkTT1Uvk5psM0fwQv9ImtM0TjlqveEmbU2uDjI MP0rgKiCOQihT8j3JLhPromOkkow5+8Ctd/UExcJYtBA/KmF6S9AESk4tWlCPUCsKawn OPJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=NRf5fd3s; 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 o6-20020a1709026b0600b0016a3102f8dbsi2304323plk.0.2022.08.18.16.12.14; Thu, 18 Aug 2022 16:12:25 -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=NRf5fd3s; 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 S245067AbiHRXFf (ORCPT + 99 others); Thu, 18 Aug 2022 19:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244246AbiHRXFd (ORCPT ); Thu, 18 Aug 2022 19:05:33 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 463E6CD7A2 for ; Thu, 18 Aug 2022 16:05:32 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id 10so2202913iou.2 for ; Thu, 18 Aug 2022 16:05:32 -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=DEs4QdwBZh24q/YXet07H+yoRoWFt6AeBiWh1qampiM=; b=NRf5fd3sxugF1Zngi0c9/hpqIoc552QiPB12KJSFJTFTF7UVI1QeOqUmF5KWIMxnJq mBtUqIYHGYxr8OHnH1Yk6aMKEu2+McD7STFeYtAEYlov8ONetZcZAiuRZqUGheH2klwu VUNzsd7J7RM218D46GArrQ6WKM+ejqFCQlcpo= 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=DEs4QdwBZh24q/YXet07H+yoRoWFt6AeBiWh1qampiM=; b=Xb/jWBL/kbTmSF+y64ZBo13aEJoMGr7jNkpEpjimVzsLuixRCFmAM11SXu+fPaXavl QLTKeBLeRcj8pQ3ap/VynTu7p6C8rv8PpvKeXFg5RllA5dQamXkqpISnUgwPVQD9VK2q fuMWcjSILanLAXk5nP+rVywsAqGNBAEQ3HN7PT3eXAPxWYLeBIOfGI8cTz9LVR+R8dsz UZWNrBNfAfM7mFHZ7CRm01CsGDqMZiyQ17fRZ3WTQtFaN8KBYym0DqwrEytudGDa1Cr/ sr/wy3pWUNyYnmX3aeOk+of4VVME04aDIjGj7aj9d5wnXrL/B+ozuICRJtD+eiLMRTvX u9Rw== X-Gm-Message-State: ACgBeo2Arg2BfGP1pABybwRQ8MS+QcJIUCNh+z3x2bcpdX9EdLcbEHbc +FGpXHSlhS/1wKXJvgfuAe/GhqX+2DhRGjZtQc2KlclOLq5iIQ== X-Received: by 2002:a05:6638:378c:b0:343:447e:e6e2 with SMTP id w12-20020a056638378c00b00343447ee6e2mr1451606jal.118.1660863931374; Thu, 18 Aug 2022 16:05:31 -0700 (PDT) MIME-Version: 1.0 References: <20220809034517.3867176-1-joel@joelfernandes.org> <20220809034517.3867176-5-joel@joelfernandes.org> In-Reply-To: From: Joel Fernandes Date: Thu, 18 Aug 2022 19:05:19 -0400 Message-ID: Subject: Re: [PATCH v3 resend 4/6] fs: Move call_rcu() to call_rcu_lazy() in some paths To: LKML Cc: Rushikesh S Kadam , "Uladzislau Rezki (Sony)" , Neeraj upadhyay , Frederic Weisbecker , "Paul E. McKenney" , 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,URIBL_BLOCKED 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 Thu, Aug 18, 2022 at 1:23 PM Joel Fernandes wrote: > > [Sorry, adding back the CC list] > > On Mon, Aug 8, 2022 at 11:45 PM Joel Fernandes (Google) > wrote: > > > > This is required to prevent callbacks triggering RCU machinery too > > quickly and too often, which adds more power to the system. > > > > When testing, we found that these paths were invoked often when the > > system is not doing anything (screen is ON but otherwise idle). > > Unfortunately, I am seeing a slow down in ChromeOS boot performance > after applying this particular patch. It is the first time I could > test ChromeOS boot times with the series since it was hard to find a > ChromeOS device that runs the upstream kernel. > > Anyway, Vlad, Neeraj, do you guys also see slower boot times with this > patch? I wonder if the issue is with wake up interaction with the nocb > GP threads. > > We ought to disable lazy RCU during boot since it would have little > benefit anyway. But I am also concerned about some deeper problem I > did not catch before. > > I'll look into tracing the fs paths to see if I can narrow down what's > causing it. Will also try a newer kernel, I am currently testing on > 5.19-rc4. I got somewhere with this. It looks like queuing CBs as lazy CBs instead of normal CBs, are triggering expedited stalls during the boot process: 39.949198] rcu: INFO: rcu_preempt detected expedited stalls on CPUs/tasks: { } 28 jiffies s: 69 root: 0x0/. No idea how/why lazy RCU CBs would be related to expedited GP issues, but maybe something hangs and causes that side-effect. initcall_debug did not help, as it seems initcalls all work fine, and then 8 seconds after the boot, it starts slowing down a lot, followed by the RCU stall messages. As a next step I'll enable ftrace during the boot to see if I can get more insight. But I believe, its not the FS layer, the FS layer just triggers lazy CBs, but there is something wrong with the core lazy-RCU work itself. This kernel is 5.19-rc4. I'll also try to rebase ChromeOS on more recent kernels and debug. Thanks, - Joel