Whamcloud - gitweb
LU-7251 osp: do not assign commit callback to every thandle 70/17270/36
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Fri, 19 Oct 2012 14:18:05 +0000 (18:18 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 1 Nov 2017 04:57:26 +0000 (04:57 +0000)
commit0ba690a526be74c4cdffe7a7dd3031b4bd2b37d8
tree5b3e0fee06e7709735f05e1776d5f9708be25128
parente920be6814512b1aa8696ea36d697d3b698c13e8
LU-7251 osp: do not assign commit callback to every thandle

with OSP there is a risk of getting a lot of commit callbacks.
say, 10K unlinks/sec on 4-striped files could result in 4*10K*5
= 200K commit callbacks. this patch implements another schema:
every OSP registers own callback every second. this should result
in 4*5 commit callbacks in the same situation. in case of forced
sync the commit callback is registered unconditionally.

the patch removes th_tags and th_ctx from struct thandle as they
are not used anymore. this elimintates 3 allocations from every
transaction:
(lu_object.c:1714:keys_init()) kmalloced 'ctx->lc_value': 320
(update_records.c:1217:update_key_init()) kmalloced 'value': 408
(osp_dev.c:1807:osp_txn_key_init()) kmalloced 'value': 4

Change-Id: I460d5eccb585b166423d84d5c142af2e27751d8b
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/17270
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
14 files changed:
lustre/include/dt_object.h
lustre/include/lu_object.h
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c
lustre/osp/lproc_osp.c
lustre/osp/osp_dev.c
lustre/osp/osp_internal.h
lustre/osp/osp_precreate.c
lustre/osp/osp_sync.c
lustre/osp/osp_trans.c
lustre/target/update_records.c
lustre/target/update_trans.c
lustre/tests/sanity.sh
lustre/tests/test-framework.sh