From: Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: "H. Peter Anvin" <hpa@transmeta.com>,
Linux Kernel List <linux-kernel@vger.rutgers.edu>,
Linux-MM List <linux-mm@kvack.org>
Subject: Re: [PATCH] 498+ days uptime
Date: 29 Aug 1998 00:16:34 +0200 [thread overview]
Message-ID: <87ogt4hhvh.fsf@atlas.CARNet.hr> (raw)
In-Reply-To: "Stephen C. Tweedie"'s message of "Fri, 28 Aug 1998 10:35:36 +0100"
"Stephen C. Tweedie" <sct@redhat.com> writes:
> Hi,
>
> On 27 Aug 1998 00:49:55 +0200, Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
> said:
>
> > 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).
>
> update(8) _is_ the old bdflush program. :)
I know. But in that old days, I believe, we had two daemons, update
AND bdflush. They were started from the same binary, but their
functionality was different.
Too bad 1.2.13 can't be compiled in todays setups. :)
>
> There are two entirely separate jobs being done. One is to flush all
> buffers which are beyond their dirty timelimit: that job is done by the
> bdflush syscall called by update/bdflush every 5 seconds. The second
> job is to trickle back some dirty buffers to disk if we are getting
> short of clean buffer space in memory.
>
> These are completely different jobs. They select which buffers and how
> many buffers to write based on different criteria, and they are woken up
> by different events. That's why we have two daemons. The fact that one
> spends its wait time in user mode and one spends its time in kernel mode
> is irrelevant; even if they were both kernel threads we'd still have two
> separate jobs needing done.
Right, I agree entirely.
Maybe I should reformulate my question. :)
Why is the former in the userspace?
I believe it is not that hard to code bdflush in the kernel, where we
lose nothing, but save few pages of memory. One less process to run,
as I already pointed out.
You probably did have an opportunity to visit Paul Gortmaker's page,
helpful for those with low memory machines. There you can find "few
lines of assembly" program that replaces update. I ran that program
for few years to save few kilobytes of memory on my old 386 / 5MB RAM.
>
> > I'm crossposting this mail to linux-mm where some clever MM people can
> > be found. Hopefully we can get an explanation why do we still need
> > update.
>
> Because kflushd does not do the job which update needs to do. It does a
> different job.
>
Yep, but allow me one more question, please.
If I happen to get some free time (very unlikely) to code bdflush
completely in the kernel, so we can get rid of update, now running as
daemon, would you consider it for inclusion in the official kernel
(sending patches to Linus, etc..)?
--
Posted by Zlatko Calusic E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
It's bad luck to be superstitious.
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-08-28 22:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199808262153.OAA13651@cesium.transmeta.com>
1998-08-26 22:49 ` Zlatko Calusic
1998-08-27 12:07 ` Bernhard Heidegger
1998-08-27 12:21 ` Zlatko Calusic
1998-08-27 12:43 ` Bernhard Heidegger
1998-08-28 1:03 ` Eric W. Biederman
1998-08-28 9:09 ` Bernhard Heidegger
1998-08-28 13:14 ` Eric W. Biederman
1998-08-28 16:03 ` Bernhard Heidegger
1998-08-28 22:03 ` Zlatko Calusic
1998-08-31 8:32 ` Bernhard Heidegger
1998-08-28 21:47 ` Zlatko Calusic
1998-08-28 21:36 ` Zlatko Calusic
1998-08-28 21:32 ` Zlatko Calusic
1998-08-28 9:35 ` Stephen C. Tweedie
1998-08-28 22:16 ` Zlatko Calusic [this message]
1998-08-30 15:10 ` Stephen C. Tweedie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ogt4hhvh.fsf@atlas.CARNet.hr \
--to=zlatko.calusic@carnet.hr \
--cc=hpa@transmeta.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox