From: Ian Jackson Subject: Re: [PATCH] cxenstored: correct calculation of data/space in the ring Date: Mon, 16 Nov 2015 18:09:54 +0000 Message-ID: <22090.7154.132658.175769@mariner.uk.xensource.com> References: <1447678398-31431-1-git-send-email-wei.liu2@citrix.com> <22090.6649.488665.395378@mariner.uk.xensource.com> <564A1B08.5080900@citrix.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 1ZyOE3-000284-Gy for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 18:09:59 +0000 In-Reply-To: <564A1B08.5080900@citrix.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: Andrew Cooper Cc: Xen-devel , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [PATCH] cxenstored: correct calculation of data/space in the ring"): > 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. If I understand Wei correctly you are contradicting him. The `upper layer' in question is inside the C xenstored so there is no protocol stall. (I haven't peered at the code...) Ian.