Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp117979ybh; Tue, 10 Mar 2020 20:47:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu2W8AUWOs+cE5vuaOFNXaJWiXd4NLlzNyhv/NgrjLf+RIXKzSDuE3yZLpar3/31pERmomV X-Received: by 2002:aca:e1c5:: with SMTP id y188mr228700oig.90.1583898447018; Tue, 10 Mar 2020 20:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583898447; cv=none; d=google.com; s=arc-20160816; b=DJZatzJSjPxaUmuRO9FRenQrC8xosu+RKL/UdF0cYiHv48L/UYD/rNg0d5VSAQ4qJd DDtuTLRTbdhNQSUHip/6gh81EtsxiBzMfPJckpGl/GTOSxN8cvtkTOBfRnHBYQgJhUlL VBULhskw89hNPFMxOBMinLCDmol+TEdy9W51SGurKWSn6pS9b6QRgAjpJwjt567gchfX 5HM7NTknMO8ClWs+aIrEf9pMAftkzfoDu9Qq96HOupzKHepTWxmUJsMjOcDWwRafublt PfK8V5Wfm7NwMjc2Ly1tXwkDpxpS+D5Q5JTvrUJTecWnk1ZC2RtkrVZH3t2o8DTqhrnE R1og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=azdcEwZk7hKF1T+MlBZJoAtNXoOB+Jgzttg2MkCZjv4=; b=cizMsfTVsNgnrmzx3SZGAsCL1XPwYPYTJUze7GMzpsceyQddPqUXssj6IZBXiH3GVF E/8pgWttoPHkdvQUXH7Sk3ZKKQHFwfwiKXEk+COHsKYucA3UCctJWXT84XqDc5d0dN8O 9E0FS+tmOCW1m54+Sh3A5Y/mchMnlZczYLTXhQd26iLhNhV7S6tm9jkCN3dgcM0Q2d1J eKOZ8I9ObO9oOsupmm4b+bi2iXKmOen0yBG9oPVZB5Livm94kY2OvnyrNMeMRz4dq9jV VOPGbzliB01D3Kg/J4ui9yLR0hRicNRGptyLY7R4+wxHYGbE6bpj+H3iSTWCohBOXhcJ gxpw== ARC-Authentication-Results: i=1; mx.google.com; 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 s11si444628oic.57.2020.03.10.20.47.15; Tue, 10 Mar 2020 20:47:27 -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; 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 S1727995AbgCKDpn (ORCPT + 99 others); Tue, 10 Mar 2020 23:45:43 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11625 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727685AbgCKDpn (ORCPT ); Tue, 10 Mar 2020 23:45:43 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B66BC64527A1541740A0; Wed, 11 Mar 2020 11:45:41 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.203) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 11 Mar 2020 11:45:37 +0800 Subject: Re: [PATCH 2/5] f2fs: force compressed data into warm area To: Jaegeuk Kim CC: , , References: <20200310125009.12966-1-yuchao0@huawei.com> <20200310125009.12966-2-yuchao0@huawei.com> <20200310163239.GC240315@google.com> From: Chao Yu Message-ID: <303612de-fa66-8e8a-0d02-dac322832e46@huawei.com> Date: Wed, 11 Mar 2020 11:45:37 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200310163239.GC240315@google.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/11 0:32, Jaegeuk Kim wrote: > On 03/10, Chao Yu wrote: >> Generally, data shows better continuity in warm data area as its >> default allocation direction is right, in order to enhance >> sequential read/write performance of compress inode, let's force >> compress data into warm area. It looks cold data's allocation direction is right as well, I missed to notice that previously due to I tested in small-sized image, and f2fs_tuning_parameters() enables ALLOC_MODE_REUSE, then cold data allocation always searchs free segment from segno #0, it breaks continuity of physical blocks. > > Not quite sure tho, compressed blocks are logically cold, no? Correct. Please ignore this patch. :P Thanks, > >> >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/segment.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c >> index 601d67e72c50..ab1bc750712a 100644 >> --- a/fs/f2fs/segment.c >> +++ b/fs/f2fs/segment.c >> @@ -3037,9 +3037,10 @@ static int __get_segment_type_6(struct f2fs_io_info *fio) >> if (fio->type == DATA) { >> struct inode *inode = fio->page->mapping->host; >> >> - if (is_cold_data(fio->page) || file_is_cold(inode) || >> - f2fs_compressed_file(inode)) >> + if (is_cold_data(fio->page) || file_is_cold(inode)) >> return CURSEG_COLD_DATA; >> + if (f2fs_compressed_file(inode)) >> + return CURSEG_WARM_DATA; >> if (file_is_hot(inode) || >> is_inode_flag_set(inode, FI_HOT_DATA) || >> f2fs_is_atomic_file(inode) || >> -- >> 2.18.0.rc1 > . >