From: Rik van Riel <riel@conectiva.com.br>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linus Torvalds <torvalds@transmeta.com>,
linux-mm@kvack.org, los@lsdb.bwl.uni-mannheim.de
Subject: Re: [PATCH] -ac21 don't set referenced bit
Date: Mon, 19 Jun 2000 14:00:20 -0300 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.21.0006191359160.13200-100000@duckman.distro.conectiva> (raw)
In-Reply-To: <Pine.LNX.4.21.0006191819560.5562-100000@inspiron.random>
On Mon, 19 Jun 2000, Andrea Arcangeli wrote:
> On Mon, 19 Jun 2000, Rik van Riel wrote:
>
> >the patch below, against -ac21, does two things:
> >
> >1) do not set the referenced bit when we add a page to
> > one of the caches ... this allows us to distinguish
>
> Glad to see you agreed with that. You forgot the buffer cache, hint from:
No I didn't ... ;)
> @@ -2338,7 +2362,8 @@
> spin_unlock(&free_list[isize].lock);
>
> page->buffers = bh;
> - lru_cache_add(page);
> + page->flags &= ~(1 << PG_referenced);
> + lru_cache_add(page, LRU_NORMAL_CACHE);
> atomic_inc(&buffermem_pages);
> return 1;
>From include/linux/swap.h:
#define lru_cache_add(page) \
do { \
spin_lock(&pagemap_lru_lock); \
list_add(&(page)->lru, &lru_cache); \
nr_lru_pages++; \
page->age = PG_AGE_START; \
ClearPageReferenced(page); \
SetPageActive(page); \
spin_unlock(&pagemap_lru_lock); \
} while (0)
We've had this for a number of kernel versions now...
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/
next prev parent reply other threads:[~2000-06-19 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-19 15:36 Rik van Riel
2000-06-19 16:22 ` Andrea Arcangeli
2000-06-19 17:00 ` Rik van Riel [this message]
2000-06-19 17:10 ` Andrea Arcangeli
2000-06-19 17:51 ` Rik van Riel
2000-06-19 18:06 ` 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.21.0006191359160.13200-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=linux-mm@kvack.org \
--cc=los@lsdb.bwl.uni-mannheim.de \
--cc=torvalds@transmeta.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