Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp858789ybh; Tue, 10 Mar 2020 09:33:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt2Fv3XaMgGBE7K127GI6Bvk7HB3nI9lCr2L/YYo4Y+ZsjUQvEp2rUMxtrTnp0SYt8/CqCn X-Received: by 2002:a05:6808:7dd:: with SMTP id f29mr1834652oij.67.1583858001250; Tue, 10 Mar 2020 09:33:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583858001; cv=none; d=google.com; s=arc-20160816; b=0JVYc+ySu/GaO5gWSJ6lJIEImKWWYccCkMo/PO+8o9pk/rF6yiZpEGU+R42eblyl8X DIb4YKRSAuJyGPychwzSWvTz+tGGYSy/WJA/dPMneaq+bNH5lU0Biud582ghG7Axzrti 79GxfoPXNbBr6uBRmSrWgfMSwsB/pEFYEVPfIj8uLA12bcwqkwTNjk6ByRwyITzFXM4W m9xEXOeFAMnF9Rl3T6ftnMXD2gKDiOsNvrErNTUZ8PUO7iCXuLh23H6yU/oA6t550xvA s8rCNxDJadbpI+OzzCKyaoYp6gpwCql4fIfrIG6GovivvucGbH8ASmMnL0ZTJR3PsH0i fgMA== 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=v6UUlXs6s/wfkxq7kKSxxRt/BhpkTl3aXYt0Mf3Q25U=; b=xvy71dQ9Pdb/WFGftz1HLMFaChw59tt9zjeBSibBzkqSqN1XOvSC5Xs4uF+c4wONl2 kQ4Nc96AaTR8XDBT+fS1XWREb61lR6hEdXT4kO7faKTpmLP4xUCX+Mq9XEP5Z/B8yfv7 gO61b2GE+ZzgpIKKAd7+vXiDXjkxbtJQ83P1wh9T/uSJppdKhk9iO76YPcG6Xglt6rTK WL9twMFtzncWSVFXoojCR3LXDhvtdQMUmDRtunuplxlpHNJHcsLEjsLuUYueH80gqrdX dpRo2Td5421qgN8wZIx6VrS7lYD2zFhhFMFg9B0tOHq8L+3ZZ4jCpyoySs5w+qwrpZ1u uXxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rb36kZ2I; 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 f21si8734344otf.128.2020.03.10.09.33.08; Tue, 10 Mar 2020 09:33:21 -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=Rb36kZ2I; 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 S1727369AbgCJQck (ORCPT + 99 others); Tue, 10 Mar 2020 12:32:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:46786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbgCJQck (ORCPT ); Tue, 10 Mar 2020 12:32:40 -0400 Received: from localhost (unknown [104.132.1.66]) (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 89DBD20848; Tue, 10 Mar 2020 16:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583857959; bh=/2iPAON56KiKp4VwG3w8X0u28X5Zi54HWAvPebGYCEc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rb36kZ2IbhnZyB3p1V4V9GfgNg6bejDxx1CE6wjMZfT6YUH/psCRAb2RrJkPjMgH2 Go0BJJKKyZ5lTjS5QhXBu42kon1eWwEY210z/9Ec+pBRGEjfzfyFtu+GiWsT6Os2CD XunWcletPjGcSg/F8kGYtouEaW6O5e0gn8UznE8s= Date: Tue, 10 Mar 2020 09:32:39 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH 2/5] f2fs: force compressed data into warm area Message-ID: <20200310163239.GC240315@google.com> References: <20200310125009.12966-1-yuchao0@huawei.com> <20200310125009.12966-2-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200310125009.12966-2-yuchao0@huawei.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Not quite sure tho, compressed blocks are logically cold, no? > > 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