Btrfs: Clear the device->running_pending flag before bailing on congestion

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, January 16, 2009 - 11:59 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d9e2a...
Commit:     1d9e2ae949411c2f329f30e01ea0355cd02c4296
Parent:     e293e97e363e419d8a3628a927321e3f75206a0b
Author:     Chris Mason <chris.mason@oracle.com>
AuthorDate: Fri Jan 16 11:58:19 2009 -0500
Committer:  Chris Mason <chris.mason@oracle.com>
CommitDate: Fri Jan 16 11:58:19 2009 -0500

    Btrfs: Clear the device->running_pending flag before bailing on congestion
    
    Btrfs maintains a queue of async bio submissions so the checksumming
    threads don't have to wait on get_request_wait.  In order to avoid
    extra wakeups, this code has a running_pending flag that is used
    to tell new submissions they don't need to wake the thread.
    
    When the threads notice congestion on a single device, they
    may decide to requeue the job and move on to other devices.  This
    makes sure the running_pending flag is cleared before the
    job is requeued.
    
    It should help avoid IO stalls by making sure the task is woken up
    when new submissions come in.
    
    Signed-off-by: Chris Mason <chris.mason@oracle.com>
---
 fs/btrfs/volumes.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index b187b53..3451e1c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -220,6 +220,7 @@ loop:
 				tail->bi_next = old_head;
 			else
 				device->pending_bio_tail = tail;
+			device->running_pending = 0;
 
 			spin_unlock(&device->io_lock);
 			btrfs_requeue_work(&device->work);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Btrfs: Clear the device->running_pending flag before baili ..., Linux Kernel Mailing ..., (Fri Jan 16, 11:59 am)