From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [Patch v2] Storvsc: Select channel based on available percentage of ring buffer to write Date: Fri, 20 Apr 2018 15:40:11 -0400 Message-ID: References: <20180419215424.3557-1-longli@linuxonhyperv.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180419215424.3557-1-longli@linuxonhyperv.com> (Long Li's message of "Thu, 19 Apr 2018 14:54:24 -0700") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Long Li Cc: Stephen Hemminger , linux-scsi@vger.kernel.org, "Martin K . Petersen" , Haiyang Zhang , "James E . J . Bottomley" , linux-kernel@vger.kernel.org, devel@linuxdriverproject.org List-Id: linux-scsi@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