Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2582327ybh; Mon, 16 Mar 2020 06:04:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtU3708XG6KPo+BYmH1B9QwT/yQQB3WZKpvrnLpqypUMTtnsvzJOluMfJdjMMdZG4O6pXcE X-Received: by 2002:a05:6830:1bc9:: with SMTP id v9mr2817302ota.319.1584363877367; Mon, 16 Mar 2020 06:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584363877; cv=none; d=google.com; s=arc-20160816; b=JjuHm+1CgLJ69wIgaiG8zJZsu6v/LX2zG5QYRykLCuV6nYeoUuRXXFrcb3wAKdRAS2 XY/JDG8LwiYUdOpgf9PB1QN+WOW1BMK6+2cH/J7nMui/yCJQSfbZP5I4e6lUsldip/T9 m177GiqdTXfsobe5EmVajCEb+4MVpuV3cADwaNrKzXITRu1VvQrw/Bc9IjCN3s1mxdYr Fu2gglzDnEOudi55UQ+ZDZ4XvEyEXQiEqpqICe743tp/X5gEZhga4kVQggpmXufzrx8V 6o+2/VTbPSBLoRVxejaa0+pM4HWx+E0EKBLNShwGT1JmpIPDi+ksxvRpErZZfH9PxiDV 4ZWw== 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=LLQsyKzFI2FWMsfb3WnnDbhofXGcpSrAYcxTSH7lcYc=; b=KptOkJjbMEER+nYdRScd0JE5SVwEjlWKNzQhymYZdyAQhwqS8KvCkvAeD/coNvrN+n 3L8wEo0M+IpOFudYieoD8WN2AaZFu/ECCBNNUb162NUqxETUnO7OFWOO7nvNHi9ryZfZ C958GrrSOolTwd7FoGyf9YmJ5hXCC5lwrDJ0f02tW3CLv/VTyii2xDLiNtrO15l93Iti xrWvWk7I+hk63GvzulwG3ZE4dqdQ6AYp9i6hlAdhus/mKyP1aXJJEP7LRrwgsnAVnEaM DzxlqfCSW5G7SokSut9iFtUEqp4vT29nxSSG5PdkB9Np2TsuvbNORpIArPe4M08ucVZq BTDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TG2pE5vA; 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 a9si2258054oto.276.2020.03.16.06.04.17; Mon, 16 Mar 2020 06:04:37 -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=TG2pE5vA; 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 S1731130AbgCPNCx (ORCPT + 99 others); Mon, 16 Mar 2020 09:02:53 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:37558 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731062AbgCPNCx (ORCPT ); Mon, 16 Mar 2020 09:02:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584363772; 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=LLQsyKzFI2FWMsfb3WnnDbhofXGcpSrAYcxTSH7lcYc=; b=TG2pE5vAZL9AMj9b2S4oQAmmVKvtMcY1AoTXTMcIWD5TyZNHgaXoQBvQSyfYbtJfczDqRL LUrYN/YX/veQ6fNWtaneuWxq4jj3bS84ceJMJuaSk+JVDIJs9YVwhVGuaUZL4k1DcShcfE cOCj5SXcebXF2W73VLkYs8kal89FvOs= 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-472-qiNL0Hy_PamcS1YiC1ZLyw-1; Mon, 16 Mar 2020 09:02:44 -0400 X-MC-Unique: qiNL0Hy_PamcS1YiC1ZLyw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 722D81005516; Mon, 16 Mar 2020 13:02:43 +0000 (UTC) Received: from horse.redhat.com (ovpn-121-211.rdu2.redhat.com [10.10.121.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC04C92D0C; Mon, 16 Mar 2020 13:02:34 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 1FFCA2234E4; Mon, 16 Mar 2020 09:02:34 -0400 (EDT) Date: Mon, 16 Mar 2020 09:02:34 -0400 From: Vivek Goyal To: Patrick Ohly Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, virtio-fs@redhat.com, miklos@szeredi.hu, stefanha@redhat.com, dgilbert@redhat.com, mst@redhat.com Subject: Re: [PATCH 00/20] virtiofs: Add DAX support Message-ID: <20200316130234.GA4013@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.15 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 02:38:03PM +0100, Patrick Ohly wrote: > Vivek Goyal writes: > > 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. > > As a potential user of this, let me make sure I understand the expected > outcome: is the goal to let virtiofs use DAX (for increased performance, > etc.) or also let applications that use virtiofs use DAX? > > You are mentioning using the host's page cache, so it's probably the > former and MAP_SYNC on virtiofs will continue to be rejected, right? Hi Patrick, You are right. Its the former. That is we want virtiofs to be able to make use of DAX to bypass guest page cache. But there is no persistent memory so no persistent memory programming semantics available to user space. For that I guess we have virtio-pmem. We expect users will issue fsync/msync like a regular filesystem to make changes persistent. So in that aspect, rejecting MAP_SYNC makes sense. I will test and see if current code is rejecting MAP_SYNC or not. Thanks Vivek