Whamcloud - gitweb
LU-7251 osp: do not assign commit callback to every thandle 79/29879/12
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Fri, 19 Oct 2012 14:18:05 +0000 (18:18 +0400)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 12 Apr 2018 15:06:15 +0000 (15:06 +0000)
commit236f73509cdcc83cdb56cdea376ff4a4e7f378c7
treeea44102b6bf4910c5c9b061e3f6cc746bdd4743f
parentebaeb217ed12181a02c833354c15c68ddee21e23
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

Lustre-change: https://review.whamcloud.com/17270
Lustre-commit: 0ba690a526be74c4cdffe7a7dd3031b4bd2b37d8

Change-Id: I460d5eccb585b166423d84d5c142af2e27751d8b
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29879
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@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