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=-6.8 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=no 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 D4102C2D0E2 for ; Tue, 22 Sep 2020 12:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9801C2399A for ; Tue, 22 Sep 2020 12:39:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AgDceEZ1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgIVMjW (ORCPT ); Tue, 22 Sep 2020 08:39:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27529 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbgIVMjV (ORCPT ); Tue, 22 Sep 2020 08:39:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600778360; 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=13v2utUwRQqeWPATCUhCzFKLpxpP9eoRFAS7+tLKUYQ=; b=AgDceEZ1PTwn/7/QRK5b/NIoEERFo4wqyRrrB73r362Qoqr9XbxN8oBaOyn9AhwL4+I/lz BKGkWx7pEi8KA48o+/HgrQMGhi7/+GGbWG3LcdUNiYXYoDQPqXNlt3cdMeBST3HUCTqcsn wIu7XC45H5LUVc1q/1pTdS4uTZ6uOTY= 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-411-OH8YTdnSN-C8yKRcopmK_A-1; Tue, 22 Sep 2020 08:39:16 -0400 X-MC-Unique: OH8YTdnSN-C8yKRcopmK_A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BBCBD186DD28; Tue, 22 Sep 2020 12:39:13 +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 687CE5C1A3; Tue, 22 Sep 2020 12:39:13 +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 08MCdCgb021345; Tue, 22 Sep 2020 08:39:12 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 08MCdBHN021341; Tue, 22 Sep 2020 08:39:12 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 22 Sep 2020 08:39:11 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Matthew Wilcox cc: Dan Williams , Linus Torvalds , Alexander Viro , Andrew Morton , 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 Mailing List , linux-fsdevel , linux-nvdimm Subject: Re: NVFS XFS metadata (was: [PATCH] pmem: export the symbols __copy_user_flushcache and __copy_from_user_flushcache) In-Reply-To: <20200922122819.GD32101@casper.infradead.org> Message-ID: References: <20200922122819.GD32101@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.16 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, 22 Sep 2020, Matthew Wilcox wrote: > On Mon, Sep 21, 2020 at 12:20:42PM -0400, Mikulas Patocka wrote: > > The same for directories - NVFS hashes the file name and uses radix-tree > > to locate a directory page where the directory entry is located. XFS > > b+trees would result in much more accesses than the radix-tree. > > What? Radix trees behave _horribly_ badly when indexed by a hash. > If you have a 64-bit hash and use 8 bits per level of the tree, you have > to traverse 8 pointers to get to your destination. You might as well > use a linked list! In NVFS, radix trees are cut off - they have only as much internal levels, as is needed to disambiguate the directory entries. Read this document: http://people.redhat.com/~mpatocka/nvfs/INTERNALS the section "DIRECTORIES". Perhaps, I should call it differently than "radix-trees", but I don't really know what is the official name for this data structure. Mikulas