From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: Re: [PATCH MINI-OS] xenbus: notify the other end when necessary Date: Mon, 26 Oct 2015 13:33:12 +0100 Message-ID: <20151026123312.GJ19459@var.bordeaux.inria.fr> References: <1445852868-16532-1-git-send-email-wei.liu2@citrix.com> <20151026120245.GA19459@var.bordeaux.inria.fr> <20151026121442.GD13118@zion.uk.xensource.com> <20151026122151.GC19459@var.bordeaux.inria.fr> <20151026123028.GE13118@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20151026123028.GE13118@zion.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: Wei Liu Cc: minios-devel@lists.xenproject.org, Xen-devel , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Wei Liu, le Mon 26 Oct 2015 12:30:28 +0000, a =E9crit : > On Mon, Oct 26, 2015 at 01:21:51PM +0100, Samuel Thibault wrote: > > Wei Liu, le Mon 26 Oct 2015 12:14:43 +0000, a =E9crit : > > > In my patch, mini-os notifies remote whenever it consumes a message, > > > which I think it's slightly better because backend can start putting > > > things in the ring as mini-os processes them. > > = > > That makes more notifications, but that can lead to more pipelining > > indeed. That's what the Linux driver does, so let's do the same. > > = > > Also, I'm realizing: aren't we missing a full memory barrier between > > the memcpy_from_ring call and xenstore_buf->rsp_cons +=3D ? (in the two > > places) We need to make sure to have finished copying from the ring > > before writing the new rsp_cons. > > = > = > You're right. > = > I think we should just turn that wmb() into two mb()s and place them > before xenstore_buf->rsp_cons +=3D. We *also* need some barrier between rsp_cons +=3D and the notification, otherwise the notified domain may miss the rsp_cons update and thus believe it was a spurious notification. Samuel