Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp340665pxb; Tue, 3 Nov 2020 00:32:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBAPVzR6VtVZsASS8lgP03h8cYE32dXHePxGaKGE8FguXeilzoQOE3KJFAOjNDgxFg4jIw X-Received: by 2002:a50:9e29:: with SMTP id z38mr21004110ede.220.1604392360663; Tue, 03 Nov 2020 00:32:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604392360; cv=none; d=google.com; s=arc-20160816; b=DxdkygLfchQIzxk+jpWfnvp5kQd4iv2/ztTisVE4/PbDY20esRGyaLc+wB/mq3jWAa Ki7W70N8Co9TVZ3kUPVQ134Cx6pNpk666Ji7AWtKi0ZC+IIsshpVJOW+V847tDNkqDRs LjUKUrNkSa28X4K1hO1SqzZKu0NuuhjZKivDOikCrU0uZnizhUDSGfxVYH1BnEzz9ttn LVZWcCRlxOmdMPh5fpd5ZZmbbztoM3l8vVisBi0hXFNd6J1vX/qgDpRbWW8HmTOoM4Pi e9BP8Ubr7bDmPw1dIrBUVOG/dyJHMVAhZO8d4EB8Wde6CCzMgVy2SjAIVmApHEYkHDBB 99/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=qsbyzQy/SNKZNPnrAV1I0ubh1CF2F1xc8rWy+VybJIw=; b=sAgfZO/OmjkEg+g0zyBtNoD1j6JGoiT1tKC2orPWo6QqkaY84GJRoiFvnDTkE72fKe cPIg+bDy3WTzJGm1zMXytRHUMzbNTEJ8zeuiQrprtM9SF8jsTzUqROafaDFVQIbw6opQ lbPYUl/HtI201T8/chYK0WX10EIpS0UD7yus0QwzH4DvmIK2hBCz8AGOjhNoPu6CRVB6 OndFVOj4eBTRBYk2rLg8W2u1VbeThZytSQNu0EID6cD8YvpWxOW5QHTqKRr0v1eACD3R e3BX0mKtL834djf86UXFpNz79C4GFokMO8c2F3+q7mgUKGjACGoJCkj9bUP8r/jk5//E ZPAw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si13241184edk.374.2020.11.03.00.32.18; Tue, 03 Nov 2020 00:32:40 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727566AbgKCI2x (ORCPT + 99 others); Tue, 3 Nov 2020 03:28:53 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7579 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgKCI2x (ORCPT ); Tue, 3 Nov 2020 03:28:53 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CQNGm0GWrzLt4H; Tue, 3 Nov 2020 16:28:48 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.203) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 3 Nov 2020 16:28:50 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: change write_hint for hot/warm nodes To: , "jaegeuk@kernel.org" , "chao@kernel.org" CC: yongmyung lee , Jieon Seol , Sang-yoon Oh , Mankyu PARK , Sung-Jun Park , "linux-kernel@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , Keoseong Park , SEUNGUK SHIN , "Jinyoung CHOI" , Jaemyung Lee References: <20201103064039epcms2p30ecac0e7cefff0d50745f2e2e61ce38e@epcms2p3> From: Chao Yu Message-ID: <609445f8-de3b-eb79-449c-020125799449@huawei.com> Date: Tue, 3 Nov 2020 16:28:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20201103064039epcms2p30ecac0e7cefff0d50745f2e2e61ce38e@epcms2p3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/11/3 14:40, Daejun Park wrote: >>From 818a76a9aee5bf225565264274d211edb07bae7d Mon Sep 17 00:00:00 2001 > From: Daejun Park > Date: Tue, 3 Nov 2020 15:30:26 +0900 > > > In the fs-based mode of F2FS, the mapping of hot/warm node to > WRITE_LIFE_NOT_SET should be changed to WRITE_LIFE_SHORT. > > As a result of analyzing the write pattern of f2fs using real workload, > hot/warm nodes have high update ratio close to hot data.[*] > However, F2FS passes write hints for hot/warm nodes as WRITE_LIFE_NOT_SET. > > Furthermore, WRITE_LIFE_NOT_SET is a default value of write hint when it is > not provided from the file system. > In storage, write_hint is used to distinguish streams (e.g. NVMe). > So, the hot/warm node of F2FS is not distinguished from other write_hints, > which can make the wrong stream seperation. > > * Liang, Yu, et al. "An empirical study of F2FS on mobile devices." 2017 > IEEE 23rd International Conference on Embedded and Real-Time Computing > Systems and Applications (RTCSA). Could you please update Documentation/filesystems/f2fs.rst as well? Thanks, > > Signed-off-by: Daejun Park > --- > 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 1596502f7375..7b42bb10c6c3 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -3208,7 +3208,7 @@ enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi, > return WRITE_LIFE_EXTREME; > } else if (type == NODE) { > if (temp == WARM || temp == HOT) > - return WRITE_LIFE_NOT_SET; > + return WRITE_LIFE_SHORT; > else if (temp == COLD) > return WRITE_LIFE_NONE; > } else if (type == META) { >