lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yz+agsJrvHg18FeC@google.com>
Date:   Fri, 7 Oct 2022 03:18:26 +0000
From:   Joel Fernandes <joel@...lfernandes.org>
To:     rcu@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, rushikesh.s.kadam@...el.com,
        urezki@...il.com, neeraj.iitr10@...il.com, frederic@...nel.org,
        paulmck@...nel.org, rostedt@...dmis.org, youssefesmat@...gle.com,
        surenb@...gle.com
Subject: Re: [PATCH v7 10/11] scsi/scsi_error: Use call_rcu_flush() instead
 of call_rcu()

On Tue, Oct 04, 2022 at 02:41:56AM +0000, Joel Fernandes (Google) wrote:
> From: Uladzislau Rezki <urezki@...il.com>
> 
> 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 <urezki@...il.com>
> Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>

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) <joel@...lfernandes.org>

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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ