Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013785pxb; Thu, 9 Sep 2021 18:01:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk/nNDOsGtxHnU0gbYP+wNmKOjMRKGwxTznEbDaHElbzKcIu+sQMnES9DjtNKplVWq4Xjc X-Received: by 2002:a92:440c:: with SMTP id r12mr4375896ila.174.1631235684762; Thu, 09 Sep 2021 18:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235684; cv=none; d=google.com; s=arc-20160816; b=v7TaSA8kkDSX42vpBv3iuazq5PBlsN1qsEMcW4cXPgBp7vRyKxNApTQqb0cScPELaz Rfo3jdSwGz0FRTu4mobrFpxt2GjOS2Iv+30DOpJOLiorbn8O4vEPUqKauHjy8zcHkUaM F2AoPvnSOKgYw4jMG+k0yqnZP0SR4Mnfewv2shiXjVpy4RL0pfWZ409LsJHz+JjQfqXf AVSmRyuM+HNkjz+IjyelG5mC997Jh1En8pdQDEmHemTCcfnnLrw1jjs4A/mehFrME0U3 Pk2BQBUNH6RpmvzKeZ3/rD2a2lmTeX/GqCtwAHNzw0sbqO+PsIMtOChcJ3siBpR4ookA 74rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tJcj4gc0EU1kSne09MyMD0+pHs+mDV7EqRRH9MCoXD8=; b=c3MvCRfaqIVGxqNm12GaXNYbwl8/jQJXR1HfmDFgbpsYuwMWMJwN14D3oTc/cLUvUA kUbze+8pVILZC/OJElcNdMnLH0YUimelMHacl//yNlmN0W3iJ95a3dFw5VjOshHoGcPs Y8H4hU6kKn1Xq5mrJnOhuj6vmA97hGv+3ueJNYJ2P+1Py25fxlJx+mHnKQy2JWbKcgKT I9NM6hknRNGezcKUyWPui/P2Y2UcTz5AHPrZMCKIw30RjxSrcnPeDovwfHp9ulpc1ock xw5qZDwxy0FMMWmUmUwYJX7prPy3KhO+H9XOuR44TZOhHElTm5uLopjPinAvdd5bVw6W JN9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U3s6N4DV; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si3073274iop.30.2021.09.09.18.01.10; Thu, 09 Sep 2021 18:01:24 -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=@kernel.org header.s=k20201202 header.b=U3s6N4DV; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244489AbhIJA7j (ORCPT + 99 others); Thu, 9 Sep 2021 20:59:39 -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