Re: [PATCH 1/7] f2fs: split free nid list

From: Chao Yu
Date: Tue Oct 11 2016 - 21:15:02 EST

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 <yuchao0@xxxxxxxxxx>
>> 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 {
> };
> 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.