Re: scheduling problem?

Andrea Arcangeli (andrea@suse.de)
Tue, 2 Jan 2001 21:09:49 +0100


On Tue, Jan 02, 2001 at 11:02:41AM -0800, Linus Torvalds wrote:
> What does the system feel like if you just change the "sleep for bdflush"
> logic in wakeup_bdflush() to something like
>
> wake_up_process(bdflush_tsk);
> __set_current_state(TASK_RUNNING);
> current->policy |= SCHED_YIELD;
> schedule();
>
> instead of trying to wait for bdflush to wake us up?

My bet is a `VM: killing' message.

Waiting bdflush back-wakeup is mandatory to do write throttling correctly. The
above will break write throttling at least unless something foundamental is
changed recently and that doesn't seem the case.

What I like to do there is to just make bdflush the same thing that kswapd
_should_ (I said "should" because it seems it's not the case anymore in 2.4.x
from some email I read recently, I didn't checked that myself yet) be for
memory pressure (I implemented that at some point in my private local tree). I
mean: bdflush only does the async writeouts and the task context calls
something like flush_dirty_buffers itself. The main reason I was doing that is
to fix the case of >bdf_prm.ndirty tasks all waiting on bdflush at the same
time (that will break write throttling even now in 2.2.x and in current 2.4.x).
That's an unlukcy condition very similar to the one in GFP that is fixed
correctly in 2.2.19pre2 putting pages in a per-process freelist during memory
balancing.

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