Received: by 10.192.165.148 with SMTP id m20csp640271imm; Fri, 20 Apr 2018 12:44:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49DU9rcEL2B4BPQBM1Igfrzdn37ZnBKIrC3DO/Xgt/EsO55+Fp/DRgDmLl+r6UQLJPjJQyg X-Received: by 10.99.109.132 with SMTP id i126mr9565802pgc.414.1524253471040; Fri, 20 Apr 2018 12:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524253471; cv=none; d=google.com; s=arc-20160816; b=Wy3IiuiwwALsuX/GQsYzy9zl5mtGnkFHfkijfc93R+AKaAW3EtEKAiCze87QWAQhtG GNX0ceEr/Axkzrv704YS8GRDHPdyObVsNEke+3EzqYsXBeoN3GNGHez4xgZpT21gHHBX z/+3VwxpDo/Czj133dCDlybTTCE4+DCilKg6AGy+O9BPhkC1NJHR00YDzgXtkPt16ZjZ Rb08/QUYUO7MbMHOhZA4bHmduWf+QB5S8thvXDLqzuRVMO5PdXz3bbGDVZQv4Olu/pyA m9rTjrQYrrBLFmyYWJwBe/PI+uUGbn25/CaZvQu67Y0HZVL250xLccNGKflXf/GBTf4e NIww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature:arc-authentication-results; bh=8FpJiALx6Qvb4fXCGI3xiVWpz3RvIieW6rwGdbmyz2k=; b=ucURdNY+cdObwS66nfqdAgdnPCuVc2kt7L0Auc0QJPv+t1LkKtF+Spoz9jNlONE8zb TzNupbL0/8Fdav62CjAnzuNM1LPi59zL0Hyb+DCNDhF3WaNefpm7GNa15IsArOBLvlXo MZKKHVLiatrRj5jphZg/ql4iXn96kz45uaHZMxDW455boMS47ygpG8wANXkqk0neUwzh wfXlARP7KsU/tTANgp6aUW+wtb+FsJzruIlR+9mwr1TmDiI9jyS71NEFQZxovVzaTIp3 +VUszfn0ZFkOXrhJEyv65w3m3Ln8HXK1/qs77KUBdnBdObAQAQNLOtFm9K61IVC9mzlV swvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=CEpep6IC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si6267137pla.348.2018.04.20.12.44.16; Fri, 20 Apr 2018 12:44:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=CEpep6IC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752741AbeDTTlB (ORCPT + 99 others); Fri, 20 Apr 2018 15:41:01 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:38492 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbeDTTlA (ORCPT ); Fri, 20 Apr 2018 15:41:00 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3KJaLwV170129; Fri, 20 Apr 2018 19:40:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2017-10-26; bh=8FpJiALx6Qvb4fXCGI3xiVWpz3RvIieW6rwGdbmyz2k=; b=CEpep6IC9ZF06LONK5vwmQJrW1yexK5CMbHLCkuetzNyqXidbDPDbnRQrUZt8PE1TquR WBoG1dWCu8nqKevBcgB3OW1d+MEKrbBuyIGu9JLAOY2u9kaAi729VLySHip0H/AIfp4z VzE1PMwrCCCKzOkTng+2p/DdTg/2QYhuSrCllXXqFkFw+IB1gSwOnZjJTg+lvs1W7JmP 81VLVjDWua2MkQdbC9oP8xT5D6qz2GsTrh3e0MpcZ+Qsr2iF25k3vJN9/mMitRbOBBoo flVLePWLHudlFGAwZn8QZ1+KV49rto3JjvHS+xgQaKDppBaNcOk+7pauheO1zaNTS2Jv tg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2hf7amuhbb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Apr 2018 19:40:15 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3KJeFMl016837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Apr 2018 19:40:15 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3KJeEKm022854; Fri, 20 Apr 2018 19:40:14 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 20 Apr 2018 12:40:14 -0700 To: Long Li Cc: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , "James E . J . Bottomley" , "Martin K . Petersen" , devel@linuxdriverproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, longli@microsoft.com Subject: Re: [Patch v2] Storvsc: Select channel based on available percentage of ring buffer to write From: "Martin K. Petersen" Organization: Oracle Corporation References: <20180419215424.3557-1-longli@linuxonhyperv.com> Date: Fri, 20 Apr 2018 15:40:11 -0400 In-Reply-To: <20180419215424.3557-1-longli@linuxonhyperv.com> (Long Li's message of "Thu, 19 Apr 2018 14:54:24 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8869 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=275 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804200197 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Long, > This is a best effort for estimating on how busy the ring buffer is > for that channel, based on available buffer to write in percentage. It > is still possible that at the time of actual ring buffer write, the > space may not be available due to other processes may be writing at > the time. > > Selecting a channel based on how full it is can reduce the possibility > that a ring buffer write will fail, and avoid the situation a channel > is over busy. > > Now it's possible that storvsc can use a smaller ring buffer size > (e.g. 40k bytes) to take advantage of cache locality. Applied to 4.18/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering