From owner-freebsd-xen@FreeBSD.ORG Wed Jul 6 01:14:23 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 613231065676 for ; Wed, 6 Jul 2011 01:14:23 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 23AE2151FED for ; Wed, 6 Jul 2011 01:14:18 +0000 (UTC) Received: (qmail 3879 invoked from network); 6 Jul 2011 01:14:17 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2011 01:14:17 -0000 Message-ID: <4E13B6E9.9070202@freebsd.org> Date: Tue, 05 Jul 2011 18:14:17 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101220 Thunderbird/3.0.11 MIME-Version: 1.0 To: gibbs@freebsd.org References: <4DF18EE5.5090704@freebsd.org> <4DF27EFF.5060005@FreeBSD.org> In-Reply-To: <4DF27EFF.5060005@FreeBSD.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-xen@freebsd.org" Subject: Re: breakage in blkfront with ring_pages > 1 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2011 01:14:23 -0000 On 06/10/11 13:30, Justin T. Gibbs wrote: > On 6/9/11 9:26 PM, Colin Percival wrote: >> Has anyone seen anything like this? Is it possible that there's a bug >> in how our blkfront negotiates the request ring? Does anyone have >> ring_pages > 1 in use? > > The only backend driver I know of that can support more than one ring page > is FreeBSD. So, the problem likely is that blkfront is getting the > negotiation wrong and only 1 page is in use. Turns out that the linux backend in question really does support multiple pages. There's also an inconsistency about how multiple rings are negotiated: We set: * ring-pages to the number of pages blkfront wants to use * ring-ref to the reference for the first page * ring-refXX to the references for other pages while linux sets: * num-ring-pages to the number of pages blkfront wants to use * ring-refXX to the page references. It seems to be impossible to be compatible with both, since Linux interprets having a value set for ring-ref to indicate that the single-ring protocol is being used and doesn't check anything else. Is there any official source which defines the blkback/front protocol? Maybe the right option is to have a loader tunable dev.xn.linuxback to control which version of the protocol is used? -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid