Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4491830imm; Mon, 15 Oct 2018 16:08:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60sWNDHPNwKyQ9Pt4YDoegUhqE/+EHFgo+n1m6M3Xx4pdQw3v+KsEOPMJG9nwUL1+3O24pH X-Received: by 2002:a17:902:7d98:: with SMTP id a24-v6mr18886069plm.271.1539644925611; Mon, 15 Oct 2018 16:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539644925; cv=none; d=google.com; s=arc-20160816; b=m3flIoYQvRU9NEuOoqg/9+BsOUgXvg18hh4qlp1TAHBeWr31pTsLe8HxzdPSxyO7/m +6W6p8r2uAGiNPtopjolJLRKZufqPrauEOUlUlrRBbRB+I8ejA7E3bzErI5QsUih5YE3 PBjArlW6K9yC+6vpAL9iYgvBA2jebAL4+wOSkE4cYVgF1/bYMmWjAkQRT28U8iE8JrRs TZnqBnS65Xly18+e/I6Ox7ZkPmJTDPa1gWv7Mdc44zA6J9HzegelJw8+QS2SIWg4P/KS QNTx8K4XM3b4NfXhyt0Oi/Hdd9aV2BedJavx9KHNkr1++dVxHuIEMBFBc303buZEUXaq rsaQ== 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:dkim-signature; bh=bo0wKViY10ZVdcHs5y4Hyz2mhJYu0QwIFM1Scr2BAeM=; b=ofmEFJL96V1lDI2rxCkwj2UknOrCjBeAHAd/L6N92QAnEuocZmzLOnQzWqppmRLGaS 3CzBACC2zoWqSYXfN1vrqCWyb81G+u12As00ikQA383S2r1WC+z+/St54Ql34bwhHWqA YMmexJ/EKsp91GsRUb11NV7OnmjCKr7J+ppeK0kPWO0ANpeGLul1InASaLOZiKihNV03 U472QTk3OZ4dvJeSQ+r8bdXqG8PLwUjPE6x8cME6Dofc24+OA1nRia3DwblaSMgCu/nI a3uNvCYFB0RwcaD0+lriM9ld6h9h1PFopRE/FKdwa+ffTy/UUclbpZGwOO/JwaQdd9GY Hzbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YYoOMwFV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6-v6si11961768pge.215.2018.10.15.16.08.29; Mon, 15 Oct 2018 16:08:45 -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=@kernel.org header.s=default header.b=YYoOMwFV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727018AbeJPGzb (ORCPT + 99 others); Tue, 16 Oct 2018 02:55:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:47034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbeJPGzb (ORCPT ); Tue, 16 Oct 2018 02:55:31 -0400 Received: from localhost (unknown [104.132.1.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 37E002089D; Mon, 15 Oct 2018 23:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539644888; bh=WfmKgctiGpq0AofLj01CvrrBXv2+fR229Lyrb9kbj/g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YYoOMwFV1jN7v9keEYNUDfcO6/oBxJW5yr7QnbDT1BYfovs8AafbugqiwIt+0GhH3 eV+Mr2YqQ7jDQyWNyETq4tfNzBPGa3WkW627PVQgc753exHGJAMK1bZ3GNWqjgQWBE JXPuAlT5om1Gfgl+tU8l5dzrqXcOJFib7/kzSilw= Date: Mon, 15 Oct 2018 16:08:07 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH] f2fs: clear cold data flag if IO is not counted Message-ID: <20181015230807.GC1296@jaegeuk-macbookpro.roam.corp.google.com> References: <20181010212217.52289-1-jaegeuk@kernel.org> <3f08031e-d195-5bc1-67e1-f3b6eab3506b@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f08031e-d195-5bc1-67e1-f3b6eab3506b@huawei.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/15, Chao Yu wrote: > On 2018/10/11 5:22, Jaegeuk Kim wrote: > > If we clear the cold data flag out of the writeback flow, we can miscount > > -1 by end_io. > > I didn't get it, which count do you mean? It's the number of dirty pages. Balancing F2FS Async: - IO (CP: 1, Data: -1, Flush: ( 0 0 1), Discard: ( 0 129304)) cmd: 0 undiscard: 0 > > Thanks, > > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/data.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > > index 29a9d3b8f709..4102799b5558 100644 > > --- a/fs/f2fs/data.c > > +++ b/fs/f2fs/data.c > > @@ -2636,10 +2636,6 @@ static int f2fs_set_data_page_dirty(struct page *page) > > if (!PageUptodate(page)) > > SetPageUptodate(page); > > > > - /* don't remain PG_checked flag which was set during GC */ > > - if (is_cold_data(page)) > > - clear_cold_data(page); > > - > > if (f2fs_is_atomic_file(inode) && !f2fs_is_commit_atomic_write(inode)) { > > if (!IS_ATOMIC_WRITTEN_PAGE(page)) { > > f2fs_register_inmem_page(inode, page); > >