From: Nikita Danilov <Nikita@Namesys.COM>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: Andrew Morton <akpm@osdl.org>, linux-mm@kvack.org
Subject: Re: [BENCHMARKS] Namesys VM patches improve kbuild
Date: Fri, 23 Jan 2004 13:29:39 +0300 [thread overview]
Message-ID: <16400.63379.453282.283117@laputa.namesys.com> (raw)
In-Reply-To: <40105633.4000800@cyberone.com.au>
Nick Piggin writes:
>
[...]
>
> But those cold mapped pages are basically ignored until the
> reclaim_mapped threshold, however they do continue to have their
> referenced bits cleared - hence page_referenced check should
> become a better estimation when reclaim_mapped is reached, right?
Right.
By the way here lies another problem: refill_inactive_zone() never
removes referenced mapped page from the active list. Which allows for
the simple DoS:
----oomme.c-----------------------------------------------------------
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char **argv)
{
unsigned long memuse;
char *base;
char *scan;
int shift;
int i;
memuse = strtoul(argv[1], NULL, 0);
shift = getpagesize();
base = malloc(memuse);
if (base == NULL) {
perror("malloc");
exit(1);
}
for (i = 0;; ++i) {
for (scan = base; scan < base + memuse; scan += shift)
*scan += i;
printf("%i\n", i);
}
}
----oomme.c-----------------------------------------------------------
This program will re-reference allocated pages much faster than VM
scanner(s) will be able to analyze and clear their reference bits. In
effect it mlocks memory.
>
>
Nikita.
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-01-23 10:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-22 5:43 Nick Piggin
2004-01-22 6:36 ` Andrew Morton
2004-01-22 6:54 ` Nick Piggin
2004-01-22 7:04 ` Andrew Morton
2004-01-22 7:19 ` Nick Piggin
2004-01-22 8:16 ` William Lee Irwin III
2004-01-22 23:32 ` Nick Piggin
2004-01-22 10:35 ` Nikita Danilov
2004-01-22 23:01 ` Nick Piggin
2004-01-23 10:29 ` Nikita Danilov [this message]
2004-01-23 12:28 ` Nick Piggin
2004-01-23 15:09 ` Nick Piggin
2004-01-23 15:40 ` Nikita Danilov
2004-01-24 1:07 ` Nick Piggin
2004-01-26 11:19 ` Nikita Danilov
2004-01-26 11:25 ` Nick Piggin
2004-01-26 12:14 ` Nikita Danilov
2004-01-30 3:48 ` Nick Piggin
2004-01-30 3:56 ` Andrew Morton
2004-01-30 12:00 ` Nikita Danilov
2004-01-23 7:16 ` Nick Piggin
2004-01-23 9:42 ` Nikita Danilov
2004-01-23 12:15 ` Nick Piggin
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=16400.63379.453282.283117@laputa.namesys.com \
--to=nikita@namesys.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=piggin@cyberone.com.au \
/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