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 459CEC433EF for ; Fri, 10 Sep 2021 00:22:22 +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 1820C604DC for ; Fri, 10 Sep 2021 00:22:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1820C604DC 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-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1mOUJA-0001eu-Td; Fri, 10 Sep 2021 00:22:20 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOUIz-0001eX-31 for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Sep 2021 00:22:09 +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=tJcj4gc0EU1kSne09MyMD0+pHs+mDV7EqRRH9MCoXD8=; b=kaYw8OF9g+LFTC9tziR95nNP5b bXQ0nOnWyIseKiSLcjBqaAjCRG2DIjTmgmoi/vs/k6D0TN8Y00rj2xVMfSIysiR2pJHo0LIduTyZl EiYFCx/x5TDeulfKqdGoK0iHwBno7XK/UJfwc+R3jpGoUz3CjzI/2wTzc2RZDtwt4vD8=; 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=tJcj4gc0EU1kSne09MyMD0+pHs+mDV7EqRRH9MCoXD8=; b=i3mdthQunL3OPIjvBYRbL5YoGT HmVgEqf+W1doyrHJ0k4yX8GMlVAXaz1A1EI48hrz34cJ8s/VnhA+m/wMzYy8M95Y0XZ9gKhMHZhX0 zY+kn3dQfvaZYC8+bhaax2/HlIFWnyYqhHYqb755mbxuSG6Qlh4rVosEMD598KmmN9ik=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mOUIs-005SAB-Gj for linux-f2fs-devel@lists.sourceforge.net; Fri, 10 Sep 2021 00:22:02 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5568D6058D; Fri, 10 Sep 2021 00:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233317; bh=rhqq6V+MojK31vuhxkYnM09Uc1gc31+hQcpB2u9iXCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3s6N4DVKR+pwbmxMhDcOPFzJDbZ4GM6LpbqVYVoHopZ3qhTcfM3x0xvvQXIHa/Wl DkW35XE8Fa07biQMGx1pJOZMO79ToaTYxbGLa/KTMDd4BN7DFUN9QdPxoxDyknz1TO 5/RRccpkFTsBaxn4J7+jP7RegqvdQJ9z4UM6YGm3oVoZgkZkPUtsilsRfNqtU4C38r qVBrqdnQhq+V+bUgPQPMr8YqT3RfnmZ7YfT6PixBHQQnvaGdxVoEAz24Ywfd4sSjxw tTZyQDmKHkICZZTNfDrynLiXElggDEM0i/9+ZMKYotArq0Oo3cLDRaFazEF5JSPyJ7 X8P1IN79Cfc4Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Date: Thu, 9 Sep 2021 20:21:15 -0400 Message-Id: <20210910002143.175731-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-Headers-End: 1mOUIs-005SAB-Gj Subject: [f2fs-dev] [PATCH AUTOSEL 5.4 10/37] 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 5ba677f85533..d34fdedf7e86 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4403,7 +4403,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 68AE3C43219 for ; Fri, 10 Sep 2021 00:59:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D46D6113E for ; Fri, 10 Sep 2021 00:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244502AbhIJA7k (ORCPT ); Thu, 9 Sep 2021 20:59:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:48658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234294AbhIJAXH (ORCPT ); Thu, 9 Sep 2021 20:23:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5568D6058D; Fri, 10 Sep 2021 00:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233317; bh=rhqq6V+MojK31vuhxkYnM09Uc1gc31+hQcpB2u9iXCk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3s6N4DVKR+pwbmxMhDcOPFzJDbZ4GM6LpbqVYVoHopZ3qhTcfM3x0xvvQXIHa/Wl DkW35XE8Fa07biQMGx1pJOZMO79ToaTYxbGLa/KTMDd4BN7DFUN9QdPxoxDyknz1TO 5/RRccpkFTsBaxn4J7+jP7RegqvdQJ9z4UM6YGm3oVoZgkZkPUtsilsRfNqtU4C38r qVBrqdnQhq+V+bUgPQPMr8YqT3RfnmZ7YfT6PixBHQQnvaGdxVoEAz24Ywfd4sSjxw tTZyQDmKHkICZZTNfDrynLiXElggDEM0i/9+ZMKYotArq0Oo3cLDRaFazEF5JSPyJ7 X8P1IN79Cfc4Q== 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 5.4 10/37] f2fs: fix min_seq_blocks can not make sense in some scenes. Date: Thu, 9 Sep 2021 20:21:15 -0400 Message-Id: <20210910002143.175731-10-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-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 5ba677f85533..d34fdedf7e86 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4403,7 +4403,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