Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1109236pxk; Fri, 4 Sep 2020 00:12:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+fQMCpkqqGJCkSkPCwfxMF5N1IpXBrPJVKB9ixL+1dsjosaWXhkph13Bi7sDOHkIHL/wo X-Received: by 2002:a17:906:4e4a:: with SMTP id g10mr5783495ejw.274.1599203555265; Fri, 04 Sep 2020 00:12:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599203555; cv=none; d=google.com; s=arc-20160816; b=L/wrgDdZ4nTrCDHUmHHozoLQyES1H2e0QOBzwMFqBBJF/tMj4scKiwYRFqM4uu61L6 C/R675qlIeSoUW74zBgVIfSHJElb7ZjKMHquO0DtyFiCIsr/SuxLy0FvI7jA0uPVhEP7 0USUildEEUQ8FONgEoOPlN+u+Jj9i48BFaXAMMivSzowM4Vvyrc2Fb8YzW+lFIreTTVQ Fafqja8qRehfdn7tqAuYuZpS1ZsWKVu2CZ0boCz4Zux89sO5gMJH1XTGc0HER+M9Eqsd xZh8EIdzmsgv0THK4wowvosL3YBG0PyI3qT7hHMVqnlU+EvZntPTnyjGaKQSzrFPpKAX kJOw== 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:references:cc:to:from:subject; bh=YzjkDwC/rgAQLUcQwgG+TisYQ0b3C5xranMO+VXF/eU=; b=xF3G7XbOpiK63aVIhuseXUEmG30gNkoHilrXh5x/GQm6QUGNoNQ5FSEIPUnTgwubpC h6QQRc7v/cU7+mpPxcnNcMzXijRtAFXi5PPQfsvH64io/ueaYVpaIuML6e0HCeyCgXRj zSfapavKPY4mckMCGOEs9/0tkF87ymnQOt3GY+qqU1OZ00MJPdM8eTG/CIIAJdUGVFkB Ka4mBO8jPAwSxDhKVMKj+TvKVBSeCdI2NfA20y1ptqiAI5wx4StnnOC8Ejg1oT5k/Pie FegzsOkxhVtgnNmAehyMSLRhPTKao4956LATuNbFm44tpxltObnyMbQDIVvZ8YVa1PLo RoaA== 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 w23si1057287eju.558.2020.09.04.00.12.12; Fri, 04 Sep 2020 00:12:35 -0700 (PDT) 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 S1728636AbgIDHLf (ORCPT + 99 others); Fri, 4 Sep 2020 03:11:35 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:37460 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726811AbgIDHLb (ORCPT ); Fri, 4 Sep 2020 03:11:31 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6F775E2F219C921F5B33; Fri, 4 Sep 2020 15:11:28 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.214) with Microsoft SMTP Server (TLS) id 14.3.487.0; Fri, 4 Sep 2020 15:11:27 +0800 Subject: Re: [f2fs-dev] [PATCH v3] f2fs: change virtual mapping way for compression pages From: Chao Yu To: Daeho Jeong , , , CC: Daeho Jeong References: <20200812051711.2147716-1-daeho43@gmail.com> Message-ID: Date: Fri, 4 Sep 2020 15:11:26 +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: 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daeho, Could you please clean up a bit on this patch, we can wrap vm_map_ram loop logic into f2fs_vmap() as below: f2fs_vmap() { for (i = 0; i < MAX_VMAP_RETRIES; i++) { cc->cbuf = vm_map_ram(cc->cpages, cc->nr_cpages, -1); if (cc->cbuf) break; vm_unmap_aliases(); } } How do you think of this? Thanks, On 2020/8/13 17:09, Chao Yu wrote: > On 2020/8/12 13:17, Daeho Jeong wrote: >> From: Daeho Jeong >> >> By profiling f2fs compression works, I've found vmap() callings have >> unexpected hikes in the execution time in our test environment and >> those are bottlenecks of f2fs decompression path. Changing these with >> vm_map_ram(), we can enhance f2fs decompression speed pretty much. >> >> [Verification] >> Android Pixel 3(ARM64, 6GB RAM, 128GB UFS) >> Turned on only 0-3 little cores(at 1.785GHz) >> >> dd if=/dev/zero of=dummy bs=1m count=1000 >> echo 3 > /proc/sys/vm/drop_caches >> dd if=dummy of=/dev/zero bs=512k >> >> - w/o compression - >> 1048576000 bytes (0.9 G) copied, 2.082554 s, 480 M/s >> 1048576000 bytes (0.9 G) copied, 2.081634 s, 480 M/s >> 1048576000 bytes (0.9 G) copied, 2.090861 s, 478 M/s >> >> - before patch - >> 1048576000 bytes (0.9 G) copied, 7.407527 s, 135 M/s >> 1048576000 bytes (0.9 G) copied, 7.283734 s, 137 M/s >> 1048576000 bytes (0.9 G) copied, 7.291508 s, 137 M/s >> >> - after patch - >> 1048576000 bytes (0.9 G) copied, 1.998959 s, 500 M/s >> 1048576000 bytes (0.9 G) copied, 1.987554 s, 503 M/s >> 1048576000 bytes (0.9 G) copied, 1.986380 s, 503 M/s >> >> Signed-off-by: Daeho Jeong > > Reviewed-by: Chao Yu > > Thanks, > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel > . >