From: "Jan Beulich" Subject: Re: blkfront problem in pvops kernel when barriers enabled Date: Wed, 07 Sep 2011 11:19:47 +0100 Message-ID: <4E6761630200007800055087@nat28.tlf.novell.com> References: <4E6357C6.6050101@mimuw.edu.pl> <20110906163213.GC5264@dumpdata.com> <4E665572.7080009@mimuw.edu.pl> <20110907014741.GD30639@dumpdata.com> <4E675A980200007800055050@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4E675A980200007800055050@nat28.tlf.novell.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: "xen-devel@lists.xensource.com" , Marek Marczykowski List-Id: xen-devel@lists.xenproject.org >>> On 07.09.11 at 11:50, "Jan Beulich" wrote: >>>> On 07.09.11 at 03:47, Konrad Rzeszutek Wilk = wrote: >> On Tue, Sep 06, 2011 at 07:16:34PM +0200, Marek Marczykowski wrote: >>> On 06.09.2011 18:32, Konrad Rzeszutek Wilk wrote: >>> > On Sun, Sep 04, 2011 at 12:49:42PM +0200, Marek Marczykowski wrote: >>> >> Hello, >>> >> >>> >> Pvops block frontend (tested vanilla 3.0.3, 3.1rc2, Konrad's = testing >>> >> branch) produces a lot of I/O errors when barriers are enabled but >>> >> cannot be used. >>> >> >>> >> On xenlinux I've got message: >>> >> [ 15.036921] blkfront: xvdb: empty write barrier op failed >>> >> [ 15.036936] blkfront: xvdb: barriers disabled >>> >> >>> >> and after that, everything works fine. On pvops - I/O errors. >>> >> As backend I've used 2.6.38.3 xenlinux (based on SUSE package) and >>> >> 3.1rc2 with same result. >>> >=20 >>> > Hm, and the 'feature-barrier' was enabled on in those backends? >>> > That is really bizzare considering that those backends don't = actually >>> > support WRITE_BARRIER anymore. >>>=20 >>> At least in 2.6.38.3 xenlinux (SUSE). Now I'm not sure if 3.1rc2 also >>> needed this modification (can't find it now). >>>=20 >>> >> When I disable barriers (patching blkbackend to set feature-barrier= =3D0) >>> >> everything works fine with all above versions. >>> >=20 >>> > Ok, and the patch you sent "[PATCH] Initialize vars in blkfront_conne= ct" >>> > as well? >>>=20 >>> Yes. >>> I've noticed now that this patch was needed only on your testing = branch >>> (not vanilla kernel). >>=20 >> Oooo. Let me check what went wrong. Perhaps the fix is already applied = in >> my local tree. >>>=20 >>> >> My setup is xen-4.1.1 (if it matters), backends: phy from device-map= per >>> >> device and phy from loop device; frontends covered by device-mapper >>> >> snapshot, which is set up in domU initramfs. >>> >> >>> >> It looks like some race condition, because when I setup device-mappe= r in >>> >> domU and mount it manually (which cause some delays between steps), = it >>> >> works fine... >>> >> >>> >> Have you idea why it happens? What additional data can I provide = debug it? >>> >> >>> >> In addition it should be possible to disable barrier without = patching >>> >> module... Perhaps some pciback module parameter? Or leave feature-* >>> >=20 >>> > Not sure why you would touch pciback..=20 >>>=20 >>> I mean blkback of course. >>>=20 >>> > But the barrier should _not_ >>> > be enabled in those backends. The 'feature-flush-cache' should be. >>>=20 >>> (on 3.1rc2) Looking to xenstore now there is 'feature-flush-cache=3D1' = and >>> no 'feature-barrier'. So it is ok. >>=20 >> >>=20 >> I can only think of 2.6.38-3 XenOLinux doing it - and it is a bug >> to do it. It really ought to _not_ advertise 'feature-barrier' and >> instead advertise 'feature-flush-cache'. >=20 > Indeed, I see that I added feature-flush-cache support to the frontend > back then, but neglected to do so for the backend. Partly perhaps > because I'm not much of a (block, network, ...) driver person... >=20 > However, what I'm not understanding with dropping feature-barrier > support from the backend - how do you deal with old frontends > wanting to use barriers? I'm currently converting them into > WRITE_FLUSH_FUA operations in the backend as a (hopefully) best > effort approach. Also I notice you're using WRITE_ODIRECT - what's the background of that? Thanks, Jan