From 9d37c92c58ddee08de275df94b186eb90b36d91f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Aug 2011 11:54:21 -0700 Subject: [PATCH] osd: set suicide timeouts on some workqueues OpWQ: timeout * 10 RecoveryWQ: this does no io; it if stalls we're probably stuck in an infinite loop. timeout * 10. ScrubFinalizeWQ: this is cpu only. we're probably stuck in a loop, or swapping. timeout * 10. Signed-off-by: Sage Weil --- src/osd/OSD.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 2068e7c9cfb..869f5eee023 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -318,7 +318,7 @@ private: struct OpWQ : public ThreadPool::WorkQueue { OSD *osd; OpWQ(OSD *o, time_t ti, ThreadPool *tp) - : ThreadPool::WorkQueue("OSD::OpWQ", ti, 0, tp), osd(o) {} + : ThreadPool::WorkQueue("OSD::OpWQ", ti, ti*10, tp), osd(o) {} bool _enqueue(PG *pg) { pg->get(); @@ -648,7 +648,7 @@ protected: struct RecoveryWQ : public ThreadPool::WorkQueue { OSD *osd; RecoveryWQ(OSD *o, time_t ti, ThreadPool *tp) - : ThreadPool::WorkQueue("OSD::RecoveryWQ", ti, 0, tp), osd(o) {} + : ThreadPool::WorkQueue("OSD::RecoveryWQ", ti, ti*10, tp), osd(o) {} bool _empty() { return osd->recovery_queue.empty(); @@ -827,7 +827,7 @@ protected: public: ScrubFinalizeWQ(OSD *o, time_t ti, ThreadPool *tp) - : ThreadPool::WorkQueue("OSD::ScrubFinalizeWQ", ti, 0, tp), osd(o) {} + : ThreadPool::WorkQueue("OSD::ScrubFinalizeWQ", ti, ti*10, tp), osd(o) {} bool _empty() { return scrub_finalize_queue.empty();