From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtJ49-0003iN-K6 for qemu-devel@nongnu.org; Tue, 06 May 2008 05:02:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtJ46-0003gy-Eu for qemu-devel@nongnu.org; Tue, 06 May 2008 05:02:27 -0400 Received: from [199.232.76.173] (port=59391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtJ45-0003gZ-8s for qemu-devel@nongnu.org; Tue, 06 May 2008 05:02:25 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JtJ44-0006UJ-Kh for qemu-devel@nongnu.org; Tue, 06 May 2008 05:02:25 -0400 Subject: Re: [Qemu-devel] [PATCH] Align file accesses with cache=off (O_DIRECT) From: Laurent Vivier In-Reply-To: <48201A71.3040405@suse.de> References: <4807514B.9040607@suse.de> <200804302305.42741@kevin-wolf.de> <200805011955.00265@kevin-wolf.de> <48201A71.3040405@suse.de> Content-Type: text/plain; charset=UTF-8 Date: Tue, 06 May 2008 11:02:47 +0200 Message-Id: <1210064567.4311.21.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Blue Swirl , qemu-devel@nongnu.org Le mardi 06 mai 2008 =C3=A0 10:44 +0200, Kevin Wolf a =C3=A9crit : > Kevin Wolf schrieb: > > Am Donnerstag, 1. Mai 2008 16:35:51 schrieb Blue Swirl: > >> On 5/1/08, Kevin Wolf wrote: > >>> Am Mittwoch, 30. April 2008 16:30:27 schrieb Blue Swirl: > >>>> Maybe the alignment could be handled like AIO and synchronous IO > >>>> > >>> > emulation layers are added in bdrv_register, but at open stage? > >>> > >>> You mean to preserve the original pread if the file is opened witho= ut > >>> O_DIRECT and replace it by the emulation function only if O_DIRECT = is > >>> really used? > >> Right. > >> > >> Maybe it's slightly faster that way and it would be closer to how > >> other block emulations are handled. It's just an idea. > >=20 > > Maybe I'm missing something but AFAIK this pread pointer exists once = for each=20 > > block driver, i.e. every raw image uses the original pread or every r= aw image=20 > > uses the emulating one. The difference between the O_DIRECT case and = the=20 > > AIO/sync emulation is that AIO/sync is the same for all devices of on= e driver=20 > > while O_DIRECT can differ between images of the same driver. > >=20 > > So you would need to have one common pread which in turn calls a func= tion=20 > > pointer stored in the BlockDriverState. I doubt that this is much che= aper=20 > > than an if in pread. And it wouldn't get too close to other emulation= s anyway=20 > > because of the driver/device difference. >=20 > Should I change the patch now (even if I think it doesn't help anything= )=20 > or will you apply the patch as it is? It is quite frustrating to get no= =20 > answer at all. Well, what is missing to Qemu is a MAINTAINERs list... Fabrice, did you define sometime who can submit code in the repository and on which part ? Perhaps you could write this in a "MAINTAINERS" file ? So we can CC: the maintainer when we have code to submit. As I'm relatively new here, perhaps it is already existing or defined... Regards,=20 Laurent --=20 ------------- Laurent.Vivier@bull.net --------------- "The best way to predict the future is to invent it." - Alan Kay