All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 0/7] CART Implementation v3
Date: Mon, 12 Sep 2005 01:05:00 +0200	[thread overview]
Message-ID: <1126479900.20161.185.camel@twins> (raw)
In-Reply-To: <20050911202540.581022000@twins>

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

On Sun, 2005-09-11 at 22:25 +0200, a.p.zijlstra@chello.nl wrote:
> Hi All,
> 
> Here my latest efforts on implementing CART, an advanced page replacement 
> policy.
> 
> It seems pretty stable, except for a spurious OOM. However it yet has to
> run on something other than UML.
> 
> A complete CART implementation should be present in cart-cart.patch. 
> The cart-cart-r.patch improves thereon by keeping a 3th adaptive parameter
> which measures the amount of fresh pages (not in |T1| u |T2| u |B1| u |B2|).
> When the amount of fresh pages drops below the number of longterm pages
> we start to reclaim pages that have just been inserted.
> 
> This works very well for a simple looped linear scan larger than the total 
> resident set. Also it doesn't seem to regress normal workloads.
> 

Some numbers. All run in an UML with mem=64M and 128M of swapspace, sync
ubd.

linux-2.6.13-rc7

make -j4

real    107m15.351s
user    24m4.820s
sys     12m16.590s

scan 60 16

real    3m39.432s
user    0m4.990s
sys     0m21.920s

linux-2.6.13-rc7-cart

make -j4 

real    93m18.035s
user    22m44.280s
sys     9m20.220s

scan 60 16

real    1m47.857s
user    0m4.690s
sys     0m11.690s


-- 
Peter Zijlstra <a.p.zijlstra@chello.nl>

[-- Attachment #2: scan.c --]
[-- Type: text/x-csrc, Size: 748 bytes --]

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>

int main(int argc, char **argv)
{
	char *ptr;
	int size = -1;
	int loops = -1;
	if (argc > 1) {
		size = atoi(argv[1]);
	}
	if (argc > 2) {
		loops = atoi(argv[2]);
	}

	if (size < 0) {
		printf("no size specified\n");
		return 0;
	}
	if (loops < 0) {
		printf("no loops specified\n");
		return 0;
	}

	printf("Size: %dMB\n", size);
	printf("Loops: %d\n", loops);
	size *= 1024*1024;

	ptr = (char*)mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
	if (ptr) {
		for (;loops; --loops) {
			int i;
			for (i=0; i<size; ++i) {
				*(ptr + i) = loops;
			}
			printf(".");
			fflush(stdout);
		}
		printf("\n");
		munmap(ptr, size);
	}
	return 0;
}

      parent reply	other threads:[~2005-09-11 23:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-11 20:25 [RFC][PATCH 0/7] CART Implementation v3 a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 1/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 2/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 3/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 4/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 5/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 6/7] " a.p.zijlstra
2005-09-11 20:25 ` [RFC][PATCH 7/7] " a.p.zijlstra
2005-09-11 23:05 ` Peter Zijlstra [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=1126479900.20161.185.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=linux-mm@kvack.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.