The changed sched_yield() semantics have made ext3's transaction
batching terribly slow.
Apparently a schedule() fixes that, although it probably breaks
transaction batching.
This patch largely fixes my complaints about the new scheduler being
extremely sluggish to interactive applications. Evidently those
applications were calling fsync() and were spending extremely long
periods in sched_yield().
* by 30x or more...
*/
if (handle->h_sync) {
+ set_current_state(TASK_RUNNING);
do {
old_handle_count = transaction->t_handle_count;
- yield();
+ schedule();
} while (old_handle_count != transaction->t_handle_count);
}