Whamcloud - gitweb
LU-13134 osc: re-declare ops_from/to to shrink osc_page 87/37487/8
authorWang Shilong <wshilong@ddn.com>
Sat, 8 Feb 2020 11:41:46 +0000 (19:41 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 4 Jul 2020 03:04:05 +0000 (03:04 +0000)
commit9821754235e2417868dbaeb987b33e22c517346f
tree502cc961709b8d1390546ddde1d027f6fff7885b
parent5fb29cd1e77ca7bee34791138b49f5dd50d5116b
LU-13134 osc: re-declare ops_from/to to shrink osc_page

@ops_from and @ops_to is within PAGE_SIZE, use PAGE_SHIFT
bits to limit it is fine, on x86_64 platform, this patch
will reduce another 8 bytes.

Notice, previous @ops_to is exclusive which could be PAGE_SIZE,
this patch change it to inclusive which means max value will be
PAGE_SIZE - 1, and be careful to calculate its length.

After this patch, cl_page size could reduce from 320 to 312 bytes,
and we are able to allocate 13 objects using slab pool for 4K page.

Change-Id: Ic260c0a6580292301b5397276042e399c0f07e11
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37487
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_osc.h
lustre/osc/osc_cache.c
lustre/osc/osc_page.c