Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp869862lqb; Wed, 29 May 2024 13:05:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvtEn7IOcEwkA720Wj6NSsIgQc3WFrIxnJBC8iwfJsPiz3DY2Rw1+fyIgpdbhzqyiIWhyvKuAvLrgx0OdhZSNOelGJyZmiGpi4TnLVPA== X-Google-Smtp-Source: AGHT+IFP/1SbXuaRkh9yajrUMzJfquZqjXcOSuIHQI4Td3Wi04v2zZ/IPwnOwMEl4Ct3FrsGu8KF X-Received: by 2002:a17:903:228a:b0:1f4:8e8e:d359 with SMTP id d9443c01a7336-1f619b3227dmr613825ad.67.1717013137921; Wed, 29 May 2024 13:05:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717013137; cv=pass; d=google.com; s=arc-20160816; b=mgtmuee/E8NuuLkEpjHvfzIlQxuKZEZHp5YaoSmOn0wcuu9vmWHLj+4dcowlWFf7dT m7wLfd6gbWa92mAGL+t6OAlNQ1EE2tjAYCvXZX61ENXkFg2Y76mLfQPrj/0875cm7W9D 0JZeqsgl19gVC3NRai/pB7nuAttSBibTxXv9a2GocOCyNjfG6jUf6C16ReVA+nkRuKZh QcPOpN7YjyNmgrkpQ/GKYzt4wogTg8zARHryckZpHl6wJC1k8XCHC3IQMEA9PgANmWBz 03PwqyXyXO4alTRzVxD/NxUIYa5EULDJ6N5DP7WxVI4zt0AN/xKviaigcrVXjyEsN5wl WgiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=LKEg5H1dDGROJ86EFwGm1wWgYY1kka+ujq1KzN58Xfw=; fh=K+Tg+GhtIqZfvlhfGR7M/+sET2hfDDyZF+hArCUWMWo=; b=oFf5pPZJR8Rmuy0O+fUwHY5j8Z2bb69gVcOTaI468pWRDgBnOTbA88/hgETm/GBJSd n/u56KJeAUzne+Svt1h/MGP0AUTjcwESBEqutn44pGCT4fge8CJZfD3GBls1v3UiRu5R PVEY73UIbq4OqZPIw20suiSl9bDp23ievAJbWwV8OHJRutL8k6+6lDgplohM15DK4qgi xe18buB99irrvha1ixnJlC603qu9KY+8oaanxAqxSJLhPWfgNF6JiCA3rEhgFlFT+fJW nkX4deN590J7sgUQefT79VsnNZhognQcGZ6ND5XoP44MNemInCaGvPwaS/oSIeAky3yt EDgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b="v1/pFV2k"; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-194638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f48e9a4fc6si66942535ad.581.2024.05.29.13.05.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 13:05:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b="v1/pFV2k"; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-194638-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 47F9EB248CC for ; Wed, 29 May 2024 20:04:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E86651C8FA8; Wed, 29 May 2024 20:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="v1/pFV2k" Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (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 ACBB21C6899; Wed, 29 May 2024 20:03:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717013019; cv=none; b=TMp8dcA1JF54xwvVDMvkN07jYA99+MosRw1XfP7Th3yfsoSAA7ZwJ+koDm4K5HWoP/h+DvaZQZLeZal+fmWZzRrrN2PaLhHTiTp/rnInhrZ8OtzJqMB5n2Wlz1e8RuVhBkLusoM+Q/gR6dRRMgJXCqw/AZ+i3BRamEMbwTxVZUA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717013019; c=relaxed/simple; bh=p0av47TaShiR61FN40gZoXyYyrFAYBICVnp0j1ey7u8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=b3ROXojOV8wmuvU0Bj92WjeP5QrQk8WET96K5VnQkvS9KeN/ZHFCxQF8+mU7+GM7ofo4d5c66utljYhVnHeMLtEeU0EyPo/TQZBG+nc5bVgLedXztsqI/SuG1yLr8QTSUMWSNTt4ABcgF437HKbS9wCBQWuxoie8rY9g6zNUfao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=v1/pFV2k; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4VqL0z1JJLzlgMVR; Wed, 29 May 2024 20:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1717013009; x=1719605010; bh=LKEg5H1dDGROJ86EFwGm1wWg YY1kka+ujq1KzN58Xfw=; b=v1/pFV2kN4XkzgtPwBD0INJPraLHuN4SF4bNSnm5 sN7JMiuIkfRpuYfHLPBnJZarMFruFP0JDkYh7NLGw2hs7J58yeOxP/oP7Wx1ujm5 FRkV1+uFl/t9/gSRB00Q1cU0hIMeBpo+x/cXSAaRBKfbb3SG4i7VLc84CpLiVcaS fwJOXCzIkGvyzmJkzE0ceN5GEkHh2ceRWfmfvFlidR3ESccw2GXYZODUQhIZYGYe DWRhoQcrVTmkVhD5RufzpbwQY0Ikx6DK0j+pive95FFiBbsSIj/zGGTkVd+2h4mG KVCp+Z/u0jVXm7ndf+dn7OwTbqUHJZUIjqRjv60GPeKieg== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id Zr4w4ZJVC6KK; Wed, 29 May 2024 20:03:29 +0000 (UTC) Received: from [100.96.154.26] (unknown [104.132.0.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4VqL0v5PR5zlgMVP; Wed, 29 May 2024 20:03:27 +0000 (UTC) Message-ID: <9c066dfb-b84b-49fc-94da-806b71e261d1@acm.org> Date: Wed, 29 May 2024 13:03:26 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/3] scsi: ufs: Allow RTT negotiation To: Avri Altman , "Martin K . Petersen" Cc: Bean Huo , Peter Wang , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240526081636.2064-1-avri.altman@wdc.com> <20240526081636.2064-2-avri.altman@wdc.com> Content-Language: en-US From: Bart Van Assche In-Reply-To: <20240526081636.2064-2-avri.altman@wdc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/26/24 01:16, Avri Altman wrote: > The rtt-upiu packets precede any data-out upiu packets, thus > synchronizing the data input to the device: this mostly applies to write > operations, but there are other operations that requires rtt as well. > > There are several rules binding this rtt - data-out dialog, specifically > There can be at most outstanding bMaxNumOfRTT such packets. This might > have an effect on write performance (sequential write in particular), as > each data-out upiu must wait for its rtt sibling. > > UFSHCI expects bMaxNumOfRTT to be min(bDeviceRTTCap, NORTT). However, > as of today, there does not appears to be no-one who sets it: not the > host controller nor the driver. It wasn't an issue up to now: > bMaxNumOfRTT is set to 2 after manufacturing, and wasn't limiting the > write performance. > > UFS4.0, and specifically gear 5 changes this, and requires the device to > be more attentive. This doesn't come free - the device has to allocate > more resources to that end, but the sequential write performance > improvement is significant. Early measurements shows 25% gain when > moving from rtt 2 to 9. Therefore, set bMaxNumOfRTT to be > min(bDeviceRTTCap, NORTT) as UFSHCI expects. Reviewed-by: Bart Van Assche