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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 C67A5C433F5 for ; Fri, 10 Sep 2021 00:22:51 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94C8B610A3 for ; Fri, 10 Sep 2021 00:22:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 94C8B610A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.92.3) (envelope-from ) id 1mOUJf-000591-9q; Fri, 10 Sep 2021 00:22:51 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1mOUJd-00058t-WD for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Sep 2021 00:22:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=F9zuPM7jZHmNfIBHv4k3loZDOOCJFOgYTGtRNs41vx4=; b=cI2+A0oqNliB6qhr86bzQwEGSh 8XKppseITbFzGHWtjWXAkP0OxLZzzCJnZnnZWTqBwsCxSw+UIshtFxWLF9WNoZnYrwuaFsmzPWm4w 1Q0Unz7wzqBiD4P4QAIgVwN9HTwm1Tp5J62RkrhogeFVn/CPTqYjpHdjLvziCAXhBTxw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=F9zuPM7jZHmNfIBHv4k3loZDOOCJFOgYTGtRNs41vx4=; b=Pey77FGe2Z+Y5c6zL9p8WOhffl jlmUIxjIygiff/kuGA2NKlM9tmyaE3vXTrYhVhob9IZyQxYtbarGbRSorVA+n/NfVkYoL8xnRr52n pSnSkCszLJ9tHXibFcBsNouwd/znmtL4ca8VHIzVarGIx12lLRk/8+42OKwZYVL+EJCA=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mOUJd-0004ho-FR for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Sep 2021 00:22:49 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5505E610A3; Fri, 10 Sep 2021 00:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233364; bh=QQk5/NFDbpoB4CsO/Nl1x01d4DAt+VrGutOoBU8flU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CvAStQW9pFxKVmYPDysJ6NZbC8neJEEVV6S2EplKHXogLy+u1S4FCzmvtimvWPLE8 nPdy0GPQ3sxf8oIJbp7GnKPYWwDBmhiUPKbW4zyz1X31GAzdQQpb12Kl2VxOd7rhVC AIWCqxbL4+uomZJ0KtZpzMn0+F0xZZ2fVvFs+VM9CfIygnONkVqr8WYgxxTt/c3djV 4J8w5KR9+ISGkJEPa2zabqbAeTDeaKHbB8uqGFqUG3dH7RDNJ/5xRnlAnpJpNIEr91 WGeZdJNWUUM1/wWQAYsPDeVAJvyU8or0S744nYaZRMFjojZKpmQ06e7MUh/J+4mWOR RtUr56ki33coA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Thu, 9 Sep 2021 20:22:15 -0400 Message-Id: <20210910002234.176125-7-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002234.176125-1-sashal@kernel.org> References: <20210910002234.176125-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-Headers-End: 1mOUJd-0004ho-FR Subject: [f2fs-dev] [PATCH AUTOSEL 4.19 07/25] f2fs: fix min_seq_blocks can not make sense in some scenes. X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Laibin Qiu [ Upstream commit dc675a97129c4d9d5af55a3d7f23d7e092b8e032 ] F2FS have dirty page count control for batched sequential write in writepages, and get the value of min_seq_blocks by blocks_per_seg * segs_per_sec(segs_per_sec defaults to 1). But in some scenes we set a lager section size, Min_seq_blocks will become too large to achieve the expected effect(eg. 4thread sequential write, the number of merge requests will be reduced). Signed-off-by: Laibin Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0e3e590a250f..0ac907b06cb1 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4198,7 +4198,7 @@ int f2fs_build_segment_manager(struct f2fs_sb_info *sbi) sm_info->ipu_policy = 1 << F2FS_IPU_FSYNC; sm_info->min_ipu_util = DEF_MIN_IPU_UTIL; sm_info->min_fsync_blocks = DEF_MIN_FSYNC_BLOCKS; - sm_info->min_seq_blocks = sbi->blocks_per_seg * sbi->segs_per_sec; + sm_info->min_seq_blocks = sbi->blocks_per_seg; sm_info->min_hot_blocks = DEF_MIN_HOT_BLOCKS; sm_info->min_ssr_sections = reserved_sections(sbi); -- 2.30.2 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 E16FFC433F5 for ; Fri, 10 Sep 2021 01:00:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC5B3610C9 for ; Fri, 10 Sep 2021 01:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235738AbhIJBCE (ORCPT ); Thu, 9 Sep 2021 21:02:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234643AbhIJAXy (ORCPT ); Thu, 9 Sep 2021 20:23:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5505E610A3; Fri, 10 Sep 2021 00:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233364; bh=QQk5/NFDbpoB4CsO/Nl1x01d4DAt+VrGutOoBU8flU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CvAStQW9pFxKVmYPDysJ6NZbC8neJEEVV6S2EplKHXogLy+u1S4FCzmvtimvWPLE8 nPdy0GPQ3sxf8oIJbp7GnKPYWwDBmhiUPKbW4zyz1X31GAzdQQpb12Kl2VxOd7rhVC AIWCqxbL4+uomZJ0KtZpzMn0+F0xZZ2fVvFs+VM9CfIygnONkVqr8WYgxxTt/c3djV 4J8w5KR9+ISGkJEPa2zabqbAeTDeaKHbB8uqGFqUG3dH7RDNJ/5xRnlAnpJpNIEr91 WGeZdJNWUUM1/wWQAYsPDeVAJvyU8or0S744nYaZRMFjojZKpmQ06e7MUh/J+4mWOR RtUr56ki33coA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Laibin Qiu , Chao Yu , Jaegeuk Kim , Sasha Levin , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 4.19 07/25] f2fs: fix min_seq_blocks can not make sense in some scenes. Date: Thu, 9 Sep 2021 20:22:15 -0400 Message-Id: <20210910002234.176125-7-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002234.176125-1-sashal@kernel.org> References: <20210910002234.176125-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laibin Qiu [ Upstream commit dc675a97129c4d9d5af55a3d7f23d7e092b8e032 ] F2FS have dirty page count control for batched sequential write in writepages, and get the value of min_seq_blocks by blocks_per_seg * segs_per_sec(segs_per_sec defaults to 1). But in some scenes we set a lager section size, Min_seq_blocks will become too large to achieve the expected effect(eg. 4thread sequential write, the number of merge requests will be reduced). Signed-off-by: Laibin Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 0e3e590a250f..0ac907b06cb1 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4198,7 +4198,7 @@ int f2fs_build_segment_manager(struct f2fs_sb_info *sbi) sm_info->ipu_policy = 1 << F2FS_IPU_FSYNC; sm_info->min_ipu_util = DEF_MIN_IPU_UTIL; sm_info->min_fsync_blocks = DEF_MIN_FSYNC_BLOCKS; - sm_info->min_seq_blocks = sbi->blocks_per_seg * sbi->segs_per_sec; + sm_info->min_seq_blocks = sbi->blocks_per_seg; sm_info->min_hot_blocks = DEF_MIN_HOT_BLOCKS; sm_info->min_ssr_sections = reserved_sections(sbi); -- 2.30.2