]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remove the sched_yield from the ext3 fsync path
authorAndrew Morton <akpm@digeo.com>
Thu, 10 Oct 2002 04:05:33 +0000 (21:05 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 10 Oct 2002 04:05:33 +0000 (21:05 -0700)
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().

fs/jbd/transaction.c

index 860b2685ebd682d0016993334321ff561d8a9dd5..734b561ae826c602ffe377846d08a5999245133d 100644 (file)
@@ -1434,9 +1434,10 @@ int journal_stop(handle_t *handle)
         * 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);
        }