From: Matt Dillon <dillon@earth.backplane.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Charles Randall <crandall@matchlogic.com>,
Roger Larsson <roger.larsson@norran.net>,
arch@FreeBSD.ORG, linux-mm@kvack.org, sfkaplan@cs.amherst.edu
Subject: Re: RE: on load control / process swapping
Date: Wed, 16 May 2001 10:54:12 -0700 (PDT) [thread overview]
Message-ID: <200105161754.f4GHsCd73025@earth.backplane.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0105161439140.18102-100000@duckman.distro.conectiva>
It's not dropping the data, it's dropping the priority. And yes, it
does penalize the data somewhat. On the otherhand if the data happens
to still be in the cache and you scan it a second time, the page priority
gets bumped up relative to what it already was so the net effect is
that the data becomes high priority after a few passes.
:Maybe it would be better to only do drop-behind when we're
:actually allocating new memory for the vnode in question and
:let re-use of already present memory go "unpunished" ?
You get an equivalent effect even without dropping the priority,
because you blow away prior pages when reading a file that is
larger then main memory so they don't exist at all when you re-read.
But you do not get the expected 'recycling' characteristics verses
the rest of the system if you do not make a distinction between
sequential and random access. You want to slightly depress the priority
behind a sequential access because the 'cost' of re-reading the disk
sequentially is nothing compared to the cost of re-reading the disk
randomly (by about a 30:1 ratio!). So keeping randomly seek/read data
is more important by degrees then keeping sequentially read data.
This isn't to say that it isn't important to try to cache sequentially
read data, just that the cost of throwing away sequentially read data
is much lower then the cost of throwing away randomly read data on
a general purpose machine.
Terry's description of 'ld' mmap()ing and doing all sorts of random
seeking causing most UNIXes, including FreeBSD, to have a brainfart of
the dataset is too big to fit in the cache is true as far as it goes,
but there really isn't much we can do about that situation
'automatically'. Without hints, the system can't predict the fact that
it should be trying to cache the whole of the object files being accessed
randomly. A hint could make performance much better... a simple
madvise(... MADV_SEQUENTIAL) on the mapped memory inside LD would
probably be beneficial, as would madvise(... MADV_WILLNEED).
-Matt
:Hmmm, now that I think about this more, it _could_ introduce
:some different fairness issues. Darn ;)
:
:regards,
:
:Rik
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2001-05-16 17:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-16 15:17 Charles Randall
2001-05-16 17:14 ` Matt Dillon
2001-05-16 17:41 ` Rik van Riel
2001-05-16 17:54 ` Matt Dillon [this message]
2001-05-16 19:59 ` Rik van Riel
2001-05-16 20:41 ` Matt Dillon
2001-05-18 5:58 ` Terry Lambert
2001-05-18 6:20 ` Matt Dillon
2001-05-18 10:00 ` Andrew Reilly
2001-05-18 13:49 ` Jonathan Morton
2001-05-19 2:18 ` Rik van Riel
2001-05-19 2:56 ` Jonathan Morton
2001-05-16 17:57 ` Alfred Perlstein
2001-05-16 18:01 ` Matt Dillon
2001-05-16 18:10 ` Alfred Perlstein
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=200105161754.f4GHsCd73025@earth.backplane.com \
--to=dillon@earth.backplane.com \
--cc=arch@FreeBSD.ORG \
--cc=crandall@matchlogic.com \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
--cc=roger.larsson@norran.net \
--cc=sfkaplan@cs.amherst.edu \
/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