From: Nikita Danilov <Nikita@Namesys.COM>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: Matthias Urlichs <smurf@smurf.noris.de>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] 2.6.4-rc2-mm1: vm-split-active-lists
Date: Fri, 12 Mar 2004 18:05:32 +0300 [thread overview]
Message-ID: <16465.53692.106520.847235@laputa.namesys.com> (raw)
In-Reply-To: <4051C5F1.2050605@cyberone.com.au>
Nick Piggin writes:
>
[...]
>
> By the way, I would be interested to know the rationale behind
> mark_page_accessed as it is without this patch, also what is it doing in
> rmap.c (I know hardly anything actually uses page_test_and_clear_young, but
> still). It seems to me like it only serves to make VM behaviour harder to
> understand, but I'm probably missing something. Andrew?
With your patch, once a page got into inactive list, its PG_referenced
bit will only be checked by VM scanner when page wanders to the tail of
list. In particular, if is impossible to tell pages that were accessed
only once while on inactive list from ones that were accessed multiple
times. Original mark_page_accessed() moves page to the active list on
the second access, thus making it less eligible for the reclaim.
I actually tried quite an opposite modification:
(ftp://ftp.namesys.com/pub/misc-patches/unsupported/extra/2004.03.10-2.6.4-rc3/a_1[5678]*)
/* roughly, modulo locking, etc. */
void fastcall mark_page_accessed(struct page *page)
{
if (!PageReferenced(page))
SetPageReferenced(page);
else if (!PageLRU(page))
continue;
else if (!PageActive(page)) {
/* page is on inactive list */
del_page_from_inactive_list(zone, page);
SetPageActive(page);
add_page_to_active_list(zone, page);
inc_page_state(pgactivate);
ClearPageReferenced(page);
} else {
/* page is on active list, move it to head */
list_move(&page->lru, &zone->active_list);
ClearPageReferenced(page);
}
}
That is, referenced and active page is moved to head of the active
list. While somewhat improving file system performance it badly affects
anonymous memory, because (it seems) file system pages tend to push
mapped ones out of active list. Probably it should have better effect
with your split active lists.
>
Nikita.
next prev parent reply other threads:[~2004-03-12 15:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-11 0:04 Nick Piggin
2004-03-11 17:25 ` Marc-Christian Petersen
2004-03-12 9:09 ` Nick Piggin
2004-03-12 9:27 ` Andrew Morton
2004-03-12 9:37 ` Nick Piggin
2004-03-12 11:08 ` Matthias Urlichs
2004-03-12 11:47 ` Jamie Lokier
2004-03-12 12:44 ` Nick Piggin
2004-03-12 14:15 ` Nick Piggin
2004-03-12 15:05 ` Nikita Danilov [this message]
2004-03-12 15:28 ` Nick Piggin
2004-03-12 16:31 ` Nikita Danilov
2004-03-12 23:05 ` Nick Piggin
2004-03-12 19:12 ` Andrew Morton
2004-03-12 23:23 ` Nick Piggin
2004-03-12 19:12 ` Bill Davidsen
2004-03-12 23:50 ` Nick Piggin
2004-03-12 21:46 ` Pavel Machek
2004-03-12 14:18 Mark_H_Johnson
2004-03-12 14:27 ` Nick Piggin
2004-03-12 19:46 ` Jamie Lokier
2004-03-12 15:00 Mark_H_Johnson
2004-03-12 15:13 ` Nick Piggin
2004-03-12 19:35 ` Jamie Lokier
2004-03-12 21:17 ` Mike Fedyk
2004-03-12 22:21 ` Jamie Lokier
2004-03-12 22:36 ` Mike Fedyk
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=16465.53692.106520.847235@laputa.namesys.com \
--to=nikita@namesys.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=piggin@cyberone.com.au \
--cc=smurf@smurf.noris.de \
/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
all inboxes | Powered by JetHome®