[Btrfs-devel] [PATCH] delay commit if work is done while we're
	asleep
    Chris Mason 
    chris.mason at oracle.com
       
    Thu Aug  9 08:20:51 PDT 2007
    
    
  
On Thu, 9 Aug 2007 11:07:39 -0400
Josef Bacik <jwhiter at redhat.com> wrote:
> Hello,
> 
> Ok this one works I promise :).  Cleaned a few things up and such,
> but basically same idea as before, I keep the waitqueue, I use
> schedule_timeout which keeps us from deadlocking.  This speeds us up
> a decent amount, without the patch I usually get 70-75 files/sec.
> With this patch I get between 85-115 files/sec. The reason there is
> such a wide spread depends mostly on when the transaction cleaner
> runs while I'm running the test, as this is only single threaded.
> Feedback is appreciated.  Thank you,
It looks great to me, thanks for working on this.  One change I'll
probably make here is to do something like this:
prepare_to_wait
if (trans->transaction->num_writers > 1)
    timeout = MAX_SCHEDULE_TIMEOUT
else
    timeout = 1
drop locks
schedule_timeout(timeout);
This way we don't loop in schedule when there are writers around who
will wake us.  I'll give it a try this afternoon.
-chris
    
    
More information about the Btrfs-devel
mailing list