From: Rik van Riel <riel@conectiva.com.br>
To: Roger Larsson <roger.larsson@norran.net>
Cc: linux-mm@kvack.org
Subject: Re: [patch] page aging and deferred swapping for 2.4.0-test1
Date: Fri, 26 May 2000 12:16:32 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0005261213370.26570-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <392E916F.E102551D@norran.net>
On Fri, 26 May 2000, Roger Larsson wrote:
> Shouldn't lru_cache_add in swap.h initialize age?
It doesn't particularly matter where that is done, but I guess
lru_cache_add is a good place for it when you take readability
into account.
> > --- linux-2.4.0-test1/mm/page_alloc.c.orig Thu May 25 12:27:47 2000
> > +++ linux-2.4.0-test1/mm/page_alloc.c Thu May 25 18:37:44 2000
> > @@ -94,6 +94,8 @@
> > if (PageDecrAfter(page))
> > BUG();
> >
> > + page->age = 2;
> > +
>
> hmm...
> If this is a page that has beed used much, isn't it penalized to
> much, and don't we loose information...??? (all fread pages are the
> same)
You may want to read the code to see what __free_pages_ok
is actually used for.
> and in try_to_swap_out (mm/vmscan.c) we could change to
> /* Don't look at this pte if it's been accessed recently. */
> if (pte_young(pte)) {
> /*
> * Transfer the "accessed" bit from the page
> * tables to the global page map.
> */
> set_pte(page_table, pte_mkold(pte));
> page->age += 3;
> goto out_failed;
> }
This is dead wrong. Suppose the page isn't in the lru queue ...
its age would get upped to infinite values.
Also, if a page is shared between multiple ptes, we don't want
to mess with its age at scanning all ptes. We are using the
PG_referenced bit exactly to avoid this bug.
regards,
Rik
--
The Internet is not a network of computers. It is a network
of people. That is its real strength.
Wanna talk about the kernel? irc.openprojects.net / #kernelnewbies
http://www.conectiva.com/ http://www.surriel.com/
--
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/
prev parent reply other threads:[~2000-05-26 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-25 23:03 Rik van Riel
2000-05-25 23:48 ` Neil Schemenauer
2000-05-26 13:32 ` Roger Larsson
2000-05-26 13:41 ` Rik van Riel
2000-05-26 14:59 ` Roger Larsson
2000-05-26 15:16 ` Rik van Riel [this message]
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.21.0005261213370.26570-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=linux-mm@kvack.org \
--cc=roger.larsson@norran.net \
/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