Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6362273ybv; Tue, 18 Feb 2020 15:28:35 -0800 (PST) X-Google-Smtp-Source: APXvYqyUlllXj03R6GeZgZMiXKjILq9G0tc0aqcIN5OvhuNkaL30xHVRQ0faz2qq0nLg8s2OHelx X-Received: by 2002:a05:6808:b39:: with SMTP id t25mr2887832oij.71.1582068515852; Tue, 18 Feb 2020 15:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582068515; cv=none; d=google.com; s=arc-20160816; b=QWWpHc/oTFM6lxIolHP5NR4lSnb6uNQ+6X/B/1JEPyKPY02Uh0CkkhzUi7NoNir90A MKbb+Moo0MhAtkw9Z3bS5AWaQHpYpI2lAbGDd69lf5cuz0MGLRJBgid8M8If+kYgiYt/ Xd/wk50JKYEvZ55QgVSTjp1zyJBKqXe4ZEHiIaKVJ1rzbEE/eQMng3u9aSR+4xTlw1s+ qqLJu8fvNhvU09+3wK7FKJErFWjji+Gdnl3Inbgl6qTtxHIxs73uj9Ovj+/7iQAw/Wj7 Atdmi2MIUMZuFt4Z4VcQVn5ho8wf0ZJuxku4LhrIj3Mw656rx44cWx+YbFj+w7NkkbLX wNFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2Q66h4IwTYxpnVhZBYUGtGOc7bh9UbfLn7Cp9cfXUk8=; b=gEA+LUx/c5iy5DiE7wlV4e4fjsubHk+RiQtEJmi4pVdxz3c+51PxrMHJL5wRkKwq/8 dRqIM4YQhQxcWSEg7BrYyJk7lukPtI8yUitWRlB7sWEwHeKSHy9Ng73xMYbZNEuUnTeU iSGQ4FsbEBZDpd85KdJzLUMkIeBpe2M2cV6SpraXOWShgYqqS8UlTGfr0+qqXnjH1Mtz 3c/BR5yuyyPA085Gnq03IoF1H0bs14aD6hdfWO3ntsk17bGOxWiNrVXZf7Ovrg+9wEI8 5gNFZLakJPQBwc67hrH2pPKfwmUj6gqMlJNJBblOQcvYmPQR4ghzjWjveFh1XASr04Kr TdEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=njxulyfw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a17si147061otp.236.2020.02.18.15.28.23; Tue, 18 Feb 2020 15:28:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=njxulyfw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727972AbgBRX1P (ORCPT + 99 others); Tue, 18 Feb 2020 18:27:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:40362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727951AbgBRX1P (ORCPT ); Tue, 18 Feb 2020 18:27:15 -0500 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8492422B48; Tue, 18 Feb 2020 23:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582068434; bh=rUP93xEkDhBdiO8ILugsojP+aU7U9As9cgAaxy/Sn8c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=njxulyfwSmUPae6vEWrNK0WrXyb7Os08KUJex733g9Q3dyMQdDq4MQlW4XtlIO0RK ORCfyAff92y7OrewyBZODjxSkQIBav7FI8QlooxmPiSrHHuce5EKGtZjqG55yETM06 1j6iD8ucFY82Hgm1WVhGsIG7GWuXhWHHaV7jaTok= Date: Tue, 18 Feb 2020 15:27:14 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 3/3] f2fs: skip migration only when BG_GC is called Message-ID: <20200218232714.GB10213@google.com> References: <20200214185855.217360-1-jaegeuk@kernel.org> <20200214185855.217360-3-jaegeuk@kernel.org> <9c497f3e-3399-e4a6-f81c-6c4a1f35e5bb@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c497f3e-3399-e4a6-f81c-6c4a1f35e5bb@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/17, Chao Yu wrote: > On 2020/2/15 2:58, Jaegeuk Kim wrote: > > FG_GC needs to move entire section more quickly. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/gc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > index bbf4db3f6bb4..1676eebc8c8b 100644 > > --- a/fs/f2fs/gc.c > > +++ b/fs/f2fs/gc.c > > @@ -1203,7 +1203,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, > > > > if (get_valid_blocks(sbi, segno, false) == 0) > > goto freed; > > - if (__is_large_section(sbi) && > > + if (gc_type == BG_GC && __is_large_section(sbi) && > > migrated >= sbi->migration_granularity) > > I knew migrating one large section is a more efficient way, but this can > increase long-tail latency of f2fs_balance_fs() occasionally, especially in > extreme fragmented space. FG_GC requires to wait for whole section migration which shows the entire latency. > > Thanks, > > > goto skip; > > if (!PageUptodate(sum_page) || unlikely(f2fs_cp_error(sbi))) > >