Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5137419imm; Wed, 12 Sep 2018 01:29:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZCtp77g3+Iewp1iuZAdrtTblHXYOmFA9bpQZ4mrkHyjDDWsvBrIMScYpYMEz5LNdX2nCQE X-Received: by 2002:a63:4b1f:: with SMTP id y31-v6mr911115pga.14.1536740980715; Wed, 12 Sep 2018 01:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536740980; cv=none; d=google.com; s=arc-20160816; b=POE1NcJ0lFzdEN4unnzuxvCEZSZp/1ytrS4JEGIEjeWdEsri9ilziqyPi7gdnrMaF0 UApjnyQNAsimHWL4V6LnYi7WQV6x97lU5r+aHyjROGPbXA9nJwNEfaPZiVliR1KeNEdR 2v7wbYsot50fpcndo+S9qESuG0BmF6KaHa1GcMKPZIx1iWunF8HLPEl/hj6kL2SC4H7V URm3Xho0H7ASBKeiWzyLPGY3wme5RF4J6zod+kof3JOzY0XiJC/asrBYfbfossaEdO7b QV3oEEimCOz6Ez9pWMT9uijlfqYYOR44XKVrJi+daXmirakTvD+MCLUNiYjebTtdUO9z XxAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature; bh=op/Ne3MAzWcMUAaV2t/uqLwdwut6PTEddkE6MbHRLUU=; b=xsTUfsZDF1/Mpo1meOCXnyQb0eAVOLqWvBZGN9Zn6K2KV42muRYuhQO/lO3PO49afU AXU3NaY8yZiuW7P/RmzH3ZTOm7HrtxuM+f1SxaFavmOdJJYAI9dq72VP97fOLt7K+a3z h+uUa3E61o4zftzWDulzzvsU9t7qzN1jVmQdJlar5eI6K3hYzWot02PG2qsgLUlWoa9I Mc0KAGHzdLQtEB6qeAihVyWnI9vP150ld3/UPYWR8Jp2xXpGUYnuGGnbvX3qlULwfXku +/oVZpwSS9aU1KI1E5mXAz2jaIzzkSDSUtotzwVfDB2cjjM/enVSfCpt8b9Z2fomRFnG Adcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HNBPXw9j; dkim=pass header.i=@codeaurora.org header.s=default header.b=HNBPXw9j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88-v6si364493plc.515.2018.09.12.01.29.25; Wed, 12 Sep 2018 01:29:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HNBPXw9j; dkim=pass header.i=@codeaurora.org header.s=default header.b=HNBPXw9j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727762AbeILNbO (ORCPT + 99 others); Wed, 12 Sep 2018 09:31:14 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53314 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeILNbO (ORCPT ); Wed, 12 Sep 2018 09:31:14 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AFCBD60997; Wed, 12 Sep 2018 08:27:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536740866; bh=6trXrBsBnm3F620cCr2ocw2hXd+YCJSrpeKawB8zXdM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HNBPXw9jbEWUZASNhqD90N4MahhKF+O94N2QjIjBp54dZS7KwfbzkfIv/stkmV/cn nqFEqzhPGINmMTrOfJ7xt5pBjEQZu2CuWnVYO8xnO5qzLHqdFKVBzmlyxO/hLeX+Qi 1CZM+DhWNXTjhOvGOIWUZ3ziHC9R+gIXOtiRa1Q4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 28D1260594; Wed, 12 Sep 2018 08:27:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1536740866; bh=6trXrBsBnm3F620cCr2ocw2hXd+YCJSrpeKawB8zXdM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HNBPXw9jbEWUZASNhqD90N4MahhKF+O94N2QjIjBp54dZS7KwfbzkfIv/stkmV/cn nqFEqzhPGINmMTrOfJ7xt5pBjEQZu2CuWnVYO8xnO5qzLHqdFKVBzmlyxO/hLeX+Qi 1CZM+DhWNXTjhOvGOIWUZ3ziHC9R+gIXOtiRa1Q4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 28D1260594 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org Date: Wed, 12 Sep 2018 13:57:40 +0530 From: Sahitya Tummala To: Jaegeuk Kim Cc: Chao Yu , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH v2] f2fs: add new idle interval timing for discard and gc paths Message-ID: <20180912082740.GB22939@codeaurora.org> References: <1536551252-24256-1-git-send-email-stummala@codeaurora.org> <5d74d46b-8141-f048-9c0a-459c82b2c449@kernel.org> <20180911220958.GC55456@jaegeuk-macbookpro.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180911220958.GC55456@jaegeuk-macbookpro.roam.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 11, 2018 at 03:09:58PM -0700, Jaegeuk Kim wrote: > On 09/11, Chao Yu wrote: > > On 2018/9/10 11:47, Sahitya Tummala wrote: > > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > > > index abf9256..6070681 100644 > > > --- a/fs/f2fs/f2fs.h > > > +++ b/fs/f2fs/f2fs.h > > > @@ -1093,6 +1093,8 @@ enum { > > > enum { > > > CP_TIME, > > > REQ_TIME, > > > + DISCARD_TIME, > > > + GC_TIME, > > > MAX_TIME, > > > }; > > > > > > @@ -1347,14 +1349,35 @@ static inline void f2fs_update_time(struct f2fs_sb_info *sbi, int type) > > > sbi->last_time[type] = jiffies; > > > } > > > > > > -static inline bool f2fs_time_over(struct f2fs_sb_info *sbi, int type) > > > +static inline bool f2fs_time_over_cp(struct f2fs_sb_info *sbi) > > I don't see why we need this separately. Yes, not really required. I will update it. > > > > +{ > > > + unsigned long interval = sbi->interval_time[CP_TIME] * HZ; > > > + > > > + return time_after(jiffies, sbi->last_time[CP_TIME] + interval); > > > +} > > > + > > > +static inline bool f2fs_time_over_req(struct f2fs_sb_info *sbi, int type) > > > +{ > > > + unsigned long interval = sbi->interval_time[type] * HZ; > > > + > > > + return time_after(jiffies, sbi->last_time[REQ_TIME] + interval); > > > +} > > > + > > > +static inline unsigned int f2fs_get_wait_time(struct f2fs_sb_info *sbi, > > > + int type) > > f2fs_time_to_wait()? Sure. > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > > index 5c8d004..c0bafea 100644 > > > --- a/fs/f2fs/gc.c > > > +++ b/fs/f2fs/gc.c > > > @@ -83,8 +83,10 @@ static int gc_thread_func(void *data) > > > if (!mutex_trylock(&sbi->gc_mutex)) > > > goto next; > > > > > > - if (!is_idle(sbi)) { > > > - increase_sleep_time(gc_th, &wait_ms); > > > + if (!is_idle(sbi, GC_TIME)) { > > > + wait_ms = f2fs_get_wait_time(sbi, GC_TIME); > > > > It seems this patch changes the method of increasing wait_ms here, if device is > > busy, we may wake up GC thread earlier than before, not sure we should do this. > > > > To Jaegeuk, how do you think of this? > > Yes, please let us discuss this in another patch. Sure, I will submit this in another patch for discussion. -- -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.