From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53826 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzTOC-0006U4-2H for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:30:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzTO6-0005Mg-7R for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:30:15 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:33649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzTO5-0005LS-Ab for qemu-devel@nongnu.org; Tue, 15 Mar 2011 08:30:10 -0400 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp04.in.ibm.com (8.14.4/8.13.1) with ESMTP id p2FCU4va015480 for ; Tue, 15 Mar 2011 18:00:04 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2FCU4MZ4399304 for ; Tue, 15 Mar 2011 18:00:04 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2FCU3US022370 for ; Tue, 15 Mar 2011 23:30:03 +1100 From: "Aneesh Kumar K. V" Subject: Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache In-Reply-To: References: <1299347533-17047-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1299347533-17047-7-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87y64iq1tz.fsf@linux.vnet.ibm.com> <87ipvkwxk5.fsf@linux.vnet.ibm.com> Date: Tue, 15 Mar 2011 18:00:00 +0530 Message-ID: <87wrk0pnw7.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Tue, 15 Mar 2011 11:11:46 +0000, Stefan Hajnoczi wr= ote: > On Tue, Mar 15, 2011 at 9:19 AM, Aneesh Kumar K. V > wrote: > > On Mon, 14 Mar 2011 10:20:57 +0000, Stefan Hajnoczi wrote: > >> On Sun, Mar 13, 2011 at 7:04 PM, Aneesh Kumar K. V > >> wrote: > >> > On Sun, 13 Mar 2011 17:23:50 +0000, Stefan Hajnoczi wrote: > >> >> On Sat, Mar 5, 2011 at 5:52 PM, Aneesh Kumar K.V > >> >> wrote: > >> >> > cache=3Dnone implies the file are opened in the host with O_SYNC = open flag > >> >> > >> >> O_SYNC does not bypass the host page cache. =C2=A0It ensures that w= rites > >> >> only complete once data has been written to the disk. > >> >> > >> >> O_DIRECT is a hint to bypass the host page cache when possible. > >> >> > >> >> A boolean on|off option would be nicer than an option that takes the > >> >> special string "none". =C2=A0For example, direct=3Don|off. =C2=A0It= also makes the > >> >> code nicer by using bools instead of strdup strings that get leaked. > >> >> > >> > > >> > What i wanted is the O_SYNC behavior. Well the comment should be upd= ated. I > >> > want to make sure that we don't have dirty data in host page cache a= fter > >> > a write. It is always good to make read hit the page cache > >> > >> Why silently enforce O_SYNC on the server side? =C2=A0The client does = not > >> know whether or not O_SYNC is in effect, cannot take advantage of that > >> knowledge, and cannot control it. > >> > >> I think a more useful solution is a 9p client mount option called > >> "sync" that caused the client to always add O_SYNC and skip syncfs. > >> The whole stack becomes aware of O_SYNC and clients are in control > >> over whether or not they need O_SYNC semantics. > > > > The cache=3Dnone specifically enables us to ignore the tsyncfs request = on > > host. tsyncfs on host can be really slow in certain setup. >=20 > If I'm a client with the "sync" mount option all my fids are O_SYNC > and I do not need to send TSYNCFS requests to the server because my > fids are already stable. Having sync mount option is useful, Infact for dotu we already default O_SYNC on the client side because we don't have tsyncfs. But being able to avoid the tfsyncfs flush from the server point of view also is nice. Consider a setup where one doesn't have control on the guest mount option but can control the qemu export options. -aneesh