Re: [PATCH 13/16] xfs: reduce the number of AIL push wakeups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 08, 2010 at 06:32:04AM -0500, Christoph Hellwig wrote:
> >  STATIC int
> > @@ -850,8 +853,17 @@ xfsaild(
> >  	long		tout = 0; /* milliseconds */
> >  
> >  	while (!kthread_should_stop()) {
> > -		schedule_timeout_interruptible(tout ?
> > +		/*
> > +		 * for short sleeps indicating congestion, don't allow us to
> > +		 * get woken early. Otherwise all we do is bang on the AIL lock
> > +		 * without making progress.
> > +		 */
> > +		if (tout && tout <= 20) {
> > +			schedule_timeout_uninterruptible(msecs_to_jiffies(tout));
> > +		} else {
> > +			schedule_timeout_interruptible(tout ?
> >  				msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT);
> > +		}
> 
> How about just setting the state ourselves and calling schedule_timeout?
> That seems a lot more readable to me.  Also we can switch to
> TASK_KILLABLE for the short sleeps, just to not introduce any delay
> in shutting down aild when kthread_stop is called.  It would look
> something like this:
> 
> 		if (tout && tout <= 20)
> 			__set_current_state(TASK_KILLABLE);
> 		else
> 			__set_current_state(TASK_UNINTERRUPTIBLE);
> 		schedule_timeout(tout ?
> 				 msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT);

Yes, seems reasonable. I'll convert it to do this.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux