Re: 2.2.8_andrea1.bz2

Andrea Arcangeli (andrea@e-mind.com)
Thu, 13 May 1999 14:57:35 +0200 (CEST)


On Thu, 13 May 1999, Zack Weinberg wrote:

>One of the design goals was to eliminate the need for the user-space
>update process. It simply calls bdflush(1, 0) every five seconds,

Why to eliminate `update'? `update' is _not_ needed just now. It can
_only_ harm performances.

The _only_ reasons you want `update' is in the hope to not get fs
corruption if your machine crash with the fs mounted.

>which (in 2.2.7) would do almost the same thing as what kflushd does
>when awakened by wakeup_bdflush. There is no particular reason why

In 2.2.x (and maybe in 2.0.x) the flushtime handling make not a lot of
sense (it's not buggy but it's extremely inefficient). I fixed it in my
tree. So maybe it may looks like that update is doing something like
kflushd.

The difference you missed between sync_old_buffers and kflushd was the
check between bh->flushtime and jiffles. And it make a _lot_ of
difference (at least with flushtime redesigned).

>kflushd can't wake up every five seconds itself. Does it make more
>sense now?

The whole point is that update was running every 5 sec for completly
different reasons. Sure not to decrease the size of dirty buffers (the
only object of kflushd). It was running _only_ in the hope to not get
massive fs corruption after a crash.

If you are sure you won't crash, then you can kill update and you'll run
faster.

>Killing flushtime was an accident. I erroneously thought the inner

Ok ;).

>It is my personal opinion - and at least one other person concurs -
>that there should be a hard limit on the length of time before any
>dirty buffer is flushed back to disk. flushtime is a rational way to
>achieve that. You casually brush off filesystem integrity (also

I agree too.

>I've sent the appended patch to Linus already; it addresses what I
>think are the bugs in the 2.2.8 bdflush. I'd be interested to hear
>what you think of it.

While it fixes the flushtime issue fine, I think it's still wrong. You
don't want to wait to flush all "old" dirty buffers if you are sleeping in
mark_dirty_buffers(). If you are waiting for kflushd completation in
mark_dirty_buffers() it means you want to write to disk only the buffer
you need to take the system stable. You want to go ahead ASAP. Do you see
my point?

But really I could take your way here. Here I don't wait for bdflush
completation in mark_dirty_buffers(). Then I should kill `update` (btw in
2.2.8 everybody should kill update). I am not convinced is a big issue
though (I think it would save only some kbyte of memory).

If you want to look at my current tree (and if you want you can send me a
patch against my tree to take your "interval" way and to kill update) grab
my latest patch here:

ftp://e-mind.com/pub/andrea/kernel/2.2.8_andrea1.bz2

Andrea Arcangeli

-
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/