lkml.org 
[lkml]   [2004]   [Mar]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CONFIG_PREEMPT and server workloads
FromChris Mason <>
DateThu, 18 Mar 2004 17:54:55 -0500
On Thu, 2004-03-18 at 17:32, Andrew Morton wrote:
> Takashi Iwai <tiwai@suse.de> wrote:
> >
> > --- linux-2.6.4-8/fs/jbd/commit.c-dist	2004-03-16 23:00:40.000000000 +0100
> > +++ linux-2.6.4-8/fs/jbd/commit.c	2004-03-18 02:42:41.043448624 +0100
> > @@ -290,6 +290,9 @@ write_out_data_locked:
> >  			commit_transaction->t_sync_datalist = jh;
> >  			break;
> >  		}
> > +
> > +		if (need_resched())
> > +			break;
> >  	} while (jh != last_jh);
> > 
> >  	if (bufs || need_resched()) {
> 
> Yup, this has problems.
> 
> What we're doing here is walking (under spinlock) a ring of buffers
> searching for unlocked dirty ones to write out.
> 
> Suppose the ring has thousands of locked buffers and there is a RT task
> scheduling at 1kHz.  Each time need_resched() comes true we break out of
> the search, schedule away and then restart the search from the beginning.
> 
Why not just put all the locked buffers onto a different list as you
find them or lock them.  That way you can always make progress...

-chris


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [from the cache]
©2003-2008