From: Igor Fedotov Date: Mon, 5 Aug 2019 14:25:25 +0000 (+0300) Subject: osd: do not check ContextQueue for empty before taking the content. X-Git-Tag: v15.1.0~1919^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ececd98bc9af3af9f2282ae8afc5832063d13c3;p=ceph.git osd: do not check ContextQueue for empty before taking the content. This saves one lock acquisition. And empty() call is useless as move_to checks for emptyness anyway() Signed-off-by: Igor Fedotov --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 052768b672f6..5988c2826060 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10493,7 +10493,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) } list oncommits; - if (is_smallest_thread_index && !sdata->context_queue.empty()) { + if (is_smallest_thread_index) { sdata->context_queue.move_to(oncommits); }