Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3782605pxb; Mon, 30 Aug 2021 10:29:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8o4sRhSC5qkAauXm4Wh2IBPzNuQeuALQqyMDc/PGtkazEwMJFHPsxP1VJpIZ0OY51O1QK X-Received: by 2002:a17:906:d057:: with SMTP id bo23mr26171152ejb.208.1630344583736; Mon, 30 Aug 2021 10:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630344583; cv=none; d=google.com; s=arc-20160816; b=Q4+ZVwOFIdFAKfWJ2x53IWm3MUxvExcSZflcWc7jFOgd/nXo0lwBnX0sjn7Z+GNKGq HP1BTDmR4oH+2ahIXYHqNGPdMYRcz2HNXA11FUFzQLeS0CcEParhWREmrrH9St8L1rR8 MZukR6OWt/5FDU+mEmR5Up6v4xH9tV8KFVaX9k6VfSxbUZbpqr2IcbtpvYngRL5ovA89 Tagbi2T/9PGBmh2r5xw93QUsC/0pAeB3/v/pntH6GIxOOeE8g1pW/QrRkofVbYm6aiXP q22SDLYTI115+wOfv51H2/IxrnMnsKvNBGqMHSJhH6ILGadPgXeyget3AWUQvPsr1jiY IJ8A== 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=d5bnBdYfK8MREsdQ2ulPLtMZ7uZ5lPMgodPXfNRRTrY=; b=HEvyjBB/prWt3sWHj/71fGPg7NqKxr4XiQSSjnJ5phQKd3GsfH3iDHLZKrzdCb08BV e9JU64h/2N9khSRLu0HjjziD4GS7XMEnMhO5FXntXG3Q993ZAIVtP+Da0mSWAVBiYGyL Pxllq+I58pDBeAfyn64F9JI6X666pT1+MKoJAsorf3n18u+GLXh1INYt6j61jKJK5iIq 4KEp92IUYdwnuaAptn/nN6x2KdYbKPhYaReTY6xV0XFRbYiDSoAne/bd5AoogS9Ym5Dh AAICf1IldYw5zm7IYuKKkgz6xv7RaiPTE7v8Br2e/HuAiU+KwgBi8Ti49iiIEx40gtqj 9dpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sVPP9eZB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 w3si14456523ejv.301.2021.08.30.10.29.19; Mon, 30 Aug 2021 10:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=sVPP9eZB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S237976AbhH3R2w (ORCPT + 99 others); Mon, 30 Aug 2021 13:28:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbhH3R2v (ORCPT ); Mon, 30 Aug 2021 13:28:51 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49186C061575 for ; Mon, 30 Aug 2021 10:27:57 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id j4so32727034lfg.9 for ; Mon, 30 Aug 2021 10:27:57 -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=d5bnBdYfK8MREsdQ2ulPLtMZ7uZ5lPMgodPXfNRRTrY=; b=sVPP9eZBx+GLi2Ud3Dmd0T5Ee6ZUA8XOsanKSCCBp4laDJ0qalOCc2MlaEcf+TAaS+ Xci3FDlJ58w8KdFsQedMH40QB056SizVkwBm1jPeq/UHbRYcIZFKZ8uGF139Tl4IWBtP z1mIqudvNvQsloBGfwfrQrn+QpaWs00T8br0O2ZCHW9gtJzd1q0k7KkvpscfwEFg4m4h /6i00rHCrNyWvNYh9NczrUWgPS8t3UOohlBI0aavjGjCdYeNfvt2fPKqIO0X2td0iCRS c2BqOrKsivcTV6NNkP3Bs85szaZXFqCLAq6eWn8Wb/j6Q/tVl0vGIvZ4Jzhu9yz7niaX +8MA== 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=d5bnBdYfK8MREsdQ2ulPLtMZ7uZ5lPMgodPXfNRRTrY=; b=Y57T2d4T8XU/D8Msxk7GXBuBvg9ZrOivcJcP1eFaZrfEDrNR9nlt5JT8QeYunPWuZs 2xgUgbsjekhQ5JyCmj+T6vM2oFP/ciLOMbwCqIzBKNivpe+XrfqmA34np7cK0uHmt2WM LlUoPnG+DgELxDDYC4PFlwrPa1neKt1LMx4Rl0gyKpnR+g+IiPM2BgxXOozOCcz80WSX K3TbeHXeW07lTP/5LcLehk0fDXfO4HLg3sJiqjR++5CGUUq6OShcGgQz/T1PrnepokpG SD1CBLNS+bxQYiSOezMHv2t6qUda7MSE6B/A47o5RvhSMmBp3Y7Y73JdyuZsc1ywMxgD /qvQ== X-Gm-Message-State: AOAM531uVGx57DnYa/k0uoS01gceBEdu3IwbUFfXblRLB9s73DshUoVk AJGURKYBupZzJsGMEaSaPQX96FnPzztVhS+7gFM= X-Received: by 2002:a05:6512:a85:: with SMTP id m5mr10289356lfu.610.1630344474760; Mon, 30 Aug 2021 10:27:54 -0700 (PDT) MIME-Version: 1.0 References: <20210825185747.1627497-1-daeho43@gmail.com> <1f1e6d38-6bd1-17ea-b8ca-a45d1244728f@kernel.org> <335d5bb5-7055-c934-33df-a03885382034@kernel.org> In-Reply-To: <335d5bb5-7055-c934-33df-a03885382034@kernel.org> From: Daeho Jeong Date: Mon, 30 Aug 2021 10:27:43 -0700 Message-ID: Subject: Re: [f2fs-dev] [PATCH v2] f2fs: introduce fragment allocation mode mount option To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 27, 2021 at 5:43 PM Chao Yu wrote: > > On 2021/8/27 23:22, Daeho Jeong wrote: > >> I'd like to add a fixed chunk/hole fragmentation mode in addition, then > >> userspace can control the fragmented chunk/hole with fixed size. > >> > >> How do you think of renaming "fragment:block" to "fragment:rand_block", and > >> then I can add "fragment:fixed_block" option and its logic in addition? > >> > > > > The reason I added the randomness on these values is the segment > > selection in SSR mode. > > If all the segments have the same free block counts, f2fs will > > allocate a new segment sequentially in SSR. > > I'm fine with this, since test program can customize different fragment > degree on segments by setting different chunk/hole size. > Got it. Sounds good~ > > This was what I didn't want. Plus, in the real world, the size of hole > > and chunk will be different in different segments. > > > > But, if you think we need this "fragment:fixed_block" mode, I am happy > > to have it. :) > > Thanks a lot. :) > > As you said it needs to be aligned to real world fragmentation, I notice that: > with this way, we can't simulate similar fragment in FTL, due to its page > mapping architecture, all fragmented data/node in filesystem will be written > sequentially into its blocks. > > In order to simulate fragment in FTL, we need to: > - write data (chunk size) with dummy pages (hole size) to devices > - issue discards on those holes > > I guess fragmenting device (erase blocks) at the same time wouldn't be > original intention of this patch, right? > > Thanks, > Yes, I just meant filesystem fragmentation as I wrote in the comment. > > > >> Do we need to consider multiple thread scenario? in such case, > >> .fragment_remained_chunk may update randomly. > >> > >> In addition, multiple log headers share one .fragment_remained_chunk, > >> it may cause unexpected result, it means there may be continuous holes > >> or chunks in locality due to swithing between different log headers. > >> > >> Thanks, > >> > > > > Oh, I overlooked that point. I am going to add the variable for each > > segment as you said before. > > > > Thanks, > >