From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B84FBC4338F for ; Thu, 5 Aug 2021 03:24:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9686761050 for ; Thu, 5 Aug 2021 03:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238473AbhHEDZA (ORCPT ); Wed, 4 Aug 2021 23:25:00 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:52778 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231321AbhHEDY7 (ORCPT ); Wed, 4 Aug 2021 23:24:59 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R831e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Ui.Qxi0_1628133882; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Ui.Qxi0_1628133882) by smtp.aliyun-inc.com(127.0.0.1); Thu, 05 Aug 2021 11:24:43 +0800 Date: Thu, 5 Aug 2021 11:24:40 +0800 From: Gao Xiang To: Chao Yu Cc: linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, LKML , "Darrick J. Wong" , Liu Bo , Joseph Qi , Liu Jiang , Huang Jianan , Tao Ma Subject: Re: [PATCH v3 2/3] erofs: dax support for non-tailpacking regular file Message-ID: Mail-Followup-To: Chao Yu , linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, LKML , "Darrick J. Wong" , Liu Bo , Joseph Qi , Liu Jiang , Huang Jianan , Tao Ma References: <20210805003601.183063-1-hsiangkao@linux.alibaba.com> <20210805003601.183063-3-hsiangkao@linux.alibaba.com> <7aa650b8-a853-368d-7a81-f435194eec33@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7aa650b8-a853-368d-7a81-f435194eec33@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chao, On Thu, Aug 05, 2021 at 11:01:43AM +0800, Chao Yu wrote: > On 2021/8/5 8:36, Gao Xiang wrote: > > DAX is quite useful for some VM use cases in order to save guest > > memory extremely with minimal lightweight EROFS. > > > > In order to prepare for such use cases, add preliminary dax support > > for non-tailpacking regular files for now. > > > > Tested with the DRAM-emulated PMEM and the EROFS image generated by > > "mkfs.erofs -Enoinline_data enwik9.fsdax.img enwik9" > > > > Cc: nvdimm@lists.linux.dev > > Cc: linux-fsdevel@vger.kernel.org > > Signed-off-by: Gao Xiang > > --- > > Documentation/filesystems/erofs.rst | 2 + > > fs/erofs/data.c | 42 +++++++++++++++++++- > > fs/erofs/inode.c | 4 ++ > > fs/erofs/internal.h | 3 ++ > > fs/erofs/super.c | 59 ++++++++++++++++++++++++++++- > > 5 files changed, 106 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst > > index 832839fcf4c3..ffd2ae7be511 100644 > > --- a/Documentation/filesystems/erofs.rst > > +++ b/Documentation/filesystems/erofs.rst > > @@ -84,6 +84,8 @@ cache_strategy=%s Select a strategy for cached decompression from now on: > > It still does in-place I/O decompression > > for the rest compressed physical clusters. > > ========== ============================================= > > +dax Use direct access (no page cache). See > > dax or dax=%s > > Otherwise, it looks good to me. > > Reviewed-by: Chao Yu > Thanks, it originally inherited from filesystems/ext2.rst, I will update this into dax, dax={always,never} ..... Since for such image vm-shared memory scenario, no need to add per-file DAX (at least for now.) Thanks, Gao Xiang > Thanks,