From: Chao Yu Date: Thu, 18 Dec 2014 09:37:21 +0000 (+0800) Subject: f2fs: merge two uchar variable in struct node_info to reduce memory cost X-Git-Tag: fixes-v4.0-rc1~114^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c27f4ee447b4ef1cd88d5313eeb838c56265571;p=pandora-kernel.git f2fs: merge two uchar variable in struct node_info to reduce memory cost This patch moves one member of struct nat_entry: _flag_ to struct node_info, so _version_ in struct node_info and _flag_ which are unsigned char type will merge to one 32-bit space in register/memory. So the size of nat_entry will be reduced from 28 bytes to 24 bytes (for 64-bit machine, reduce its size from 40 bytes to 32 bytes) and then slab memory using by f2fs will be reduced. changes from v2: o update description of memory usage gain for 64-bit machine suggested by Changman Lee. changes from v1: o introduce inline copy_node_info() to copy valid data from node info suggested by Jaegeuk Kim, it can avoid bug. Reviewed-by: Changman Lee Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed