From: ZhenyuLeng Date: Sat, 23 Apr 2016 10:45:55 +0000 (+0800) Subject: The function op_is_discardable introduces lock overhead which can X-Git-Tag: v11.0.0~540^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8717%2Fhead;p=ceph.git The function op_is_discardable introduces lock overhead which can The function op_is_discardable introduces lock overhead which can not be ignored.It would be better to judge if to discard op when the connection disconnected as a parameter whether the network is believable or extremely unlikelihood. add g_conf osd_discard_disconnected_ops to control whether to discard op when the connection disconnected Waiting for test Signed-off-by: ZhenyuLeng --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index e018f1e3ebc3..c7dba32cd323 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -892,6 +892,8 @@ OPTION(osd_bench_large_size_max_throughput, OPT_U64, 100 << 20) // 100 MB/s OPTION(osd_bench_max_block_size, OPT_U64, 64 << 20) // cap the block size at 64MB OPTION(osd_bench_duration, OPT_U32, 30) // duration of 'osd bench', capped at 30s to avoid triggering timeouts +OPTION(osd_discard_disconnected_ops, OPT_BOOL, true) + OPTION(memstore_device_bytes, OPT_U64, 1024*1024*1024) OPTION(memstore_page_set, OPT_BOOL, true) OPTION(memstore_page_size, OPT_U64, 64 << 10) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c2dfabd66a8b..fa6b8375bba6 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5257,8 +5257,7 @@ ostream& operator<<(ostream& out, const PG& pg) bool PG::can_discard_op(OpRequestRef& op) { MOSDOp *m = static_cast(op->get_req()); - - if (OSD::op_is_discardable(m)) { + if (g_conf->osd_discard_disconnected_ops && OSD::op_is_discardable(m)) { dout(20) << " discard " << *m << dendl; return true; }