Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp543249ybh; Wed, 11 Mar 2020 06:11:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv4U2zG304Pz7oUSV6iqONHgNeQywQNTvniYVA9t+I60vtkYw2iVUVCB5y+KEAYp7gJ82v+ X-Received: by 2002:a9d:5d09:: with SMTP id b9mr2256871oti.207.1583932280114; Wed, 11 Mar 2020 06:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583932280; cv=none; d=google.com; s=arc-20160816; b=c36y6dOkedIYZMcQnNWZPoQaf2vFECZRWInf8U6fzPfCH20HoaXTnuJayYERrOKTTD nbKhpIiB/iQWHsy/2BADBAnl3T0Js8dbtVlTbyto2qyM8tRCLvpEym8NQXayvsb79/LP djZQWEg/OADORXi5ZPe7Q6/znPhhLDzZAFwSOzLzVnva/ngif3Yw45YSrnXfhKWqJqEA /1s856pZFD7bTR4Dy7WCzYDepAmMS4RTfrIGfKw/fIURQ7Q81U05gGCy0OSnZ1WHb4ed gtU+uihpUXr27ZCGiErgdqkxqjyglz3hDd7Pc7lI3rUnHFSlG9ldncQV97DYmfPioy8Y r5Bg== 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=VDM9LIZ1dZEOVsYN/mQJAJNoEgl31yjLC3AqMHbBT9Q=; b=UMmjQNM/rc1PPxOESA6xCerr4iZC4+9p9VjZ52e74G7ZqgwjZ5K8u4cwFOS30Mdvhm vUTCa2C6pY7AgKzcAi7r/PLfa2RuQxHhgyEfSwrbu2BpteiDGdiBdTAfAPYMvr9g2DWZ THC37t4KRCXLK4kvqM60Xon3QIMwuOR57DMpp8WM/1C54f/dZ/QzxGrhRTUVQmtKh6U/ QRmUUhKpVyEFnGrAnLUaH9SvRbRQrzEwLMMcx/pJ+KGSsTVIybuNtFst4rzViivIGhdB p/F3ag5r8ZbrFh/5NusG+TxiuiA/JtyKMc2pChM8VYxtPIjbSqRshQe7V1GwPDPQ/tSY 3iAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="JOs0/U0K"; 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 c10si1663692ots.134.2020.03.11.06.11.07; Wed, 11 Mar 2020 06:11:20 -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="JOs0/U0K"; 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 S1729522AbgCKNKB (ORCPT + 99 others); Wed, 11 Mar 2020 09:10:01 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:22800 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729331AbgCKNKB (ORCPT ); Wed, 11 Mar 2020 09:10:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583932200; 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=VDM9LIZ1dZEOVsYN/mQJAJNoEgl31yjLC3AqMHbBT9Q=; b=JOs0/U0KZkC/Uce0+trUmbNmInyQ59BwERDZMbmzE+rxx47NC1jwOCMwXQBR6GMGhRUKxa 01DiFY2aUBpZWrkEaxfLBv5lv3boXX1gj+9w+Tcf7Eo0rAbt8JTYjxBcRldZv02thPT4Gq TU34WNZr98oRpuNz+4yJYxltY+6Voyc= 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-481-oFo9-IHjMPCp36R8bE2y1w-1; Wed, 11 Mar 2020 09:09:56 -0400 X-MC-Unique: oFo9-IHjMPCp36R8bE2y1w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF53D13EA; Wed, 11 Mar 2020 13:09:54 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33A125D9C9; Wed, 11 Mar 2020 13:09:46 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id A466822021D; Wed, 11 Mar 2020 09:09:45 -0400 (EDT) Date: Wed, 11 Mar 2020 09:09:45 -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: <20200311130945.GA90606@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.14 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. Lot of this code is coming from logic to reclaim dax memory range assigned to inode. I will look into moving some of it to a separate file. Vivek