Skip to contentSkip to conversation

dlm: replace schedule with cond_resched

PATCH New David Teigland 1 participant 1 message Dec 23, 2008 Distributed lock manager (DLM)

lore
Share & tools
lore

David Teigland

author maintainer
#0 lore raw

PATCH 4/10 dlm: replace schedule with cond_resched

From: Steven Whitehouse <[email protected]>

This is a one-liner to use cond_resched() rather than schedule() in the ast delivery loop. It should not be necessary to schedule every time, so this will save some cpu time while continuing to allow scheduling when required.

---
 fs/dlm/ast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/dlm/ast.c +1 -1
index 8bf31e3..30c11f3 100644
@@ -101,7 +101,7 @@ static void process_asts(void)
 		   and may result in the lkb being freed */
 		dlm_put_lkb(lkb);
 
-		schedule();
+		cond_resched();
 	}
 }
 
Signature · 1 line
1.5.5.1