Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp3932211ooa; Mon, 13 Aug 2018 21:35:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwu707ukU6TAGEwudsuSmOnPywrmBEINJJJABlrm+CebxkY886Iog5///Apn/KYX4EqkGwZ X-Received: by 2002:a17:902:e20b:: with SMTP id ce11-v6mr18729630plb.136.1534221332487; Mon, 13 Aug 2018 21:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534221332; cv=none; d=google.com; s=arc-20160816; b=h0chyTEevSujbuzkALSFh4taLCyo1NhGu0dh6T4M31l3xxa8T25GApQFFd6lU6SIck uNlV3Wvc4vJKEZnEKW/++e4AlHx9BxViicO5f/FVJRlxlBsCB5m/OMW6DpM8JvA7VJQa ZlrbII44sih8/hFeoQKHXtlAsudK43XnzCrGkyeqEJM+tT11uXHXl7EfEJlEDypcFErv Yk0UIx0QdO//FfoqG+0qYj2rCqZbhwkEvramubADyAq4UtTM7qNQFH1dr2cIZiY8nfPe MrMm8MlDFs64cI/IqfTtXZiFmPqtUJ7lPZrnZuHp50NTY4DA8QeTB6TMaYdpjY0JKOE9 1uTQ== 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:arc-authentication-results; bh=JTZ9FPx1ezYJf/4C7VAf041qIEbjAioSaSmKhCUyJWY=; b=OkABqKjdwbhQGCfHwvWcl9eondTACxzSmkcg6Js/qSQMGUAy4WfWWdDcu1/S9rjaw7 rJFYP0bUOctJtaiYyjY6kJExh0yGinMhjJy4E9TM8+AIDXqBr+Xly6iMe2wQOnPvo+DG HjUIAcmoxZlzKiKrTO2qOgycF/li5kSnc1ZhvJtoVPz1s6MGvs3VMmJA71LjUfXLJSS9 KrCHZIkJpEFSUUQczCSx2Ikibp7YPRF3xKUg4Jbd5xiUPQym5HXsiXwvJFT5rkzPnk/j LvOUWYiFhMytm/vwyL6uyCCFaJG3tmDTIrGcG1KzhdxXH64DP9F5k/3K9wpmSERMqiYF qiiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=09jeifqB; 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 w19-v6si15115804plp.25.2018.08.13.21.35.04; Mon, 13 Aug 2018 21:35:32 -0700 (PDT) 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=09jeifqB; 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 S1731252AbeHNG6t (ORCPT + 99 others); Tue, 14 Aug 2018 02:58:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:34936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbeHNG6t (ORCPT ); Tue, 14 Aug 2018 02:58:49 -0400 Received: from localhost (unknown [104.132.1.88]) (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 801F821742; Tue, 14 Aug 2018 04:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1534220010; bh=TVIKhfsg3TbXJ5NRPPMa9KgwZ2YcqtRLU3/qcHpEEHI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=09jeifqBJBixYZFqd92bb41yS5GHKD0Q09/mkjcr1f1vmh+kF269XZX4Qr9+QMam2 hKQt4Y33XYiJ87lnc9QLvhuRji3UG7Uu1QPoc3a6nVteRWTS0G3zki76CnDV5kLbE3 imAmvkhJwfLszlfS2UZzdkjJYbBV3ldDW/5t4KF8= Date: Mon, 13 Aug 2018 21:13:29 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH 1/2] f2fs: set 4KB discard granularity by default Message-ID: <20180814041329.GB52730@jaegeuk-macbookpro.roam.corp.google.com> References: <20180810100806.9298-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180810100806.9298-1-yuchao0@huawei.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10, Chao Yu wrote: > Small granularity (size < 64K) fragmentation will cause f2fs suspending > all pending discards, result in performance regression, so let's set > 4KB discard granularity by default. > > So that without fstrim, we also have the ability to avoid any performance > regression caused by non-alignment mapping between fs and flash device. This is why we added a sysfs entry. Why do we need to change the default value every time? > > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 58431b9bfd8f..273ffdaf4891 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -248,7 +248,7 @@ struct discard_entry { > }; > > /* default discard granularity of inner discard thread, unit: block count */ > -#define DEFAULT_DISCARD_GRANULARITY 16 > +#define DEFAULT_DISCARD_GRANULARITY 1 > > /* max discard pend list number */ > #define MAX_PLIST_NUM 512 > -- > 2.18.0.rc1