Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4639652iob; Sun, 8 May 2022 20:13:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPGWdWbbDq/zUn6u7kMXBItZACeCO1V+qrc2Ox5yb85PTOCiF9vRtl748rY8inL5wK0Aes X-Received: by 2002:aa7:9255:0:b0:505:a44b:275c with SMTP id 21-20020aa79255000000b00505a44b275cmr14311224pfp.40.1652066011317; Sun, 08 May 2022 20:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652066011; cv=none; d=google.com; s=arc-20160816; b=tzp5YXX8VVFF1Ttzt6sN8gPjvepnARb9FT2WOfm1IPLRbwzV/cR+JFbmXpcXEL8cI+ jvQK89jLh21+WXNW9sRVuhhCozuJUEv+WQRdmnZ/yblRX7SYds5vtnFrFGEa/0rloI7a vAEJp6YA/KrL7gAeMyFf1akz0wloCEIKnJ7YLrLI9/9lvp8hDKhOZ3ZeQOKmSgZIPz0N 8qTjrWBFyMXnH6RE3jh/FfyPpH3pIOHMSP9U9UlIwoFLmtCxKtEYZBJXFGQuMPJrsM/T cPGgmeF8kiaUo50k2af1bRwa+Z31gLi4u6CfrRVpV8MgzmjqeJU3xbXxfpfWPfPIP+TO nvQQ== 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=z3enMeOy1vKytaaFLS1vtPMycKJAsSbgTOvsZdKCodw=; b=C2hb7pNrKqYpxZafAFkJ8ZHJkm5ziRI9t3SLY0LHPOiWXAaugTInaiO75f5jauw0Pd plFMbJkfvlibIhQv5ypTvg5RPIM4Lz5aGrxBAyh5Ldlvwc06A6fhSaEGywK2vcTEW8iu U7bjBFGzpf9phlQLu+TjL8+Eiy9zofdGdC1yEZ9w8KHqcjLmoi4rhGx/Puv+7f4QCse1 EcIBsfq214tBQkR1FJLNm+bklnCgRtZlMjdGpwAkoPzTp3tJoyfvNEJ+EYs2hMTitbLJ SxAoUszNJCRW9Yt8/UaVomVmjiJurbYz2o6G1BJ4IKUHkjA8Noxqe20rr9vdfDNlT5s5 xvew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ox9zIlJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s2-20020a056a00194200b0050dcc1acf09si13903070pfk.111.2022.05.08.20.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ox9zIlJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B77B792D2C; Sun, 8 May 2022 20:12:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444961AbiEFXYc (ORCPT + 99 others); Fri, 6 May 2022 19:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355980AbiEFXYY (ORCPT ); Fri, 6 May 2022 19:24:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1490747AEF for ; Fri, 6 May 2022 16:20:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A82A5B82164 for ; Fri, 6 May 2022 23:20:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FDB1C385AE; Fri, 6 May 2022 23:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651879236; bh=JhOY5jQYZ0kMCKxk2E2Oa1KKHlQS0zvgZSIVhTOL09Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ox9zIlJQXm+flQVsd5sWotVo8KA1c16jziEiQ7i04XzoSj+iQvtwc5zof32Dpzp9p DmVCjpc0I4VO9I7FJlf5tPeG48rxYIjrUADoj1MXMXhrHFQxF1axzToaL/ehWoIemi VL9PDIhCkdwsiORKe16vBIC2zQb8w4lkkSPl7PzmSRsrjH8waJneaWBpiu+qHr8v94 HrDfPC1N1zf+LCrKivpgyI5czb6MceacQB1OfrtZK3DUoY0R5poU1JsRNKZq0TBkjA d+PgTouNyCgYsXWlJW4+gfSRm7WsKSVkFrTgcJ/2JcZGNlyB2D60UX6w9wc2jpWP5+ ZldaQMDCd26tg== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 3/5] f2fs: keep wait_ms if EAGAIN happens Date: Fri, 6 May 2022 16:20:30 -0700 Message-Id: <20220506232032.1264078-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220506232032.1264078-1-jaegeuk@kernel.org> References: <20220506232032.1264078-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In f2fs_gc thread, let's keep wait_ms when sec_freed was zero. Signed-off-by: Jaegeuk Kim --- fs/f2fs/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index aeffcc1d5c02..ec3f6f876e76 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -37,7 +37,8 @@ static int gc_thread_func(void *data) unsigned int wait_ms; struct f2fs_gc_control gc_control = { .victim_segno = NULL_SEGNO, - .should_migrate_blocks = false }; + .should_migrate_blocks = false, + .err_gc_skipped = false }; wait_ms = gc_th->min_sleep_time; @@ -146,7 +147,6 @@ static int gc_thread_func(void *data) gc_control.init_gc_type = sync_mode ? FG_GC : BG_GC; gc_control.no_bg_gc = foreground; - gc_control.err_gc_skipped = sync_mode; /* if return value is not zero, no victim was selected */ if (f2fs_gc(sbi, &gc_control)) -- 2.36.0.512.ge40c2bad7a-goog