Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp399771rwb; Thu, 6 Oct 2022 21:06:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5JRO3J9z42E+bGnBymySTnyZY9fu0QNiuMSrDCocsDqlBxA7rtEpxQ5WRTCbnF1kap/wdm X-Received: by 2002:a05:6402:50c9:b0:459:fe88:e91a with SMTP id h9-20020a05640250c900b00459fe88e91amr2730797edb.411.1665115608565; Thu, 06 Oct 2022 21:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665115608; cv=none; d=google.com; s=arc-20160816; b=xiq5dYDjxJUBU2A0soqObhATfwDfWOhWpIbrYOb5z5/Q8kOKs5gs5DTxY9zeXvwdR1 ot9v1Rve+o24RfQGSvWLv83o8yyM2lmCN36qDKopT12OT6ZxV7GhqiruNKizMyGQI9RN 29Z77Ss4uR2N3pvBENn7HEW9XysaBUxDM9eDOqBLyXa1LCYg84bszdUXXThyrXWWG0wQ rNLEVpZjKqO7FXJgOzQNj5qFkMKzCJRgmoAqpvZtY6VNVom/O1EFYI6BRuhjs97EceqS CkcYC0YVtap9U/IKApUlDXaulzIkJ/cUCByZc6mNKK3DJA9ClSO2s1LFcMlmo/ZYbWuW gmng== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=+hx0EU2RLAQ3o5tIiwSkGGZgPKc+L+R/ZKiXk87Fu3E=; b=KWZXgZ7ARrkk/O54Rm9OoYCbYSyXnGzJf2KDLUvsXWhU7Sh8GT0U0ViEwBr5pNerx0 55vM+CEpvgU5sG8bLdMFMAWWNgS2jOirSSNe1hOWljU4Q7n4es150KRriu1VH9B6htSx wWE+QLcpOZsQXBFmPlxVIE+Pz0lO94aBmG8Wf7bae6YMYLTTWvXnt70nop54vTI6JLlI oOJKfPVPkwGe1B7klqWu2B6atghVmcap44Iv2XqhAT1G0UUGX6EF6Wwjl5bIiRbWtK0s aCDRG0HgrZ6JqCEs/wTfWPuypLwYev9EqmqzS/9OkgCWTwB+KPv4WbNBAtCCrL2HIxUF +fSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=AND1wOuZ; 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 sg15-20020a170907a40f00b0078276be53d5si1543191ejc.0.2022.10.06.21.06.20; Thu, 06 Oct 2022 21:06:48 -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=AND1wOuZ; 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 S229712AbiJGDUI (ORCPT + 99 others); Thu, 6 Oct 2022 23:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbiJGDT2 (ORCPT ); Thu, 6 Oct 2022 23:19:28 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D545C1162D5 for ; Thu, 6 Oct 2022 20:18:41 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id cn9so2151480qtb.11 for ; Thu, 06 Oct 2022 20:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=+hx0EU2RLAQ3o5tIiwSkGGZgPKc+L+R/ZKiXk87Fu3E=; b=AND1wOuZI0nTKAtCUDz87miknuAd6bmCob6xc924Y3rQRZPw/R5flKAN5tM7t7GcFl 5oIJP6V7YnA+avfVqNaHGDOlk+9fU+CHIiuW5kRF2VxZ6iVaInT1KmjUBArIQBVepprN WT7ov/4iWc953AsSTrb2Apb6yGOH36Be9oK6I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=+hx0EU2RLAQ3o5tIiwSkGGZgPKc+L+R/ZKiXk87Fu3E=; b=0Y6KgOLndUxYfpBanGjdUbpo12801Q7tH8r4YtQv5nDglY/A0FOHgaeUIlQ2HM+lkY 0BVrWywOnb3jUg3/76GwfZFC3OY4TjpTwvw/O73SA4FwPtttnrref2UNmTOC6TmoBkfX CZiVNvABblDUqtZJqNJYx26ImyrfKOiYeU1n2Vzba791U056vQ4qk0lJUieaTY9NXU5M kIo3R6+xfsFFMrFL0w/YZbjPeN1cVn+RItq/BMbmRwD/6AkIl3t7pkgIZtDvqIl5lIYQ FJEvrkYUzAbYGXio0zqvf/OaRZumawlYoNLZ4tt+bdI0YqWxSHKYVRrtvCTVOeQr0qKs DpXQ== X-Gm-Message-State: ACrzQf1qBmOoCIbpkfPEg7kusQmvDVRrUO5c2YmL6rR2BCh2CzsngoWz wywaaEsjaa5J9gJ1Qcf5vI+iTglWrCHh0w== X-Received: by 2002:ac8:5f47:0:b0:394:7602:d9f0 with SMTP id y7-20020ac85f47000000b003947602d9f0mr2791965qta.683.1665112707253; Thu, 06 Oct 2022 20:18:27 -0700 (PDT) Received: from localhost (228.221.150.34.bc.googleusercontent.com. [34.150.221.228]) by smtp.gmail.com with ESMTPSA id u14-20020a37ab0e000000b006ced5d3f921sm832599qke.52.2022.10.06.20.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 20:18:26 -0700 (PDT) Date: Fri, 7 Oct 2022 03:18:26 +0000 From: Joel Fernandes To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rushikesh.s.kadam@intel.com, urezki@gmail.com, neeraj.iitr10@gmail.com, frederic@kernel.org, paulmck@kernel.org, rostedt@goodmis.org, youssefesmat@google.com, surenb@google.com Subject: Re: [PATCH v7 10/11] scsi/scsi_error: Use call_rcu_flush() instead of call_rcu() Message-ID: References: <20221004024157.2470238-1-joel@joelfernandes.org> <20221004024157.2470238-11-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221004024157.2470238-11-joel@joelfernandes.org> 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 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 Tue, Oct 04, 2022 at 02:41:56AM +0000, Joel Fernandes (Google) wrote: > From: Uladzislau Rezki > > Slow boot time is seen on KVM running typical Linux distributions due to > SCSI layer calling call_rcu(). Recent changes to save power may be > causing this slowness. Using call_rcu_flush() fixes the issue and brings > the boot time back to what it originally was. Convert it. > > Signed-off-by: Uladzislau Rezki > Signed-off-by: Joel Fernandes (Google) And I successfully setup Debian on KVM and verified that this fixes it, so now I have a nice reproducible rig for my 'lazy-callback-doing-a-wakeup-detector' (I wrote half the detector thanks to ideas from Steve, and will finish the other half tomorrow or so). Tested-by: Joel Fernandes (Google) thanks, - Joel > --- > drivers/scsi/scsi_error.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > index 448748e3fba5..a56cfd612e3a 100644 > --- a/drivers/scsi/scsi_error.c > +++ b/drivers/scsi/scsi_error.c > @@ -312,7 +312,7 @@ void scsi_eh_scmd_add(struct scsi_cmnd *scmd) > * Ensure that all tasks observe the host state change before the > * host_failed change. > */ > - call_rcu(&scmd->rcu, scsi_eh_inc_host_failed); > + call_rcu_flush(&scmd->rcu, scsi_eh_inc_host_failed); > } > > /** > -- > 2.38.0.rc1.362.ged0d419d3c-goog >