From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbdBGHYz (ORCPT ); Tue, 7 Feb 2017 02:24:55 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:33788 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751606AbdBGHYy (ORCPT ); Tue, 7 Feb 2017 02:24:54 -0500 Subject: Re: [PATCH] f2fs: introduce nid cache To: Jaegeuk Kim References: <20170122095331.58427-1-yuchao0@huawei.com> <20170124043500.GC1566@jaegeuk.local> CC: , , From: Chao Yu Message-ID: <452624a9-8b9a-843c-98df-00187a8f795a@huawei.com> Date: Tue, 7 Feb 2017 15:24:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <20170124043500.GC1566@jaegeuk.local> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.5899761E.023F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 46495a99b20cc7b6f5e60a769073b9cb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jaegeuk, Happy Chinese New Year! :) On 2017/1/24 12:35, Jaegeuk Kim wrote: > Hi Chao, > > On 01/22, Chao Yu wrote: >> In scenario of intensively node allocation, free nids will be ran out >> soon, then it needs to stop to load free nids by traversing NAT blocks, >> in worse case, if NAT blocks does not be cached in memory, it generates >> IOs which slows down our foreground operations. >> >> In order to speed up node allocation, in this patch we introduce a new >> option named "nid cache", when turns on this option, it will load all >> nat entries in NAT blocks when doing mount, and organize all free nids >> in a bitmap, for any operations related to free nid, we will query and >> set the new prebuilded bitmap instead of reading and lookuping NAT >> blocks, so performance of node allocation can be improved. >> > > How does this affect mount time and memory consumption? Sorry for the delay. Let me figure out some numbers later. > IMO, if those do not > raise huge concerns, we would be able to consider just replacing current free > nid list with this bitmap. Yup, I agree with you. Thanks,