From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] cxenstored: correct calculation of data/space in the ring Date: Mon, 16 Nov 2015 18:06:00 +0000 Message-ID: <564A1B08.5080900@citrix.com> References: <1447678398-31431-1-git-send-email-wei.liu2@citrix.com> <22090.6649.488665.395378@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZyOAX-0001n2-3j for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 18:06:21 +0000 In-Reply-To: <22090.6649.488665.395378@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , Wei Liu Cc: Xen-devel , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 16/11/15 18:01, Ian Jackson wrote: > Wei Liu writes ("[PATCH] cxenstored: correct calculation of data/space in the ring"): >> The cxenstored implementation can't handle cross ring boundary read and >> write. It gets aways with buggy behaviour because upper layer won't >> sleep when short-write or short-read occurs. > I don't understand why you think this is a bug. It is exactly the same bug as I fixed in c/s 8a2c11f8 The short reads/writes themselves aren't inherently a problem. They are genuine signals that the server should wait for the client to produce/consume more data. However, the low level functions erroneously return a short read/write when hitting the ring boundary when there is actually more space/data. This causes a protocol stall as the server incorrectly believes that the client has the next action to perform. ~Andrew