From: "Stephen C. Tweedie" <sct@redhat.com>
To: Larry McVoy <lm@bitmover.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>,
"Eric W. Biederman" <ebiederm+eric@npwt.net>,
Christoph Rohland <hans-christoph.rohland@sap-ag.de>,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: Thread implementations...
Date: Wed, 1 Jul 1998 09:50:57 +0100 [thread overview]
Message-ID: <199807010850.JAA00764@dax.dcs.ed.ac.uk> (raw)
In-Reply-To: <199806301930.MAA09098@bitmover.com>
Hi,
On Tue, 30 Jun 1998 12:30:45 -0700, lm@bitmover.com (Larry McVoy)
said:
> if ((free_memory < we_will_start_paging_soon) &&
> (offset is clust_size multiple) &&
> (offset > small_file) &&
> (access is sequential)) {
> free_behind(vp, offset - clust_size, clust_size);
> }
Looks entirely reasonable. I've been thinking of something very
similar but just a little more complex, so that we can also cleanly
handle the case of sequential mmap()ed reads, both of mapped files and
potentially of anonymous datasets. The difference there is that if we
are dealing with tiled data, then we may need to allow a larger window
between the current pagein cursor and the forget-behind cursor.
Again, if we just unmap the pages and place them on a high-priority
reuse queue, then getting the guess wrong just results in a minor
fault unless we do actually reuse the memory before accessing the data
again.
> 1) it was nice that I/O took care of itself. The pageout daemon is
> pretty costly (Stephen, we talked about this at Linux Expo - this
> is why I want a pageout daemon that works on files, not on pages).
Yes, and Ingo and I have been talking about ways of doing it.
> 2) Small files aren't worth the trouble and aren't the cause of the
> trouble.
Small files benefit from a similar scheme. For small
sequentially-accessed files, as they age, we want to remove the entire
file from cache at once. Repopulating a sequential file's fragmented
cache is expensive anyway, so it may in fact be _cheaper_ to do this
than to just throw out one page at a time.
As long as we have the concept of a virtual extent, where we define
that extent as the natural readahead pattern for the workload, then we
want to uncache the same units we readahead. That's normally
sequential clusters, but if we have things like Ingo's random swap
stats-based prediction logic, then we can use exactly the same extent
concept there too.
--Stephen
next prev parent reply other threads:[~1998-07-01 9:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-30 19:30 Larry McVoy
1998-07-01 8:50 ` Stephen C. Tweedie [this message]
1998-07-03 15:21 ` Rik van Riel
1998-07-03 20:05 ` Stephen C. Tweedie
1998-07-03 20:36 ` Rik van Riel
1998-07-04 16:37 ` Stephen C. Tweedie
[not found] <199806240915.TAA09504@vindaloo.atnf.CSIRO.AU>
[not found] ` <Pine.LNX.3.96dg4.980624025515.26983E-100000@twinlark.arctic.org>
[not found] ` <199806241213.WAA10661@vindaloo.atnf.CSIRO.AU>
1998-06-24 22:00 ` Eric W. Biederman
1998-06-24 23:41 ` Richard Gooch
1998-06-25 4:45 ` Eric W. Biederman
1998-06-25 17:14 ` Todd Larason
1998-06-26 7:53 ` Christoph Rohland
1998-06-26 14:16 ` Eric W. Biederman
1998-06-29 10:19 ` Stephen C. Tweedie
1998-06-30 6:19 ` Eric W. Biederman
1998-06-30 13:10 ` Stephen C. Tweedie
1998-06-30 19:35 ` Dean Gaudet
1998-07-01 9:09 ` Stephen C. Tweedie
1998-06-25 4:12 ` Dean Gaudet
1998-06-25 3:53 ` Richard Gooch
1998-06-25 11:32 ` Stephen C. Tweedie
1998-06-25 21:24 ` Chris Wedgwood
1998-06-25 22:16 ` Richard Gooch
1998-06-25 4:56 ` Eric W. Biederman
1998-06-25 11:35 ` Stephen C. Tweedie
1998-06-25 20:31 ` Dean Gaudet
1998-06-30 6:40 ` Eric W. Biederman
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=199807010850.JAA00764@dax.dcs.ed.ac.uk \
--to=sct@redhat.com \
--cc=ebiederm+eric@npwt.net \
--cc=hans-christoph.rohland@sap-ag.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=lm@bitmover.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