From d1cf3fb80bce50a13da0fd45dba65248cbe38383 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Tue, 21 Apr 2020 08:44:53 +0800 Subject: [PATCH] osd/OSD: wakeup all threads of shard. In our test(4NVME), we found for 4K randread(8/16 mean shard, 2/1 mean thread_per_shard): QD 8_2(IOPS(k)) 16_1(IOPS(K)) 8_2(apply patch) 32 191 263 263.5 Signed-off-by: Jianpeng Ma --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 133ebb984b257..23e918a73c868 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10728,7 +10728,7 @@ void OSD::ShardedOpWQ::_enqueue(OpSchedulerItem&& item) { if (empty) { std::lock_guard l{sdata->sdata_wait_lock}; - sdata->sdata_cond.notify_one(); + sdata->sdata_cond.notify_all(); } }