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=-8.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 11389C43461 for ; Wed, 16 Sep 2020 00:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CFC4C20809 for ; Wed, 16 Sep 2020 00:37:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H9AE6oGx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbgIPAhW (ORCPT ); Tue, 15 Sep 2020 20:37:22 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:39446 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726563AbgIONY7 (ORCPT ); Tue, 15 Sep 2020 09:24:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600176253; 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=DgU4TZhvG3KpN9lJZj8ZqRXmFgzWt5CrSbPFJksfUsw=; b=H9AE6oGxwqTRiJcfxgK+78pcaSyKtgAfSpCINDbTGuqa1G3aZDvApCAoWJLBr6Yz5Dyd34 KzBr3wN1fJMMnulMRpZl6JB6kczgbtM8LIGV5ad5O8LvabSIxzX2Bm66piT7XxV1ZpzPjr tsPwGiNAdCT7oqGrCXaux17h2wyqaOE= 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-498-Q3X7or1cPDKRDui_raGheg-1; Tue, 15 Sep 2020 09:24:09 -0400 X-MC-Unique: Q3X7or1cPDKRDui_raGheg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6792E1084D64; Tue, 15 Sep 2020 13:24:07 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3913960BE2; Tue, 15 Sep 2020 13:24:07 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 08FDO6xQ009380; Tue, 15 Sep 2020 09:24:06 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 08FDO6nw009376; Tue, 15 Sep 2020 09:24:06 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 15 Sep 2020 09:24:06 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Matthew Wilcox cc: Linus Torvalds , Alexander Viro , Andrew Morton , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Jan Kara , Eric Sandeen , Dave Chinner , "Kani, Toshi" , "Norton, Scott J" , "Tadakamadla, Rajesh (DCIG/CDI/HPS Perf)" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org Subject: Re: [RFC] nvfs: a filesystem for persistent memory In-Reply-To: <20200915130012.GC5449@casper.infradead.org> Message-ID: References: <20200915130012.GC5449@casper.infradead.org> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, 15 Sep 2020, Matthew Wilcox wrote: > On Tue, Sep 15, 2020 at 08:34:41AM -0400, Mikulas Patocka wrote: > > - when the fsck.nvfs tool mmaps the device /dev/pmem0, the kernel uses > > buffer cache for the mapping. The buffer cache slows does fsck by a factor > > of 5 to 10. Could it be possible to change the kernel so that it maps DAX > > based block devices directly? > > Oh, because fs/block_dev.c has: > .mmap = generic_file_mmap, > > I don't see why we shouldn't have a blkdev_mmap modelled after > ext2_file_mmap() with the corresponding blkdev_dax_vm_ops. Yes, that's possible - and we whould also have to rewrite methods read_iter and write_iter on DAX block devices, so that they are coherent with mmap. Mikulas