From 9c3098c8667241d18d2551a9a37ce7fbce396b71 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 17 Jun 2006 15:23:50 +0000 Subject: I/O priority support with cfq scheduler (needs new kernel patch) --- lib/components/file_eraser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/components') diff --git a/lib/components/file_eraser.cpp b/lib/components/file_eraser.cpp index 6cacf045..ea68eb44 100644 --- a/lib/components/file_eraser.cpp +++ b/lib/components/file_eraser.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -33,9 +34,15 @@ eBackgroundFileEraser::~eBackgroundFileEraser() void eBackgroundFileEraser::thread() { hasStarted(); + nice(5); + + setIoPrio(IOPRIO_CLASS_BE, 7); + reset(); + runLoop(); + stop_thread_timer.stop(); } @@ -68,7 +75,7 @@ void eBackgroundFileEraser::gotMessage(const Message &msg ) eDebug("file %s erased", msg.filename); free((char*)msg.filename); } - stop_thread_timer.start(2000, true); // stop thread in two seconds + stop_thread_timer.start(1000, true); // stop thread in one seconds break; case Message::quit: quit(0); -- cgit v1.2.3