From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6732230AAAE for ; Tue, 6 Jan 2026 08:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767687288; cv=none; b=E/KD1G+uDxz0ojQu4km75ZreR+BbNFN4en0is4Z+OsA9basQESFqVDsKEMZHaMigT/LTOYLx+uz7Rs0chkxWvG1M9mmoe7avpolPGMq+DfDODCqMkTiGU2ZddDJeNayZAqodtJ0Tz12GrIFwvpF2l8oCh3TaUT6x6beo0IfBwps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767687288; c=relaxed/simple; bh=GLKnxRXS7x6QbMGNH9aXz2zmKBGtXZuBZtxcuG3vyw4=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Ni2xvHb4hUoQVzU5BVvCjmNJzDtrE9h6kZJxZFLUCP0nb0OGPGQpirAn8UbmywkGuWh7pnO+l6izkaY8uJ1OZKlSMbJGkhQ0KuuRSpvct/3Mk20/QLRng4ISdMHKus6p0Tj1kS2kaVwRmC9K62VqsFptYzkRYYm/plUC8epeIHM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aMG8Ji+o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aMG8Ji+o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA21CC19422; Tue, 6 Jan 2026 08:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767687288; bh=GLKnxRXS7x6QbMGNH9aXz2zmKBGtXZuBZtxcuG3vyw4=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=aMG8Ji+oeKE1FHxuezo31BrbV5Sq1rZimkrdKujwiEUOXWv3bKB6iV07bvFT9NL/e e54pSBmf8Qko28J/RHoB5E3Tx0O0ghpe089rZuO+rBStkeHepNIpGQtnh/X7+5uTG2 XcQAH+GXa6X5Qx6OvE+Rz0CI87/DMTdGSYCJwiGCzSADmrmPWYydl5uk1OtKH1IIvH HrDIjDjgOhrUciGHzjFfbk5GbpXuLH6tW35kZVxElyY6FrCR1TUbabbqracO0oZw0f 4lUgcR+eRZnPbP/dEVKtw3eHsoeERABx2+qbnIW0iOUXzv2QLFtj2c/7Hkw4DfwSxA HaRXEr4kP8iiQ== Message-ID: <5c079448-7bb6-4fe8-93a3-620657d2b8eb@kernel.org> Date: Tue, 6 Jan 2026 16:14:53 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Daeho Jeong Subject: Re: [f2fs-dev] [PATCH] f2fs: flush plug periodically during GC to maximize readahead effect To: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com References: <20251230173845.2310677-1-daeho43@gmail.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20251230173845.2310677-1-daeho43@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/31/2025 1:38 AM, Daeho Jeong wrote: > From: Daeho Jeong > > During the garbage collection process, F2FS submits readahead I/Os for > valid blocks. However, since the GC loop runs within a single plug scope > without intermediate flushing, these readahead I/Os often accumulate in > the block layer's plug list instead of being dispatched to the device > immediately. > > Consequently, when the GC thread attempts to lock the page later, the > I/O might not have completed (or even started), leading to a "read try > and wait" scenario. This negates the benefit of readahead and causes > unnecessary delays in GC latency. > > This patch addresses this issue by introducing an intermediate > blk_finish_plug() and blk_start_plug() pair within the GC loop. This > forces the dispatch of pending I/Os, ensuring that readahead pages are > fetched in time, thereby reducing GC latency. > > Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Thanks,