Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2808450pxt; Mon, 9 Aug 2021 09:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziE4CdN9T4K0eQKS0MgmbFTLUNui0fd6eRHCY9HWqCM0+R0Spor+MgzzWWEFu4N+z5J9L0 X-Received: by 2002:a5d:9b99:: with SMTP id r25mr208193iom.104.1628526069794; Mon, 09 Aug 2021 09:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628526069; cv=none; d=google.com; s=arc-20160816; b=Z7wsFM1/EJfGsSbH35tWZLp0uV5jKiJBLv4QSq3z0cvt/bUIRepvoaBP0n4omMm0ZW RW3638JburCFI1U6ds+AxhEkrFdA0DiW8NRYNwdFIa/e3L2CavwqYnGxbEATdR+MKTVM BPFHztyWWBFN8SHTIXib0sbiRxlM5PSmnSqLQPBbMH3n5o7caD9FfcF/JmJ5rl4bO6CF 64b51VafoiiUmfA02duAIyKNWRW/xVI3XT9WLiNriPoNqhPtDJesF07FxfZ0OKgNOFuJ fcHevdeVOBpI3QA+QQxURQO/FyoAiJLoT20lxJVnU/Q9dw/XE4qEW8Zl34+6wsgquJe9 6iKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=d3PYvLEv+sU2zhd0L15SpWaRodeiHTy+UoMA6DwtR3I=; b=ynf6cAZhftW2nSNmHmOkTJRPUqsFryhVCj5CxLvJ06VKar9iQ+ZAILmcTY8vfr43zi km4AbfA1waTS2IxLcwbBJUA6/li5B/UHVuGZgh1OulteJma3d7JErrfEtxv31hdOcYDm UzEZiLSP7iy+PTdu8jH0AxhJMrxgdTucVN1LgkquY5Ueu/sMiUCy+TUFdi5YidtN3u/M wMjcyM9AbvDKwdJ0olUVDs6tJA4H3kCQoXt/2ABzHL/Gn5kJtVKt95f7URWvEfWvwGvH tZGkbuLxOc8y3sVhQ7d4ll3Vt7Cx6jCOhlqS05rcElP7PqISTFbe4Qdke1HLELCLw9U9 U+wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VMD5ZTSf; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si20468701ilt.138.2021.08.09.09.20.53; Mon, 09 Aug 2021 09:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VMD5ZTSf; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229493AbhHIQVH (ORCPT + 99 others); Mon, 9 Aug 2021 12:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232817AbhHIQTd (ORCPT ); Mon, 9 Aug 2021 12:19:33 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C02C0613D3 for ; Mon, 9 Aug 2021 09:19:00 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id cf5so25452637edb.2 for ; Mon, 09 Aug 2021 09:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d3PYvLEv+sU2zhd0L15SpWaRodeiHTy+UoMA6DwtR3I=; b=VMD5ZTSfJCZnXxnwd6ru2jBt4S8hspI2L6OaT00igRa1RiV01peD17ag9t/sfyfc47 pdtZg7sCDI2M4rroIgia6669WL1dO4BUntl2T+Jo6gLPb6qTOOF1LTabrXd8JKTcMrlM 5HGzMB8oaoH43sAIIDWCdOubtjipRx6Xmlpxi/vjavrkKKp+Ukm+vjuRGTejwIyF8Ie+ BGSR5zeL+Ffnp1uebUi7n8H2tLOcuOVofOYbsGNfDWqhSVSeh2rkmW9ieOlmkRYeeQw6 dD1VTkZuDqSQTZFRJJ+iLjEsISnYs2kUdEMKZAs6BPpilEZXjPL5F6L9a4vKIqBXs+xo PC8g== 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=d3PYvLEv+sU2zhd0L15SpWaRodeiHTy+UoMA6DwtR3I=; b=nLVjbt3MKuHRwxPlcOlqcJApLnbUJEqV6DKh3eZmgvtVnwXR0we8lN2qFLgj5nPUFH U7UGl018SKwu3D0ZaE9XTBXCJGWDOXveKxyNuu7YnpIlZzPnYwaVVYpr2aMUYsZsK9Ht hvqtX/pVp7ahgUDJiEkjEb992YJ8xIH5pQE4BgVCXWvQh4PTG0baubAu3c+R7CL+OwZF 7RLoDdaZ7y+6exKThUmWaeVk5sBKqj0yIXhCkaRnXDtq1F1mxzYJGg9Zw0AlZIzbOM0w lH/L4RUTQnZExgZ4T+2GFpyyCDlCBpRSUhga40o/DTFzMmenFpQ5z719fIB1FaDYcSXT IbZw== X-Gm-Message-State: AOAM530ylZ9Xij0VKpSew/JKPOnwwNAX/TnkK6t9/lwpsqP6fJfcQ736 1Swt8lpOpJ1AIQ0EGXmY6dE8lRLverQPt9l9uT9m0AgoFDk= X-Received: by 2002:a05:6402:3588:: with SMTP id y8mr30475855edc.362.1628525938878; Mon, 09 Aug 2021 09:18:58 -0700 (PDT) MIME-Version: 1.0 References: <015c7506-7f33-3967-772a-1285b0f1052f@valdikss.org.ru> In-Reply-To: From: harshad shirwadkar Date: Mon, 9 Aug 2021 09:18:47 -0700 Message-ID: Subject: Re: ext4lazyinit reads HDD data on mount since 5.13 To: ValdikSS Cc: "Theodore Ts'o" , Ext4 Developers List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 9, 2021 at 2:51 AM ValdikSS wrote: > > On 09.08.2021 04:51, Theodore Ts'o wrote: > > It's a new feature which optimizes block allocations for very large > > file systems. The work being done by ext4lazyinit is to read the > > block allocation bitmaps so we can cache the buddy bitmaps and how > > fragmented (or not) various block groups are, which is used to > > optimize the block allocator. > > Thanks for the info. To revert old behavior, the filesystem should be > mounted with -o no_prefetch_block_bitmaps > > Is it safe to use this option with new optimizations? Should I expect > only less optimal filesystem speed and no other issues? It is perfectly safe to use "no_prefetch_block_bitmaps" with new optimizations. In fact file system throughput also will NOT be affected if you mount the file system with this option. The only impact of mounting with this mount option would be that the file system can potentially make sub-optimal decisions for allocation requests in certain scenarios. For example, let's say the allocator gets a request to allocate 10 contiguous blocks and only the last group in the file system has 10 contiguous blocks. If you mount the file system with "no_prefetch_block_bitmaps", Ext4 will not have cached the last group's buddy bitmap because of which it might not know that the last group has 10 contiguous blocks available. At this point, Ext4 will satisfy the request for 10 blocks by allocating fragments instead of allocating a contiguous region. This might increase the fragmentation levels of the file system. However, note that this is not a regression. If you were not using "prefetch_block_bitmaps" before 5.13, then this is the allocator behavior that you would have seen anyway. So, mounting with "no_prefetch_block_bitmaps" in your setup, would not cause any regressions whatsoever. Thanks, Harshad