Re: [PATCH] 498+ days uptime

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
27 Aug 1998 14:21:35 +0200


Bernhard Heidegger <bheide@hyperwave.com> writes:

> >>>>> ">" == Zlatko Calusic <Zlatko.Calusic@CARNet.hr> writes:
>
> >> "H. Peter Anvin" <hpa@transmeta.com> writes:
> >> >
> >> > bdflush yes, but update is not obsolete.
> >> >
> >> > It is still needed if you want to make sure data (and metadata)
> >> > eventually gets written to disk.
> >> >
> >> > Of course, you can run without update, but then don't bother if you
> >> > lose file in system crash, even if you edited it and saved it few
> >> > hours ago. :)
> >> >
> >> > Update is very important if you have lots of RAM in your computer.
> >> >
> >>
> >> Oh. I guess my next question then is "why", as why can't this be done
> >> by kflushd as well?
> >>
>
> >> To tell you the truth, I'm not sure why, these days.
>
> >> I thought it was done this way (update running in userspace) so to
> >> have control how often buffers get flushed. But, I believe bdflush
> >> program had this functionality, and it is long gone (as you correctly
> >> noticed).
>
> IMHO, update/bdflush (in user space) calls sys_bdflush regularly. This
> function (fs/buffer.c) calls sync_old_buffers() which itself sync_supers
> and sync_inodes before it goes through the dirty buffer lust (to write
> some dirty buffers); the kflushd only writes some dirty buffers dependent
> on the sysctl parameters.
> If I'm wrong, please feel free to correct me!
>

You are not wrong.

Update flushes metadata blocks every 5 seconds, and data block every
30 seconds.

Questions is why can't this functionality be integrated in the kernel,
so we don't have to run yet another daemon?

As parameters are easy controllable with sysctl interface, I don't see
a reason why is update still needed. Or is it not?

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
	There is an exception to every rule, except this one.

- 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.altern.org/andrebalsa/doc/lkml-faq.html