From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbcJLBO7 (ORCPT ); Tue, 11 Oct 2016 21:14:59 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:59750 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbcJLBOz (ORCPT ); Tue, 11 Oct 2016 21:14:55 -0400 Subject: Re: [PATCH 1/7] f2fs: split free nid list To: Jaegeuk Kim , Chao Yu References: <20161011143136.2107-1-chao@kernel.org> <20161011170902.GA82199@jaegeuk> CC: , From: Chao Yu Message-ID: Date: Wed, 12 Oct 2016 09:14:25 +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: <20161011170902.GA82199@jaegeuk> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jaegeuk, On 2016/10/12 1:09, Jaegeuk Kim wrote: > Hi Chao, > > On Tue, Oct 11, 2016 at 10:31:30PM +0800, Chao Yu wrote: >> From: Chao Yu >> >> During free nid allocation, in order to do preallocation, we will tag free >> nid entry as allocated one and still leave it in free nid list, for other >> allocators who want to grab free nids, it needs to traverse the free nid >> list for lookup. It becomes overhead in scenario of allocating free nid >> intensively by multithreads. >> >> This patch splits free nid list to two list: {free,alloc}_nid_list, to >> keep free nids and preallocated free nids separately, after that, traverse >> latency will be gone. > > How about adding a list array like this? > > enum { > ALLOC_NID_LIST, > FREE_NID_LIST, > MAX_NID_LIST, > }; > > struct list_head nid_list[MAX_NID_LIST]; > > Oh, there is another clean-up patch which defines this enum. > IMO, it'd be good to write one patch including split and clean-up together. OK, let me merge those patches as you reminded. thanks,