Re: test1-ac22-classzone performance

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Jun 22 2000 - 14:04:16 EST


On Thu, 22 Jun 2000, Andrea Arcangeli wrote:
> On Thu, 22 Jun 2000, Rik van Riel wrote:
>
> >The buffer.c patch below is definately wrong.
> >
> >The reason for that is that the order in which the VM subsystem
> >wants to have buffers flushed can be different than the order in
> >which buffer.c wants to have the buffers flushed.
>
> I'd prefer to reorder the dirty lru than having to stall (using
> WRITEA can be someway effective too). If we stall there we end
> doing the work that should instead belong to the `cp` in
> background. Comments?

Ahh, but we don't have to stall. We just queue some blocks for
asynchronous writeout in shrink_mmap() and after that we kick
bdflush. Then bdflush will 1) try to find some more blocks to
flush and 2) start the disk IO. (with the patch below)

The only bug which kept this from happening was that bdflush
didn't actually start the disk IO so that it queued an infinite
amount of pages for IO and then went to sleep. As a result, the
next process to do a __wait_on_buffer(foo) would have to wait
on a lot of buffers in front of it.

The attached patch seems to fix it. With it I'm seeing higher
performance for a number of things. Presumably (almost certainly)
this is because bdflush now syncs the dirty buffers for us so
we no longer have to wait on disk ourselves.

regards,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies http://www.conectiva.com/ http://www.surriel.com/

--- fs/buffer.c.orig Thu Jun 22 12:16:57 2000 +++ fs/buffer.c Thu Jun 22 12:51:26 2000 @@ -2772,6 +2772,8 @@ flushed = flush_dirty_buffers(0); + if (flushed) + run_task_queue(&tq_disk); /* If wakeup_bdflush will wakeup us after our bdflush_done wakeup, then we must make sure to not sleep

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



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:24 EST