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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 B0045C04AB6 for ; Fri, 31 May 2019 09:02:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54AC624AFB for ; Fri, 31 May 2019 09:02:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="ipWqv0mR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726990AbfEaJCc (ORCPT ); Fri, 31 May 2019 05:02:32 -0400 Received: from mail-io1-f53.google.com ([209.85.166.53]:33026 "EHLO mail-io1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfEaJCc (ORCPT ); Fri, 31 May 2019 05:02:32 -0400 Received: by mail-io1-f53.google.com with SMTP id u13so7579331iop.0 for ; Fri, 31 May 2019 02:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oeG+pCM85tciRrjyBB0fht7GW7L/dCmAoFu75hbblAg=; b=ipWqv0mRhsVR28jMwe91Yn7Aq12aj2LBj+Aq7Z2S2i/ypJwWJ86b4Cth/JpafTy4mr +r0RzoG3YC7bcYDIiyVRMo5tLDYBzeoHAQEoQlsISJ0HIIdjQ0x0oPOEycHUly5YxxYj rDhd4CDEcy8ANLnUxHi35o+w4T9Yyhf86zmTU= 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=oeG+pCM85tciRrjyBB0fht7GW7L/dCmAoFu75hbblAg=; b=O4A988baKYBA8cljiIjiDjcznRAyn7vFfsn+5xJuAAS9F5+jYKdZTA9PiDCPoNPVNJ T3HZBvbJsElyKq1TyCe6oa8ko/pYmWZi/7KYzheOkcDKSq50d9F9JvIHTyfGDfBhMSy/ 7F4YZcqtrfRoKYO2AtzHn67+G+LRq5Iy/Gicvq1wFXPc8OfrRQBbrbj30a0vEvg17Dgo svOeGyyM9EhgJaYbaQO2GIfmds238gmbJwGgEk1ovQbi3lD56ZeIgEaRVqW7UT72wS/D CrHS4omXs40ABGmxvfzz+PQwI5bmwZHjpukXKIHWJQAGGJ+WbhAIQ+ADbQ6P0+ap/oY0 zmgw== X-Gm-Message-State: APjAAAUbjFv03UXVWJ5dM2P+Z3rlpE3k+uA+0pdfCazeylAaFh8EGbb8 dWY7wuT3w04Oih2jLhgik/KmCb8J1g4iILYiyJZ8WQ== X-Google-Smtp-Source: APXvYqwH2hmjTNGyREh/JmhHHPPScRfWlxDYI3ztOsXmXY4lpTZ1Lgl7pigYDx7+tzlVSxeGZLY81/d4JWtJzA3aPmI= X-Received: by 2002:a05:6602:2252:: with SMTP id o18mr3818806ioo.63.1559293351755; Fri, 31 May 2019 02:02:31 -0700 (PDT) MIME-Version: 1.0 References: <20190502040331.81196-1-ezemtsov@google.com> <20190502131034.GA25007@mit.edu> <20190502132623.GU23075@ZenIV.linux.org.uk> In-Reply-To: From: Miklos Szeredi Date: Fri, 31 May 2019 11:02:20 +0200 Message-ID: Subject: Re: Initial patches for Incremental FS To: Yurii Zubrytskyi Cc: Eugene Zemtsov , Amir Goldstein , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, May 31, 2019 at 12:45 AM Yurii Zubrytskyi wrote: > We'd need to give the location of the hash tree instead of the > individual hash here though - verification has to go all the way to > the top and even check the signature there. And the same 5 GB file > would have over 40 MB of hashes (32 bytes of SHA2 for each 4K block), > so those have to be read from disk as well. As I think Eugene mentioned, dealing with the hash tree should be done by the verity subsystem anyway. > Overall, let's just imagine a phone with 100 apps, 100MB each, > installed this way. That ends up being ~10GB of data, so we'd need _at > least_ 40 MB for the index and 80 MB for hashes *in kernel*. Seriously? Are those 100 apps accessing that 10G simultaneously? I really don't know the usage pattern of those apps, but I can imagine that some games do quite a lot of paging data in and out. And my guess is that most of those page-ins will still be sequential, and so getting a pageful of index from userspace will allow the kernel to serve quite a few reads without having to go back to userspace. My guess is that even really tiny amount of caching (e.g. one page of index per open file) will get 90% or more of the possible performance improvement. But those are all just guesses. If you say this is not the right direction for your project, fine. Thanks, Miklos