LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tobias Ringstrom <tori@ringstrom.mine.nu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Simon Kirby <sim@netnation.com>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.4.11pre4 swapping out all over the place
Date: Sun, 7 Oct 2001 09:43:10 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.33.0110070906020.30872-100000@boris.prodako.se> (raw)
In-Reply-To: <Pine.LNX.4.33.0110061457570.1454-100000@penguin.transmeta.com>
On Sat, 6 Oct 2001, Linus Torvalds wrote:
>
> Ok, can you try this slightly more involved patch instead? It basically
> keeps the old try_to_free_pages() (it _looks_ different, but the logic is
> the same), but also should honour the OOM-killer.
Yes, this patch also solves the problem.
I just noticed that when reading from an umounted block device, the pages
are not cached between runs, i.e. the cache is dropped on close(). If the
block device contains a mounted filesystem, the pages are not dropped.
Is this intentional?
I was also thinking about Simon's CD-burning case, and the fact that the
used-once logic really does not work very well for such cases. You
usually first run mkisofs to create the image, and then read the image
when writing the CD. This is similar to running
dd if=/dev/zero of=/tmp/cd bs=1M count=300
dd if=/tmp/cd of=/dev/null
In this case, the pages are activated. That is not too bad, since the
system now seems to be able to free even active cache pages before paging
out stuff. (BTW, does it always free all cache before paging out?
That would most likely be very bad for many scenarios.)
So, for the CD-burning case, a used-twice algorithm would probably perform
better. Or perhaps the pages should be activated after having been _read_
more than once, not counting the writes. I wish I had the time to try
this out... :-(
This should only matter if the file is smaller than the amount of
available RAM, which is not too common for CD images.
/Tobias
next prev parent reply other threads:[~2001-10-07 7:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-06 8:06 Simon Kirby
2001-10-06 8:59 ` Tobias Ringstrom
2001-10-06 16:09 ` Linus Torvalds
2001-10-06 17:49 ` Tobias Ringstrom
2001-10-06 21:59 ` Linus Torvalds
2001-10-07 4:59 ` Simon Kirby
2001-10-07 7:43 ` Tobias Ringstrom [this message]
2001-10-07 17:39 ` Linus Torvalds
2001-10-07 17:56 ` Alexander Viro
2001-10-07 4:57 ` David S. Miller
2001-10-06 22:52 ` Andrea Arcangeli
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=Pine.LNX.4.33.0110070906020.30872-100000@boris.prodako.se \
--to=tori@ringstrom.mine.nu \
--cc=linux-kernel@vger.kernel.org \
--cc=sim@netnation.com \
--cc=torvalds@transmeta.com \
--subject='Re: 2.4.11pre4 swapping out all over the place' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).