Skip to content

Commit

Permalink
dlm: replace schedule with cond_resched
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
swhiteho authored and teigland committed Dec 23, 2008
1 parent 1521848 commit d61e9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void process_asts(void)
and may result in the lkb being freed */
dlm_put_lkb(lkb);

schedule();
cond_resched();
}
}

Expand Down

0 comments on commit d61e9aa

Please sign in to comment.