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.7 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,URIBL_BLOCKED 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 9D9A5C4338F for ; Thu, 5 Aug 2021 03:25:04 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16E9760F22 for ; Thu, 5 Aug 2021 03:25:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 16E9760F22 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GgDWL4GWSz3bmB for ; Thu, 5 Aug 2021 13:25:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.56; helo=out30-56.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=) Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GgDWB5SY3z30FB for ; Thu, 5 Aug 2021 13:24:53 +1000 (AEST) 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 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> X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nvdimm@lists.linux.dev, "Darrick J. Wong" , LKML , Joseph Qi , Liu Bo , Tao Ma , linux-fsdevel@vger.kernel.org, Liu Jiang , linux-erofs@lists.ozlabs.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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,