Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp147408lqe; Wed, 27 Mar 2024 01:15:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA9zA8dCtXiMUSQiSAqfNY6mM5mbIPPyq4mT8q1mNMpehQBS5uStQI0UEOaTa8oW+N8IFzGC3xLGGULmJ8mbZFQFll28NoItpema7fsg== X-Google-Smtp-Source: AGHT+IEw+EdA76d1nDstOh872aKlGh4AjJ66igxR6/JQWO+Pwd6k8I3AEFEZ0Gt6NkKTjrb0aGrM X-Received: by 2002:a05:620a:12c2:b0:789:f37b:bc2f with SMTP id e2-20020a05620a12c200b00789f37bbc2fmr434613qkl.78.1711527341095; Wed, 27 Mar 2024 01:15:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711527341; cv=pass; d=google.com; s=arc-20160816; b=JTjTDUra/aI2ipmcJGurh+6BYRxkLt2oOaPfX7CIXafAU8ING73ESzTG5wvs+DeAWy yNIDiO5gwfg1SCNMoXsUGL6HMsspykgohD4DqZ2G+M592Kg9sY58dRerRMmPz70QCMRr 4idTAQVBZk3uRKy+Hn1xudRXpFfolk4HpOgjxgxy133l6CTYbOu0L/nkdRGuus1r74Cm 8jsIOuX21IbHONCnSPg3vAEzwZCxxnKj0cNi1buX6cVEMzlTtm6DAKtAjnoRnWtYymRP XQQrc24h2fjRuN1HrgHebrddE0phU3AiNuwZgYDN+Nt1R5VnG4YaTmFKnPqrEGf4p62y PZBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aRc8yhcE4e+6L7kQFczKku4VkOT1235zB5bAufGnmhM=; fh=orh2zKSd7Im9a0GkvoikBkBBeYkDgaqhARTitOWa4z0=; b=HmdciJQw71qhMqiPiMQTuZhPjgC0zUoSvuSQsPLRDZHNhq9rfh1bkGpcfJs/+WMyCB qvq/IE6jbuvRu/yhjyh0c03+WTWigMZFBBKXOENUIlC/R6LhX4JPjKiNTMFSsJ+YRI2c ZJWUxggGuS2qgjI1ubpaAG11N+Svitwb8Ejv8mGVrgfNXXBgUqDzc5+u7AQr9I7nPtXl UfNp9GUm7E0/CS0w0sdjweqaR9w+isJL8O518SkKlaMf+PHpVMya9fC7dLqkiaQzoLtE 3+iynH7/qjNi3heIjGV/fW5moyWdjGFGtGzCMc2iBV/xR6UhHUMgopEEaGCLD1ckc9V6 CoVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uFSGxBkF; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-120510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u1-20020ae9c001000000b00789ee801c8dsi9238742qkk.456.2024.03.27.01.15.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:15:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uFSGxBkF; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-120510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CD4B11C26623 for ; Wed, 27 Mar 2024 08:15:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86BA42D60B; Wed, 27 Mar 2024 08:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uFSGxBkF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B219823D7; Wed, 27 Mar 2024 08:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711527331; cv=none; b=MbFuWBW0lYSEAgvDIn3ZrR7RdUFUahLjrvpYOwyLTlhfbXDz1f5KIPfFtKdh/wrRS+QIBdZRUW2fSJjh5umfa53cGo/TcIb3UHUCRJYA/Ul4iZJGSCxY9VvBrxPfTDBTkANv4T7qESMqDkqurQzkreQodIfT+pnma560WgoPncA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711527331; c=relaxed/simple; bh=xVHaqZ1u760s+2uA6tdl2keH+dzuvpVmNgm8RSxlN50=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MH5ih2EwJ9JxvxmFJGLxfJFnQVx6rVuvT0I0/9HjgY3l6BwV4zFKCjh+pEvHElcBCnObG2a4rK5vVp8wOAOLhVWNgRC8evcwgUA/PvrWMXOuIBh5K7NfdyWSpTffzOGOOn1rjwl31jI0lKwYLEX1kkv24orcvcTkMtBBL5WZ+hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uFSGxBkF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2025C433C7; Wed, 27 Mar 2024 08:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711527331; bh=xVHaqZ1u760s+2uA6tdl2keH+dzuvpVmNgm8RSxlN50=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uFSGxBkFaIMIAEsa4zemQnwPcMOfoNFWZPB+2Ka9mznGd0UGAhY2D69zeimXf6RGX y5Gx28eXDgyHIrcyobJexzf4puxWw2sk840SLc+c12F6CXH2HlqI4RJk1ozhgzyGlB 1N++CXZZE7EOCtBsPWCzQtOa7OidhTh3LGSxsdNc= Date: Wed, 27 Mar 2024 09:15:28 +0100 From: Greg KH To: Norihiko Hama Cc: "stern@rowland.harvard.edu" , "linux-usb@vger.kernel.org" , "usb-storage@lists.one-eyed-alien.net" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] usb-storage: Optimize scan delay more precisely Message-ID: <2024032750-violator-trivial-90a3@gregkh> References: <20240327055130.43206-1-Norihiko.Hama@alpsalpine.com> <2024032757-surcharge-grime-d3dd@gregkh> <2024032745-transfer-dazzler-2e15@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Mar 27, 2024 at 07:57:52AM +0000, Norihiko Hama wrote: > On Wed, Mar 27, 2024 at 07:39:55AM +0000, Norihiko Hama wrote: > > > > Sorry, but module parameters are from the 1990's, we will not go back to that if at all possible as it's not easy to maintain and will not work properly for multiple devices. > > > > > > > > I can understand wanting something between 1 and 0 seconds, but adding yet-another-option isn't probably the best way, sorry. > > > 1 second does not meet with performance requirement. > > > > Who is requiring such a performance requirement? The USB specification? > > Or something else? > This is our customer requirement. If it is impossible to do, why are they making you do it? :) > > > I have no good idea except module parameter so that we can maintain backward compatibility but be configurable out of module. > > > Do you have any other better solution? > > How long do you exactly need to wait? Why not figure out how long the device takes and if it fails, slowly back off until the full time delay happens and then you can abort? > It's IOP issue and difficult to figure out because it depends on device itself. Agreed. > I know we have multiple devices with delay_use=0, but then it's recovered and detected by reset after 30s timeout, that is too long than 1 sec. So how do you know that making this smaller will help? There are many many odd and broken devices out there that take a long time to spin up before they are able to be accessed. That's what that option is there for, if you "know" you don't need to wait, you don't have to wait. Otherwise you HAVE to wait as you do not know how long things take. sorry, greg k-h