Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4747716rwl; Tue, 28 Mar 2023 10:44:02 -0700 (PDT) X-Google-Smtp-Source: AKy350anK8bAWDq6bDqyA9xTQ4tGzGVHLclbwaFO8AuTmqTSKvateBhNxmL08sVYCpeEgWpy7374 X-Received: by 2002:a17:906:dc8a:b0:939:e7d6:b1db with SMTP id cs10-20020a170906dc8a00b00939e7d6b1dbmr14798497ejc.77.1680025442586; Tue, 28 Mar 2023 10:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680025442; cv=none; d=google.com; s=arc-20160816; b=cIDCt5+xtrajZzeVtcTtlP31PII/Wg8DZVSKu1a5g/HzzTLXHlqLinFxCbsuvx56yg 4l5q7o/DC1hoB6zIRZjneteHw4AQ3dxSxgIJcMkub02f1SvuoOWF7/Q4NxzHYiNPuppC pGUIHtT8NxCy9jjNx03YjAtMEJyWP0g8yuESSDA6hTz+qLDkF9Ui/zU0NGbQkNTcFB1w H7nvQoDN+gUIe0EzcPVKc0/rjQ04wPMyuJgG/9P2/BZ52/uUbaIzxTUKJfEFMRgUKKoI HkP7EgROqY5nxe3zZ4eT+wv7iKy8HHmxvW+atE0EsW56Ge9QJFzUkmBdBdaaIcIstRAV dC8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XA3V/SqCMK03TX/XK2Fih6eGxCHfmkEQA7ESYIGi5Fk=; b=EnMIBgzZNbeoQj/dEJyn8v4Xe/H512TDlQTHDdTOcI458vmA+8/A2k29T5OntYNJh5 RL6RN53TB4pv2Li6ZDKPGk+IQoixxmuaPFA78wHYyRZH4BVAs9jyqKJaqK0/xKPgaOVp UHnLi03skxeY2lXecci622mqf2ejUtaAuB/klnMZjDeGWqe6vxlFpJ2/ZEsomw2Y5IpA +0imzzZkY07/iKxzD3Dq09hPCB3eFl9LthZICmNPx5Ba2MB0Jq8j5Ey2xIkDEMGVqP62 skE1IJgMTDeb4u0iSKA5PNZAjjA8wMYYR+yiRR/I4/ZrDXnPhH1Z0AIESZrteEw9zrF+ B2+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wSBhrhYn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020aa7c6c1000000b005024c85f879si3411113eds.481.2023.03.28.10.43.35; Tue, 28 Mar 2023 10:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wSBhrhYn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229575AbjC1RlM (ORCPT + 99 others); Tue, 28 Mar 2023 13:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbjC1RlK (ORCPT ); Tue, 28 Mar 2023 13:41:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AC8AF09 for ; Tue, 28 Mar 2023 10:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XA3V/SqCMK03TX/XK2Fih6eGxCHfmkEQA7ESYIGi5Fk=; b=wSBhrhYnvDL1WlDW+LBAElxarl ZR2NCQ2dBSyG9IhbY5oWyVLJGh0Yc3uNJZ7hiV3EiTSqux8Fa/936yvG4bjeQ3F6+auHlCsNZYe2j UWqkpvzzMvld0VUXKopREQfYoOAn5GBnLiISGA3Mv1vqRtqBVrNuLGUTDBkJ6cXz8cUOy/1XfPdi8 m2j/hLjPyWNp+m5ShslGKL+X4ndyaaHFZj+PraJxfT6esn+4g9Ms49NZFXVE2W0vLjWco1U4SZDIB eNvtI97S8YJpvgWbXEm4hcReX9tq9JhmM4Bhg3FW9yboPKIkJMPXwSc/nGazL2qODu3KJYjQXBfVe LgdAEKZA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1phDJe-00FLag-0g; Tue, 28 Mar 2023 17:41:02 +0000 Date: Tue, 28 Mar 2023 10:41:02 -0700 From: Luis Chamberlain To: Christian Schoenebeck Cc: Dominique Martinet , Eric Van Hensbergen , Josef Bacik , Jeff Layton , lucho@ionkov.net, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, Amir Goldstein , Pankaj Raghav Subject: Re: 9p caching with cache=loose and cache=fscache Message-ID: References: <2391219.DQnbcWml7j@silver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2391219.DQnbcWml7j@silver> Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 28, 2023 at 01:53:49PM +0200, Christian Schoenebeck wrote: > Hi Luis, > > not sure which QEMU wiki page you are referring to. AFAIK we currently have 3 > QEMU wiki pages concerning 9p: > > 1. 9p documentation for users: > https://wiki.qemu.org/Documentation/9psetup It was this one. I hadn't looked at the other ones. > 2. 9p documentation for developers only: > https://wiki.qemu.org/Documentation/9p > > 3. How to setup an entire guest on top of a 9p root filesystem: > https://wiki.qemu.org/Documentation/9p_root_fs > > Only the latter wiki page mentions cache=loose at all: > > "To speedup things you can also consider to use e.g. cache=loose instead. > That will deploy a filesystem cache on guest side and reduces the amount > of 9p requests to hosts. As a consequence however guest might not > immediately see file changes performed on host side. So choose wisely upon > intended use case scenario. You can change between cache=mmap or e.g. > cache=loose at any time." > > Which I now changed to: > > "To speedup things you can also consider to use e.g. cache=loose instead. My experience is that cache=loose is totally useless. > That will deploy a filesystem cache on guest side and reduces the amount of > 9p requests to hosts. As a consequence however guest might not see file > changes performed on host side *at* *all* I think that makes it pretty useless, aren't most setups on the guest read-only? It is not about "may not see", just won't. For example I modified the Makefile and compiled a full kernel and even with those series of changes, the guest *minutes later* never saw any updates. > (as Linux kernel's 9p client > currently does not revalidate for fs changes on host side at all, which is > planned to be changed on Linux kernel side soon though). So choose wisely > upon intended use case scenario. You can change between cache=mmap or e.g. > cache=loose at any time." > > On the user page it was already clearly mentioned though: > > "Mount the shared folder on guest using > > mount -t 9p -o trans=virtio test_mount /tmp/shared/ -oversion=9p2000.L,posixacl,msize=104857600,cache=none > > In the above example the folder /home/guest/9p_setup/ shared of the host > is shared with the folder /tmp/shared on the guest. We use no cache because > current caching mechanisms need more work and the results are not what you > would expect." I got a wiki account now and I was the one who had clarified this. Luis