Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3279720pxk; Mon, 21 Sep 2020 09:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAgre/2vpJgW0Mf/Kh5ppfgpQea0C8hLvxBeZehlC0RUu367ilicfn9sY1UoUgT3iCIlod X-Received: by 2002:a05:6402:3075:: with SMTP id bs21mr522036edb.236.1600705984596; Mon, 21 Sep 2020 09:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600705984; cv=none; d=google.com; s=arc-20160816; b=dFv24waYV2RKfJw0g0iMpEfsuBgZrteAPwGnKR2VPd9Ss7xJgTKXjB70QVeqLUWngB 0zmHD+rIqsPVwjTqtlX1xxMRv/dvXqTRzbXlkw6HLp9Ne3LJWRXF4FBWMjc4arsLpKuq mwUqYLC0SSzcgWngZnCPLbqKrceKbBvjIzKDfvT+I9kA7Ksj8unjln0Fx57EolObPRsB ifjNI24zGNGToI1+4OC2MUJbgQ6FLPDX0T1ehjT/3I6BojSRUEoSrb5iWRqzCHcBCs12 0dTF9Pdxt6uUc1Q0kxKZe3qpmzybrCzjOuScMih/dQTaMr97gw6Qo7JIOMMRIJ0YF5z9 9CGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZaQa7Abtd+8UEp0nRWic7q85wZ9hYgwWkThXnfGTs2A=; b=QsSWyx8imh2DZ1Ujean6x5m2cBlmyOmPWGwquTT8WUSJ45gEC32Km95mzfcHZur4pq s3efh5PhYC37ttoi+YOzXGuEKVp36fOV8C3waq/nkV1+MaxD6ipWhA8n02zALSAKcIPN Ep1/78uKDpARr/0AbkFzHoh3hxulAHZqA0tT92fDxewWSl3uh5eRhtZJ4Yv3/5nLpW5V /NBi1mUDCEbAiG3SrZEKmmd2u1i7kpI9oWpYVW3zIo6qYN/GqIameGk/V/JnHPGIq/nt G9qwqJ44u6JENKtq+/BxTz4pmONXaICTYGKcBmUkhx5TKV+tCqo+od6vpieDmND9Nt4W Azhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=MLvu1XiM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si8430215edq.528.2020.09.21.09.32.41; Mon, 21 Sep 2020 09:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=MLvu1XiM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727419AbgIUQ3w (ORCPT + 99 others); Mon, 21 Sep 2020 12:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbgIUQ3w (ORCPT ); Mon, 21 Sep 2020 12:29:52 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37502C061755 for ; Mon, 21 Sep 2020 09:29:52 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id k14so13484707edo.1 for ; Mon, 21 Sep 2020 09:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZaQa7Abtd+8UEp0nRWic7q85wZ9hYgwWkThXnfGTs2A=; b=MLvu1XiM37JMQAK8mcEAQHS7riWkwtKaVBpKVAYWsDADTla2z7wxFBQoQoZCPCosWu k/xyc4pdz/9ctIx9GtYlGlNWsy/Pq594BO8Ux18yfFhw4E6jW0wTKVu7AKILG67S52RN GGvi49YkmH7M1+9Fakpl6Bb+YwZKsK6ZKAikMWXr6j7rkLmxEkc25JkOME2lEo+9Ms2O QoqS6rQwQOk2h7O09zMq9bzGo/ZBnyBFwdtXBH7y/JJmm+olQLKajFFxIb2p2diy4C8c 9YMzMAlsTE2VcjvWm1xEqIOQL/Vf82jNw41tlOlf8z4RH5kZrZQitdWYhrgAFokomH7+ wa+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZaQa7Abtd+8UEp0nRWic7q85wZ9hYgwWkThXnfGTs2A=; b=t9QmxdpG4MLAHp4+q8xlWaHsdfofZy1f6a3ctXTFc+l26GmofW9+rOoRXtWR9fOehN bMquO7JeoLktRL9KbgDE0QQ7xxoVTWazuEkHVtnr7dq3H5bNFS7iTklHYHHcvf1qt/dL C3LA9aIB3ys9JGShcxCt0vKITPzy+0TyJ0PRlsRM6Vdysc6JwX+BjXEjsw940dlKvSkm CPZF+HFwtj9RpttSvvh9j2+nVOyb/sGKCC0PBMzVFyeF9XRWZWUAUGKSzkM+I+TZxYkw jiShyGCoOnQxP2irnj/2Lk8eF1bPO61viHzQOADuhWc6J8jBJkawyw9Ixoj3h6Bkbu5p N2tw== X-Gm-Message-State: AOAM5326fGCu4jed6g/vdegt6Fy+ApEqtwabsg1XSAxZZ4NMiQh0H6Cl /k7XmkC8przayPe/i5aau8XvtJf8loHV0KRRpYQCEQ== X-Received: by 2002:aa7:c511:: with SMTP id o17mr500351edq.300.1600705790950; Mon, 21 Sep 2020 09:29:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dan Williams Date: Mon, 21 Sep 2020 09:29:39 -0700 Message-ID: Subject: Re: [RFC] nvfs: a filesystem for persistent memory To: Mikulas Patocka Cc: Linus Torvalds , Alexander Viro , Andrew Morton , Vishal Verma , Dave Jiang , Ira Weiny , Matthew Wilcox , Jan Kara , Eric Sandeen , Dave Chinner , "Kani, Toshi" , "Norton, Scott J" , "Tadakamadla, Rajesh (DCIG/CDI/HPS Perf)" , Linux Kernel Mailing List , linux-fsdevel , linux-nvdimm Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 21, 2020 at 9:19 AM Mikulas Patocka wrote: > > > > On Tue, 15 Sep 2020, Dan Williams wrote: > > > > TODO: > > > > > > - programs run approximately 4% slower when running from Optane-based > > > persistent memory. Therefore, programs and libraries should use page cache > > > and not DAX mapping. > > > > This needs to be based on platform firmware data f(ACPI HMAT) for the > > relative performance of a PMEM range vs DRAM. For example, this > > tradeoff should not exist with battery backed DRAM, or virtio-pmem. > > Hi > > I have implemented this functionality - if we mmap a file with > (vma->vm_flags & VM_DENYWRITE), then it is assumed that this is executable > file mapping - the flag S_DAX on the inode is cleared on and the inode > will use normal page cache. > > Is there some way how to test if we are using Optane-based module (where > this optimization should be applied) or battery backed DRAM (where it > should not)? No, there's no direct reliable type information. Instead the firmware on ACPI platforms provides the HMAT table which provides performance details of system-memory ranges.