Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp837362ybh; Wed, 11 Mar 2020 11:50:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu1p2ysY/Tu/0u+ZCG6BSFi5upLUyu0FrSjWul8Mu85SNuJfxLzNVPfLlp+bc8dmNZX92LK X-Received: by 2002:aca:7517:: with SMTP id q23mr63742oic.23.1583952611701; Wed, 11 Mar 2020 11:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583952611; cv=none; d=google.com; s=arc-20160816; b=E1cL8GZv8iY5rpGjUl/ruVqrJGsomnSvctTezo/G86sGDCJiL1HpJ48D0AOOfVIzeO XOjNjxEa0oPbZcgBtadgARF8ejz7I8WqyWLR1oHR9sWv0OIfUtzQpa1AObymHU/HCYF3 ldL9X4PSm38CtgRseQun6GGGM0IepbMzPeiGeX1KboGmZ1m3shqhnZ+eWlv1XN7h0+H4 ZuQN9cmb/n+X4qt4u1cyuXgBo+Uy5etrgRUbNneovaOts0zGUru33+e8eds8QyiKnIcm XYGLhVvgUCcaCLoE8iln+fjlwLY0S5m04rKao1dHMjDFXUjskVM1wX20KkLkrEGIeQmc P2Rw== 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=bMn5VsQsp930KA1I/ZJbWcOCwMA4aqEYv8NsDetmcJU=; b=Iv1g9RAgaTruH/fsNwBLkoKpC9xGjJHYcU8ftjVrWq7+qJXm4o9FneOHta794lgKSe QLAkzmtGOIrbq7HUZ3qYCsFPKD8MsARF5YkOoluh3PlSAcwMuacIWx4958dXa8l6JKqd K+C0H3CeIrfhNoyFu/eDNl8pRLgb/fIJCNiJk+4FdS/Pd4cwbZUOzUqhUXITt9ypkYn+ nWNM14bNPaAcjtU5xZLm/cX2BkulPc6CqbQRn/XMDdEe+7PARg3T1xg0GJmmP4lH8TgC IeQCxEl40jJhbdHSEqQrcuZdV9RLDtoDz8+ozThK9outnCgjdXb8Avjj0pHeemmuSN/5 unIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fY+i3Sqf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f36si1639225otf.201.2020.03.11.11.49.59; Wed, 11 Mar 2020 11:50:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fY+i3Sqf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730838AbgCKSsp (ORCPT + 99 others); Wed, 11 Mar 2020 14:48:45 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42684 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730755AbgCKSsp (ORCPT ); Wed, 11 Mar 2020 14:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583952524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bMn5VsQsp930KA1I/ZJbWcOCwMA4aqEYv8NsDetmcJU=; b=fY+i3SqfQKA3ZEhjfiIR3sEQBCkiApF4v7oKOdkBnoHyIClFin9F9cGuzXuSiYFM4ojfeY bajGxCwEvUadyIRpytjvXdUFQzirVl81Es4jz371b1qHyCnkBKOiefO7T6iBpL6sP7MXTV K1m3ZEDh2DRmYvobQH7PFjXMuK5l4PY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-ZZQiu4saN3OKau72Vg4fvg-1; Wed, 11 Mar 2020 14:48:40 -0400 X-MC-Unique: ZZQiu4saN3OKau72Vg4fvg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34C161005510; Wed, 11 Mar 2020 18:48:39 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id 424118F364; Wed, 11 Mar 2020 18:48:31 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id C3BEB22021D; Wed, 11 Mar 2020 14:48:30 -0400 (EDT) Date: Wed, 11 Mar 2020 14:48:30 -0400 From: Vivek Goyal To: Amir Goldstein Cc: linux-fsdevel , linux-kernel , linux-nvdimm , virtio-fs@redhat.com, Miklos Szeredi , Stefan Hajnoczi , "Dr. David Alan Gilbert" , mst@redhat.com Subject: Re: [PATCH 00/20] virtiofs: Add DAX support Message-ID: <20200311184830.GC83257@redhat.com> References: <20200304165845.3081-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 07:22:51AM +0200, Amir Goldstein wrote: > On Wed, Mar 4, 2020 at 7:01 PM Vivek Goyal wrote: > > > > Hi, > > > > This patch series adds DAX support to virtiofs filesystem. This allows > > bypassing guest page cache and allows mapping host page cache directly > > in guest address space. > > > > When a page of file is needed, guest sends a request to map that page > > (in host page cache) in qemu address space. Inside guest this is > > a physical memory range controlled by virtiofs device. And guest > > directly maps this physical address range using DAX and hence gets > > access to file data on host. > > > > This can speed up things considerably in many situations. Also this > > can result in substantial memory savings as file data does not have > > to be copied in guest and it is directly accessed from host page > > cache. > > > > Most of the changes are limited to fuse/virtiofs. There are couple > > of changes needed in generic dax infrastructure and couple of changes > > in virtio to be able to access shared memory region. > > > > These patches apply on top of 5.6-rc4 and are also available here. > > > > https://github.com/rhvgoyal/linux/commits/vivek-04-march-2020 > > > > Any review or feedback is welcome. > > > [...] > > drivers/dax/super.c | 3 +- > > drivers/virtio/virtio_mmio.c | 32 + > > drivers/virtio/virtio_pci_modern.c | 107 +++ > > fs/dax.c | 66 +- > > fs/fuse/dir.c | 2 + > > fs/fuse/file.c | 1162 +++++++++++++++++++++++++++- > > That's a big addition to already big file.c. > Maybe split dax specific code to dax.c? > Can be a post series cleanup too. How about fs/fuse/iomap.c instead. This will have all the iomap related logic as well as all the dax range allocation/free logic which is required by iomap logic. That moves about 900 lines of code from file.c to iomap.c Vivek