All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@e-mind.com>
To: Steve Bergman <steve@netplus.net>,
	dlux@dlux.sch.bme.hu, "Nicholas J. Leon" <nicholas@binary9.net>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	brent verner <damonbrent@earthlink.net>,
	"Garst R. Reese" <reese@isn.net>,
	Kalle Andersson <kalle.andersson@mbox303.swipnet.se>,
	Zlatko Calusic <Zlatko.Calusic@CARNet.hr>,
	Ben McCann <bmccann@indusriver.com>,
	bredelin@ucsd.edu, linux-kernel@vger.rutgers.edu,
	linux-mm@kvack.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Stephen C. Tweedie" <sct@redhat.com>,
	Heinz Mauelshagen <mauelsha@ez-darmstadt.telekom.de>
Subject: Re: [patch] arca-vm-19 [Re: Results: Zlatko's new vm patch]
Date: Thu, 14 Jan 1999 13:30:44 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.3.96.990114132019.2683B-100000@laser.bogus> (raw)
In-Reply-To: <Pine.LNX.3.96.990113213203.1822B-100000@laser.bogus>

On Wed, 13 Jan 1999, Andrea Arcangeli wrote:

> I produced a new arca-vm-19. I would like if you could try it. I don't

It seems that the better algorithm I am be able to invent is been the
growing_swap_cache one (the one in arca-vm-16). Steve could you try this
new patch (arca-vm-20) against real 2.2.0-pre7? I think that it should be
still better than arca-vm-16 + SWAP_CLUSTER_MAX=512. 

If it will be not very good could you do:

echo 8 2 4 512 512 512 > /proc/sys/vm/pager

and try again? (such numbers should be the same of setting
SWAP_CLUSTER_MAX in arca-vm-16, but as default only the max_async_pages is
set to 512 because I think it's been the only one that made a difference). 

If this will be not the best again you could apply the filemap.c patch I
sent you in the last email (the one that return to put the shrink_mmap()
weight exponential increasing in function of priority) and try again?

Many thanks!

Andrea Arcangeli

Here arca-vm-20 against 2.2.0-pre7:

Index: linux/mm/filemap.c
diff -u linux/mm/filemap.c:1.1.1.9 linux/mm/filemap.c:1.1.1.1.2.48
--- linux/mm/filemap.c:1.1.1.9	Thu Jan  7 12:21:35 1999
+++ linux/mm/filemap.c	Thu Jan 14 13:15:32 1999
@@ -121,14 +125,11 @@
 int shrink_mmap(int priority, int gfp_mask)
 {
 	static unsigned long clock = 0;
-	unsigned long limit = num_physpages;
 	struct page * page;
-	int count;
-
-	count = (limit << 1) >> priority;
+	unsigned long count = num_physpages / (priority+1);
 
 	page = mem_map + clock;
-	do {
+	while (count-- != 0) {
 		int referenced;
 
 		/* This works even in the presence of PageSkip because
@@ -147,7 +148,6 @@
 			clock = page->map_nr;
 		}
 		
-		count--;
 		referenced = test_and_clear_bit(PG_referenced, &page->flags);
 
 		if (PageLocked(page))
@@ -160,21 +160,6 @@
 		if (atomic_read(&page->count) != 1)
 			continue;
 
-		/*
-		 * Is it a page swap page? If so, we want to
-		 * drop it if it is no longer used, even if it
-		 * were to be marked referenced..
-		 */
-		if (PageSwapCache(page)) {
-			if (referenced && swap_count(page->offset) != 1)
-				continue;
-			delete_from_swap_cache(page);
-			return 1;
-		}	
-
-		if (referenced)
-			continue;
-
 		/* Is it a buffer page? */
 		if (page->buffers) {
 			if (buffer_under_min())
@@ -184,6 +169,14 @@
 			return 1;
 		}
 
+		if (referenced)
+			continue;
+
+		if (PageSwapCache(page)) {
+			delete_from_swap_cache(page);
+			return 1;
+		}	
+
 		/* is it a page-cache page? */
 		if (page->inode) {
 			if (pgcache_under_min())
@@ -191,8 +184,7 @@
 			remove_inode_page(page);
 			return 1;
 		}
-
-	} while (count > 0);
+	}
 	return 0;
 }
 
Index: linux/mm/mmap.c
diff -u linux/mm/mmap.c:1.1.1.2 linux/mm/mmap.c:1.1.1.1.2.12
--- linux/mm/mmap.c:1.1.1.2	Fri Nov 27 11:19:10 1998
+++ linux/mm/mmap.c	Wed Jan 13 21:23:38 1999
@@ -66,7 +66,7 @@
 	free += page_cache_size;
 	free += nr_free_pages;
 	free += nr_swap_pages;
-	free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100; 
+	free -= (pager_daemon.cache_min_percent + pager_daemon.buffer_min_percent + 2)*num_physpages/100; 
 	return free > pages;
 }
 
Index: linux/mm/page_alloc.c
diff -u linux/mm/page_alloc.c:1.1.1.9 linux/mm/page_alloc.c:1.1.1.1.2.31
--- linux/mm/page_alloc.c:1.1.1.9	Thu Jan 14 12:32:57 1999
+++ linux/mm/page_alloc.c	Thu Jan 14 12:42:59 1999
@@ -124,7 +124,6 @@
 	if (!PageReserved(page) && atomic_dec_and_test(&page->count)) {
 		if (PageSwapCache(page))
 			panic ("Freeing swap cache page");
-		page->flags &= ~(1 << PG_referenced);
 		free_pages_ok(page->map_nr, 0);
 		return;
 	}
@@ -141,7 +140,6 @@
 		if (atomic_dec_and_test(&map->count)) {
 			if (PageSwapCache(map))
 				panic ("Freeing swap cache pages");
-			map->flags &= ~(1 << PG_referenced);
 			free_pages_ok(map_nr, order);
 			return;
 		}
@@ -212,19 +210,18 @@
 		 * further thought.
 		 */
 		if (!(current->flags & PF_MEMALLOC)) {
-			static int trashing = 0;
 			int freed;
 
 			if (nr_free_pages > freepages.min) {
-				if (!trashing)
+				if (!current->trashing)
 					goto ok_to_allocate;
 				if (nr_free_pages > freepages.low) {
-					trashing = 0;
+					current->trashing = 0;
 					goto ok_to_allocate;
 				}
 			}
 
-			trashing = 1;
+			current->trashing = 1;
 			current->flags |= PF_MEMALLOC;
 			freed = try_to_free_pages(gfp_mask);
 			current->flags &= ~PF_MEMALLOC;
@@ -361,7 +358,7 @@
 		if (offset >= swapdev->max)
 			break;
 		/* Don't block on I/O for read-ahead */
-		if (atomic_read(&nr_async_pages) >= pager_daemon.swap_cluster)
+		if (atomic_read(&nr_async_pages) >= pager_daemon.max_async_pages)
 			break;
 		/* Don't read in bad or busy pages */
 		if (!swapdev->swap_map[offset])
Index: linux/mm/page_io.c
diff -u linux/mm/page_io.c:1.1.1.4 linux/mm/page_io.c:1.1.1.1.2.6
--- linux/mm/page_io.c:1.1.1.4	Tue Dec 29 01:39:20 1998
+++ linux/mm/page_io.c	Wed Jan 13 00:00:04 1999
@@ -58,7 +58,7 @@
 	}
 
 	/* Don't allow too many pending pages in flight.. */
-	if (atomic_read(&nr_async_pages) > pager_daemon.swap_cluster)
+	if (atomic_read(&nr_async_pages) > pager_daemon.max_async_pages)
 		wait = 1;
 
 	p = &swap_info[type];
Index: linux/mm/swap.c
diff -u linux/mm/swap.c:1.1.1.6 linux/mm/swap.c:1.1.1.1.2.14
--- linux/mm/swap.c:1.1.1.6	Mon Jan 11 22:24:24 1999
+++ linux/mm/swap.c	Thu Jan 14 13:15:32 1999
@@ -40,41 +40,17 @@
 };
 
 /* How many pages do we try to swap or page in/out together? */
-int page_cluster = 4; /* Default value modified in swap_setup() */
+int page_cluster = 5; /* Default readahead 32 pages every time */
 
 /* We track the number of pages currently being asynchronously swapped
    out, so that we don't try to swap TOO many pages out at once */
 atomic_t nr_async_pages = ATOMIC_INIT(0);
 
-buffer_mem_t buffer_mem = {
-	2,	/* minimum percent buffer */
-	10,	/* borrow percent buffer */
-	60	/* maximum percent buffer */
-};
-
-buffer_mem_t page_cache = {
-	2,	/* minimum percent page cache */
-	15,	/* borrow percent page cache */
-	75	/* maximum */
-};
-
 pager_daemon_t pager_daemon = {
-	512,	/* base number for calculating the number of tries */
-	SWAP_CLUSTER_MAX,	/* minimum number of tries */
-	SWAP_CLUSTER_MAX,	/* do swap I/O in clusters of this size */
+	8,	/* starting priority of try_to_free_pages() */
+	2,	/* minimum percent buffer */
+	4,	/* minimum percent page cache */
+	32,	/* number of tries we do on every try_to_free_pages() */
+	128,	/* do swap I/O in clusters of this size */
+	512	/* max number of async swapped-out pages on the fly */
 };
-
-/*
- * Perform any setup for the swap system
- */
-
-void __init swap_setup(void)
-{
-	/* Use a smaller cluster for memory <16MB or <32MB */
-	if (num_physpages < ((16 * 1024 * 1024) >> PAGE_SHIFT))
-		page_cluster = 2;
-	else if (num_physpages < ((32 * 1024 * 1024) >> PAGE_SHIFT))
-		page_cluster = 3;
-	else
-		page_cluster = 4;
-}
Index: linux/mm/swapfile.c
diff -u linux/mm/swapfile.c:1.1.1.3 linux/mm/swapfile.c:1.1.1.1.2.6
--- linux/mm/swapfile.c:1.1.1.3	Mon Jan 11 22:24:24 1999
+++ linux/mm/swapfile.c	Wed Jan 13 00:00:04 1999
@@ -23,7 +23,6 @@
 
 struct swap_info_struct swap_info[MAX_SWAPFILES];
 
-#define SWAPFILE_CLUSTER 256
 
 static inline int scan_swap_map(struct swap_info_struct *si)
 {
@@ -31,7 +30,7 @@
 	/* 
 	 * We try to cluster swap pages by allocating them
 	 * sequentially in swap.  Once we've allocated
-	 * SWAPFILE_CLUSTER pages this way, however, we resort to
+	 * SWAP_CLUSTER pages this way, however, we resort to
 	 * first-free allocation, starting a new cluster.  This
 	 * prevents us from scattering swap pages all over the entire
 	 * swap partition, so that we reduce overall disk seek times
@@ -47,7 +46,7 @@
 			goto got_page;
 		}
 	}
-	si->cluster_nr = SWAPFILE_CLUSTER;
+	si->cluster_nr = SWAP_CLUSTER;
 	for (offset = si->lowest_bit; offset <= si->highest_bit ; offset++) {
 		if (si->swap_map[offset])
 			continue;
Index: linux/mm/vmscan.c
diff -u linux/mm/vmscan.c:1.1.1.12 linux/mm/vmscan.c:1.1.1.1.2.93
--- linux/mm/vmscan.c:1.1.1.12	Mon Jan 11 22:24:24 1999
+++ linux/mm/vmscan.c	Thu Jan 14 13:15:32 1999
@@ -10,6 +10,11 @@
  *  Version: $Id: vmscan.c,v 1.5 1998/02/23 22:14:28 sct Exp $
  */
 
+/*
+ * free_user_and_cache() and always async swapout original idea.
+ * Copyright (C) 1999  Andrea Arcangeli
+ */
+
 #include <linux/slab.h>
 #include <linux/kernel_stat.h>
 #include <linux/swap.h>
@@ -20,6 +25,8 @@
 
 #include <asm/pgtable.h>
 
+int swapout_interval = HZ;
+
 /*
  * The swap-out functions return 1 if they successfully
  * threw something out, and we got a free page. It returns
@@ -71,6 +78,21 @@
 	 * memory, and we should just continue our scan.
 	 */
 	if (PageSwapCache(page_map)) {
+		if (pte_write(pte))
+		{
+			struct page *found;
+			printk ("VM: Found a writable swap-cached page!\n");
+			/* Try to diagnose the problem ... */
+			found = find_page(&swapper_inode, page_map->offset);
+			if (found) {
+				printk("page=%p@%08lx, found=%p, count=%d\n",
+				       page_map, page_map->offset,
+				       found, atomic_read(&found->count));
+				__free_page(found);
+			} else 
+				printk ("Spurious, page not in cache\n");
+			return 0;
+		}
 		entry = page_map->offset;
 		swap_duplicate(entry);
 		set_pte(page_table, __pte(entry));
@@ -199,7 +221,7 @@
 
 	do {
 		int result;
-		tsk->swap_address = address + PAGE_SIZE;
+		tsk->mm->swap_address = address + PAGE_SIZE;
 		result = try_to_swap_out(tsk, vma, address, pte, gfp_mask);
 		if (result)
 			return result;
@@ -271,7 +293,7 @@
 	/*
 	 * Go through process' page directory.
 	 */
-	address = p->swap_address;
+	address = p->mm->swap_address;
 
 	/*
 	 * Find the proper vm-area
@@ -293,8 +315,8 @@
 	}
 
 	/* We didn't find anything for the process */
-	p->swap_cnt = 0;
-	p->swap_address = 0;
+	p->mm->swap_cnt = 0;
+	p->mm->swap_address = 0;
 	return 0;
 }
 
@@ -306,7 +328,8 @@
 static int swap_out(unsigned int priority, int gfp_mask)
 {
 	struct task_struct * p, * pbest;
-	int counter, assign, max_cnt;
+	int counter, assign;
+	unsigned long max_cnt;
 
 	/* 
 	 * We make one or two passes through the task list, indexed by 
@@ -325,7 +348,7 @@
 	counter = nr_tasks / (priority+1);
 	if (counter < 1)
 		counter = 1;
-	if (counter > nr_tasks)
+	else if (counter > nr_tasks)
 		counter = nr_tasks;
 
 	for (; counter >= 0; counter--) {
@@ -338,13 +361,13 @@
 		for (; p != &init_task; p = p->next_task) {
 			if (!p->swappable)
 				continue;
-	 		if (p->mm->rss <= 0)
+	 		if (p->mm->rss == 0)
 				continue;
 			/* Refresh swap_cnt? */
 			if (assign)
-				p->swap_cnt = p->mm->rss;
-			if (p->swap_cnt > max_cnt) {
-				max_cnt = p->swap_cnt;
+				p->mm->swap_cnt = p->mm->rss;
+			if (p->mm->swap_cnt > max_cnt) {
+				max_cnt = p->mm->swap_cnt;
 				pbest = p;
 			}
 		}
@@ -375,8 +398,6 @@
        int i;
        char *revision="$Revision: 1.5 $", *s, *e;
 
-       swap_setup();
-       
        if ((s = strchr(revision, ':')) &&
            (e = strchr(s, '$')))
                s++, i = e - s;
@@ -430,7 +451,7 @@
 			break;
 		current->state = TASK_INTERRUPTIBLE;
 		run_task_queue(&tq_disk);
-		schedule_timeout(HZ);
+		schedule_timeout(swapout_interval);
 
 		/*
 		 * kswapd isn't even meant to keep up with anything,
@@ -438,13 +459,36 @@
 		 * point is to make sure that the system doesn't stay
 		 * forever in a really bad memory squeeze.
 		 */
-		if (nr_free_pages < freepages.high)
+		if (nr_free_pages < freepages.min)
 			try_to_free_pages(GFP_KSWAPD);
 	}
 
 	return 0;
 }
 
+static int free_user_and_cache(int priority, int gfp_mask)
+{
+	static unsigned long grow_swap_cache = 0;
+
+	if (!shrink_mmap(priority, gfp_mask))
+		grow_swap_cache = 1;
+
+	switch (grow_swap_cache)
+	{
+	case 0:
+		return 1;
+	default:
+		if (grow_swap_cache++ >= freepages.high)
+			grow_swap_cache = 0;
+	}
+
+	if (swap_out(priority, gfp_mask))
+		return 1;
+
+	grow_swap_cache = 0;
+	return 0;
+}
+
 /*
  * We need to make the locks finer granularity, but right
  * now we need this so that we can do page allocations
@@ -457,34 +501,35 @@
 int try_to_free_pages(unsigned int gfp_mask)
 {
 	int priority;
-	int count = SWAP_CLUSTER_MAX;
+	static int state = 0;
+	int count = pager_daemon.tries;
 
 	lock_kernel();
 
 	/* Always trim SLAB caches when memory gets low. */
 	kmem_cache_reap(gfp_mask);
-
-	priority = 6;
-	do {
-		while (shrink_mmap(priority, gfp_mask)) {
-			if (!--count)
-				goto done;
-		}
 
-		/* Try to get rid of some shared memory pages.. */
-		while (shm_swap(priority, gfp_mask)) {
-			if (!--count)
-				goto done;
-		}
-	
-		/* Then, try to page stuff out.. */
-		while (swap_out(priority, gfp_mask)) {
-			if (!--count)
-				goto done;
-		}
+	priority = pager_daemon.priority;
+	switch (state)
+	{
+		do {
+		case 0:
+			while (free_user_and_cache(priority, gfp_mask)) {
+				if (!--count)
+					goto done;
+			}
+			state = 1;
+		case 1:
+			/* Try to get rid of some shared memory pages.. */
+			while (shm_swap(priority, gfp_mask)) {
+				if (!--count)
+					goto done;
+			}
+			state = 0;
 
-		shrink_dcache_memory(priority, gfp_mask);
-	} while (--priority >= 0);
+			shrink_dcache_memory(priority, gfp_mask);
+		} while (--priority >= 0);
+	}
 done:
 	unlock_kernel();
 
Index: linux/kernel/fork.c
diff -u linux/kernel/fork.c:1.1.1.6 linux/kernel/fork.c:1.1.1.1.2.10
--- linux/kernel/fork.c:1.1.1.6	Mon Jan 11 22:24:21 1999
+++ linux/kernel/fork.c	Mon Jan 11 22:56:09 1999
@@ -511,6 +514,7 @@
 
 	p->did_exec = 0;
 	p->swappable = 0;
+	p->trashing = 0;
 	p->state = TASK_UNINTERRUPTIBLE;
 
 	copy_flags(clone_flags, p);
Index: linux/kernel/sysctl.c
diff -u linux/kernel/sysctl.c:1.1.1.6 linux/kernel/sysctl.c:1.1.1.1.2.12
--- linux/kernel/sysctl.c:1.1.1.6	Mon Jan 11 22:24:22 1999
+++ linux/kernel/sysctl.c	Wed Jan 13 21:23:38 1999
@@ -32,7 +32,7 @@
 
 /* External variables not in a header file. */
 extern int panic_timeout;
-extern int console_loglevel, C_A_D;
+extern int console_loglevel, C_A_D, swapout_interval;
 extern int bdf_prm[], bdflush_min[], bdflush_max[];
 extern char binfmt_java_interpreter[], binfmt_java_appletviewer[];
 extern int sysctl_overcommit_memory;
@@ -216,6 +216,8 @@
 };
 
 static ctl_table vm_table[] = {
+	{VM_SWAPOUT, "swapout_interval",
+	 &swapout_interval, sizeof(int), 0644, NULL, &proc_dointvec},
 	{VM_FREEPG, "freepages", 
 	 &freepages, sizeof(freepages_t), 0644, NULL, &proc_dointvec},
 	{VM_BDFLUSH, "bdflush", &bdf_prm, 9*sizeof(int), 0600, NULL,
@@ -223,11 +225,7 @@
 	 &bdflush_min, &bdflush_max},
 	{VM_OVERCOMMIT_MEMORY, "overcommit_memory", &sysctl_overcommit_memory,
 	 sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec},
-	{VM_BUFFERMEM, "buffermem",
-	 &buffer_mem, sizeof(buffer_mem_t), 0644, NULL, &proc_dointvec},
-	{VM_PAGECACHE, "pagecache",
-	 &page_cache, sizeof(buffer_mem_t), 0644, NULL, &proc_dointvec},
-	{VM_PAGERDAEMON, "kswapd",
+	{VM_PAGERDAEMON, "pager",
 	 &pager_daemon, sizeof(pager_daemon_t), 0644, NULL, &proc_dointvec},
 	{VM_PGT_CACHE, "pagetable_cache", 
 	 &pgt_cache_water, 2*sizeof(int), 0600, NULL, &proc_dointvec},
Index: linux/include/linux/mm.h
diff -u linux/include/linux/mm.h:1.1.1.6 linux/include/linux/mm.h:1.1.1.1.2.21
--- linux/include/linux/mm.h:1.1.1.6	Mon Jan 11 22:23:57 1999
+++ linux/include/linux/mm.h	Thu Jan 14 13:15:31 1999
@@ -118,7 +118,6 @@
 	unsigned long offset;
 	struct page *next_hash;
 	atomic_t count;
-	unsigned int unused;
 	unsigned long flags;	/* atomic flags, some possibly updated asynchronously */
 	struct wait_queue *wait;
 	struct page **pprev_hash;
@@ -302,8 +301,7 @@
 
 /* filemap.c */
 extern void remove_inode_page(struct page *);
-extern unsigned long page_unuse(struct page *);
-extern int shrink_mmap(int, int);
+extern int FASTCALL(shrink_mmap(int, int));
 extern void truncate_inode_pages(struct inode *, unsigned long);
 extern unsigned long get_cached_page(struct inode *, unsigned long, int);
 extern void put_cached_page(unsigned long);
@@ -387,9 +385,9 @@
 }
 
 #define buffer_under_min()	((buffermem >> PAGE_SHIFT) * 100 < \
-				buffer_mem.min_percent * num_physpages)
-#define pgcache_under_min()	(page_cache_size * 100 < \
-				page_cache.min_percent * num_physpages)
+				pager_daemon.buffer_min_percent * num_physpages)
+#define pgcache_under_min()	((page_cache_size-swapper_inode.i_nrpages) * 100 < \
+				pager_daemon.cache_min_percent * num_physpages)
 
 #endif /* __KERNEL__ */
 
Index: linux/include/linux/sched.h
diff -u linux/include/linux/sched.h:1.1.1.6 linux/include/linux/sched.h:1.1.1.1.2.13
--- linux/include/linux/sched.h:1.1.1.6	Mon Jan 11 22:24:03 1999
+++ linux/include/linux/sched.h	Thu Jan 14 12:42:58 1999
@@ -169,6 +174,7 @@
 	unsigned long rss, total_vm, locked_vm;
 	unsigned long def_flags;
 	unsigned long cpu_vm_mask;
+	unsigned long swap_cnt, swap_address;
 	/*
 	 * This is an architecture-specific pointer: the portable
 	 * part of Linux does not know about any segments.
@@ -177,15 +183,17 @@
 };
 
 #define INIT_MM {					\
-		&init_mmap, NULL, swapper_pg_dir, 	\
+		&init_mmap, NULL, swapper_pg_dir,	\
 		ATOMIC_INIT(1), 1,			\
 		MUTEX,					\
 		0,					\
 		0, 0, 0, 0,				\
-		0, 0, 0, 				\
+		0, 0, 0,				\
 		0, 0, 0, 0,				\
 		0, 0, 0,				\
-		0, 0, NULL }
+		0, 0,					\
+		0, 0,					\
+		NULL }
 
 struct signal_struct {
 	atomic_t		count;
@@ -270,8 +278,7 @@
 /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
 	unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
 	int swappable:1;
-	unsigned long swap_address;
-	unsigned long swap_cnt;		/* number of pages to swap on next pass */
+	int trashing:1;
 /* process credentials */
 	uid_t uid,euid,suid,fsuid;
 	gid_t gid,egid,sgid,fsgid;
@@ -355,7 +362,7 @@
 /* utime */	{0,0,0,0},0, \
 /* per CPU times */ {0, }, {0, }, \
 /* flt */	0,0,0,0,0,0, \
-/* swp */	0,0,0, \
+/* swp */	0,0, \
 /* process credentials */					\
 /* uid etc */	0,0,0,0,0,0,0,0,				\
 /* suppl grps*/ 0, {0,},					\
Index: linux/include/linux/swap.h
diff -u linux/include/linux/swap.h:1.1.1.6 linux/include/linux/swap.h:1.1.1.1.2.17
--- linux/include/linux/swap.h:1.1.1.6	Mon Jan 11 22:24:05 1999
+++ linux/include/linux/swap.h	Wed Jan 13 21:28:52 1999
@@ -33,7 +33,7 @@
 #define SWP_USED	1
 #define SWP_WRITEOK	3
 
-#define SWAP_CLUSTER_MAX 32
+#define SWAP_CLUSTER	(pager_daemon.swap_cluster)
 
 #define SWAP_MAP_MAX	0x7fff
 #define SWAP_MAP_BAD	0x8000
@@ -68,9 +68,6 @@
 
 /* linux/ipc/shm.c */
 extern int shm_swap (int, int);
-
-/* linux/mm/swap.c */
-extern void swap_setup (void);
 
 /* linux/mm/vmscan.c */
 extern int try_to_free_pages(unsigned int gfp_mask);
Index: linux/include/linux/swapctl.h
diff -u linux/include/linux/swapctl.h:1.1.1.4 linux/include/linux/swapctl.h:1.1.1.1.2.6
--- linux/include/linux/swapctl.h:1.1.1.4	Mon Jan 11 22:24:05 1999
+++ linux/include/linux/swapctl.h	Thu Jan 14 13:15:31 1999
@@ -4,32 +4,23 @@
 #include <asm/page.h>
 #include <linux/fs.h>
 
-typedef struct buffer_mem_v1
+typedef struct freepages_s
 {
-	unsigned int	min_percent;
-	unsigned int	borrow_percent;
-	unsigned int	max_percent;
-} buffer_mem_v1;
-typedef buffer_mem_v1 buffer_mem_t;
-extern buffer_mem_t buffer_mem;
-extern buffer_mem_t page_cache;
-
-typedef struct freepages_v1
-{
 	unsigned int	min;
 	unsigned int	low;
 	unsigned int	high;
-} freepages_v1;
-typedef freepages_v1 freepages_t;
+} freepages_t;
 extern freepages_t freepages;
 
-typedef struct pager_daemon_v1
+typedef struct pager_daemon_s
 {
-	unsigned int	tries_base;
-	unsigned int	tries_min;
+	unsigned int	priority;
+	unsigned int	buffer_min_percent;
+	unsigned int	cache_min_percent;
+	unsigned int	tries;
 	unsigned int	swap_cluster;
-} pager_daemon_v1;
-typedef pager_daemon_v1 pager_daemon_t;
+	unsigned int	max_async_pages;
+} pager_daemon_t;
 extern pager_daemon_t pager_daemon;
 
 #endif /* _LINUX_SWAPCTL_H */


--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

  reply	other threads:[~1999-01-14 12:34 UTC|newest]

Thread overview: 243+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199812290146.BAA12687@terrorserver.swansea.linux.org.uk>
1998-12-31 18:00 ` 2.2.0 Bug summary Andrea Arcangeli
1998-12-31 18:34   ` [patch] new-vm improvement [Re: 2.2.0 Bug summary] Andrea Arcangeli
1999-01-01  0:16     ` Steve Bergman
1999-01-01 17:16       ` Andrea Arcangeli
1999-01-01 16:44     ` Andrea Arcangeli
1999-01-01 20:02       ` Andrea Arcangeli
1999-01-01 23:46         ` Steve Bergman
1999-01-02  6:55           ` Linus Torvalds
1999-01-02  8:33             ` Steve Bergman
1999-01-02 14:48             ` Andrea Arcangeli
1999-01-02 15:38             ` Andrea Arcangeli
1999-01-02 18:10               ` Linus Torvalds
1999-01-02 20:52               ` Andrea Arcangeli
1999-01-03  2:59                 ` Andrea Arcangeli
1999-01-04 18:08                   ` [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm improvement , [Re: 2.2.0 Bug summary]] Andrea Arcangeli
1999-01-04 20:56                     ` Linus Torvalds
1999-01-04 21:10                       ` Rik van Riel
1999-01-04 22:04                       ` Alan Cox
1999-01-04 21:55                         ` Linus Torvalds
1999-01-04 22:51                           ` Andrea Arcangeli
1999-01-05  0:32                             ` Andrea Arcangeli
1999-01-05  0:52                               ` Zlatko Calusic
1999-01-05  3:02                               ` Zlatko Calusic
1999-01-05 11:49                                 ` Andrea Arcangeli
1999-01-05 13:23                                   ` Zlatko Calusic
1999-01-05 15:42                                     ` Andrea Arcangeli
1999-01-05 16:16                                       ` Zlatko Calusic
1999-01-05 15:35                               ` arca-vm-8 [Re: [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm , improvement , [Re: 2.2.0 Bug summary]]] Andrea Arcangeli
1999-01-06 14:48                                 ` Andrea Arcangeli
1999-01-06 23:31                                   ` Andrea Arcangeli
1999-01-07  3:32                                     ` Results: 2.2.0-pre5 vs arcavm10 vs arcavm9 vs arcavm7 Steve Bergman
1999-01-07 12:02                                       ` Andrea Arcangeli
1999-01-07 20:27                                         ` Linus Torvalds
1999-01-07 23:56                                           ` Andrea Arcangeli
1999-01-07 17:35                                       ` Linus Torvalds
1999-01-07 18:44                                         ` Zlatko Calusic
1999-01-07 19:33                                           ` Linus Torvalds
1999-01-07 21:10                                             ` Zlatko Calusic
1999-01-07 19:38                                           ` Zlatko Calusic
1999-01-07 19:40                                           ` Andrea Arcangeli
1999-01-09  6:28                                           ` 2.2.0-pre[56] swap performance poor with > 1 thrashing task Dax Kelson
1999-01-09  6:32                                             ` Zlatko Calusic
1999-01-09  6:44                                               ` Linus Torvalds
1999-01-09 18:58                                                 ` Andrea Arcangeli
1999-01-11  9:21                                                 ` Buffer handling (setting PG_referenced on access) Zlatko Calusic
1999-01-11 17:44                                                   ` Linus Torvalds
1999-01-11 20:14                                                     ` Zlatko Calusic
1999-01-16 17:35                                                 ` 2.2.0-pre[56] swap performance poor with > 1 thrashing task Andrea Arcangeli
1999-01-09  7:48                                             ` Benjamin Redelings I
1999-01-09  6:53                                               ` Linus Torvalds
1999-01-09 22:39                                       ` Results: pre6 vs pre6+zlatko's_patch vs pre5 vs arcavm13 Steve Bergman
1999-01-10  0:28                                         ` Steve Bergman
1999-01-10  5:35                                           ` Linus Torvalds
1999-01-10 18:33                                             ` Andrea Arcangeli
1999-01-10 18:43                                             ` Steve Bergman
1999-01-10 19:08                                               ` Linus Torvalds
1999-01-10 19:23                                                 ` Vladimir Dergachev
1999-01-10 20:09                                                 ` Andrea Arcangeli
1999-01-10 20:29                                                 ` Steve Bergman
1999-01-10 21:41                                                   ` Linus Torvalds
1999-01-10 23:33                                                     ` testing/pre-7 and do_poll() Chip Salzenberg
1999-01-11  6:02                                                       ` Linus Torvalds
1999-01-11  6:26                                                         ` Chip Salzenberg
1999-01-11  6:46                                                           ` Linus Torvalds
1999-01-11  6:59                                                             ` Chip Salzenberg
1999-01-11  7:02                                                               ` Linus Torvalds
1999-01-11 22:08                                                                 ` Shawn Leas
1999-01-11 22:13                                                                   ` Linus Torvalds
1999-01-12  0:25                                                                     ` estafford
1999-01-12  8:25                                                                       ` Shawn Leas
1999-01-12  7:06                                                                     ` Gregory Maxwell
1999-01-11 20:20                                                       ` Adam Heath
1999-01-11 16:57                                                   ` Results: pre6 vs pre6+zlatko's_patch vs pre5 vs arcavm13 Steve Bergman
1999-01-11 19:36                                                     ` Andrea Arcangeli
1999-01-11 23:03                                                       ` Andrea Arcangeli
1999-01-11 23:38                                                         ` Zlatko Calusic
1999-01-12  2:02                                                         ` Steve Bergman
1999-01-12  3:21                                                           ` Results: Zlatko's new vm patch Steve Bergman
1999-01-12  5:33                                                             ` Linus Torvalds
1999-01-12 14:49                                                               ` Andrea Arcangeli
1999-01-12 16:58                                                               ` Joseph Anthony
1999-01-12 18:16                                                                 ` Stephen C. Tweedie
1999-01-12 20:15                                                                   ` Michael K Vance
1999-01-13 19:25                                                                     ` Stephen C. Tweedie
1999-01-12 18:24                                                               ` Michael K Vance
1999-01-13  0:01                                                               ` Where to find pre7. Was: " Robert Thorncrantz
1999-01-13 20:47                                                             ` [patch] arca-vm-19 [Re: Results: Zlatko's new vm patch] Andrea Arcangeli
1999-01-14 12:30                                                               ` Andrea Arcangeli [this message]
1999-01-15 23:56                                                                 ` [patch] NEW: arca-vm-21, swapout via shrink_mmap using PG_dirty Andrea Arcangeli
1999-01-16 16:49                                                                   ` Andrea Arcangeli
1999-01-17 23:47                                                                     ` Andrea Arcangeli
1999-01-18  5:11                                                                       ` Linus Torvalds
1999-01-18  7:28                                                                         ` Eric W. Biederman
1999-01-18 10:00                                                                           ` Andrea Arcangeli
1999-01-18  9:15                                                                         ` Andrea Arcangeli
1999-01-18 17:49                                                                           ` Linus Torvalds
1999-01-18 19:22                                                                       ` Andrea Arcangeli
1999-01-10 20:40                                               ` Results: pre6 vs pre6+zlatko's_patch vs pre5 vs arcavm13 Andrea Arcangeli
1999-01-10 20:50                                                 ` Linus Torvalds
1999-01-10 21:01                                                   ` Andrea Arcangeli
1999-01-10 21:51                                                     ` Steve Bergman
1999-01-10 22:50                                                       ` Results: arcavm15, et. al Steve Bergman
1999-01-11  0:20                                                         ` Steve Bergman
1999-01-11 13:21                                                         ` Andrea Arcangeli
1999-01-11  3:47                                         ` Results: pre6 vs pre6+zlatko's_patch vs pre5 vs arcavm13 Gregory Maxwell
1999-01-06 23:35                                   ` arca-vm-8 [Re: [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm , improvement , [Re: 2.2.0 Bug summary]]] Linus Torvalds
1999-01-07  4:30                                     ` Eric W. Biederman
1999-01-07 17:56                                       ` Linus Torvalds
1999-01-07 18:18                                         ` Rik van Riel
1999-01-07 19:19                                           ` arca-vm-8 [Re: [patch] arca-vm-6, killed kswapd [Re: [patch] Alan Cox
1999-01-07 18:55                                         ` arca-vm-8 [Re: [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm , improvement , [Re: 2.2.0 Bug summary]]] Zlatko Calusic
1999-01-07 22:57                                         ` Linus Torvalds
1999-01-08  1:16                                           ` Linus Torvalds
1999-01-08 10:45                                             ` Andrea Arcangeli
1999-01-08 19:06                                               ` Linus Torvalds
1999-01-09  9:43                                           ` MM deadlock [was: Re: arca-vm-8...] Savochkin Andrey Vladimirovich
1999-01-09 18:00                                             ` Linus Torvalds
1999-01-09 18:41                                               ` Andrea Arcangeli
1999-01-10 21:41                                                 ` Stephen C. Tweedie
1999-01-10 21:47                                                   ` Linus Torvalds
1999-01-09 21:50                                               ` Linus Torvalds
1999-01-10 11:56                                                 ` Savochkin Andrey Vladimirovich
1999-01-10 17:59                                                   ` Andrea Arcangeli
1999-01-10 22:33                                                   ` Stephen C. Tweedie
1999-01-10 16:59                                                 ` Stephen C. Tweedie
1999-01-10 18:13                                                   ` Andrea Arcangeli
1999-01-10 18:35                                                   ` Linus Torvalds
1999-01-10 19:45                                                     ` Alan Cox
1999-01-10 19:03                                                       ` Andrea Arcangeli
1999-01-10 21:39                                                         ` Stephen C. Tweedie
1999-01-10 19:09                                                       ` Linus Torvalds
1999-01-10 20:33                                                         ` Alan Cox
1999-01-10 20:07                                                           ` Linus Torvalds
1999-01-10 22:18                                                     ` Stephen C. Tweedie
1999-01-10 22:49                                                     ` Stephen C. Tweedie
1999-01-11  6:04                                                       ` Eric W. Biederman
1999-01-12 16:06                                                         ` Stephen C. Tweedie
1999-01-12 17:54                                                           ` Linus Torvalds
1999-01-12 18:44                                                             ` Zlatko Calusic
1999-01-12 19:05                                                               ` Andrea Arcangeli
1999-01-13 17:48                                                                 ` Stephen C. Tweedie
1999-01-13 18:07                                                                   ` 2.2.0-pre6 ain't nice =( Kalle Andersson
1999-01-13 19:05                                                                   ` MM deadlock [was: Re: arca-vm-8...] Alan Cox
1999-01-13 19:23                                                                     ` MOLNAR Ingo
1999-01-13 19:26                                                                     ` Andrea Arcangeli
1999-01-14 11:02                                                                       ` Mike Jagdis
1999-01-14 22:38                                                                         ` Andrea Arcangeli
1999-01-15  7:40                                                                       ` Agus Budy Wuysang
1999-01-14 10:48                                                                   ` Mike Jagdis
1999-01-12 21:46                                                               ` Rik van Riel
1999-01-13  6:52                                                                 ` Zlatko Calusic
1999-01-13 13:45                                                                 ` Andrea Arcangeli
1999-01-13 13:58                                                                   ` Chris Evans
1999-01-13 15:07                                                                     ` Andrea Arcangeli
1999-01-13 22:11                                                                       ` Stephen C. Tweedie
1999-01-13 14:59                                                                   ` Rik van Riel
1999-01-13 18:10                                                                     ` Andrea Arcangeli
1999-01-13 22:14                                                                       ` Stephen C. Tweedie
1999-01-14 14:53                                                                         ` Dr. Werner Fink
1999-01-21 16:50                                                                           ` Stephen C. Tweedie
1999-01-21 19:53                                                                             ` Andrea Arcangeli
1999-01-22 13:55                                                                               ` Stephen C. Tweedie
1999-01-22 19:45                                                                                 ` Andrea Arcangeli
1999-01-23 23:20                                                                             ` Alan Cox
1999-01-24  0:19                                                                               ` Linus Torvalds
1999-01-24 18:33                                                                                 ` Gregory Maxwell
1999-01-25  0:21                                                                                   ` Linus Torvalds
1999-01-25  1:28                                                                                     ` Alan Cox
1999-01-25  3:35                                                                                       ` pmonta
1999-01-25  4:17                                                                                       ` Linus Torvalds
1999-01-24 20:33                                                                                 ` Alan Cox
1999-01-25  0:27                                                                                   ` Linus Torvalds
1999-01-25  1:38                                                                                     ` Alan Cox
1999-01-25  1:04                                                                                       ` Andrea Arcangeli
1999-01-25  2:10                                                                                         ` Alan Cox
1999-01-25  3:16                                                                                           ` Garst R. Reese
1999-01-25 10:49                                                                                             ` Alan Cox
1999-01-25 14:06                                                                                           ` Rik van Riel
1999-01-25 21:59                                                                                       ` Gerard Roudier
1999-01-26 11:45                                                                                         ` Thomas Sailer
1999-01-26 20:48                                                                                           ` Gerard Roudier
1999-01-26 21:24                                                                                             ` Thomas Sailer
1999-01-27  0:25                                                                                             ` David Lang
1999-01-27 16:05                                                                                             ` Stephen C. Tweedie
1999-01-27 20:11                                                                                               ` Gerard Roudier
1999-01-26 13:06                                                                                         ` Stephen C. Tweedie
1999-01-26 14:28                                                                                           ` Alan Cox
1999-01-26 14:15                                                                                             ` MOLNAR Ingo
1999-01-26 14:36                                                                                               ` yodaiken
1999-01-26 15:21                                                                                                 ` MOLNAR Ingo
1999-01-27 10:31                                                                                                   ` yodaiken
1999-01-26 15:46                                                                                                 ` Alan Cox
1999-01-26 16:45                                                                                                   ` Stephen C. Tweedie
1999-01-30  7:01                                                                                                     ` yodaiken
1999-02-01 13:07                                                                                                       ` Stephen C. Tweedie
1999-01-26 16:37                                                                                               ` Stephen C. Tweedie
1999-01-27 11:35                                                                                               ` Jakub Jelinek
1999-01-26 14:21                                                                                             ` Rik van Riel
1999-01-25 16:25                                                                                 ` Stephen C. Tweedie
1999-01-25 16:52                                                                                   ` Andrea Arcangeli
1999-01-25 18:27                                                                                   ` Linus Torvalds
1999-01-25 18:43                                                                                     ` Stephen C. Tweedie
1999-01-25 18:49                                                                                       ` Linus Torvalds
1999-01-25 18:43                                                                                   ` Linus Torvalds
1999-01-25 19:15                                                                                     ` Stephen C. Tweedie
1999-01-26  1:57                                                                                   ` Andrea Arcangeli
1999-01-26 18:37                                                                                     ` Andrea Arcangeli
1999-01-27 12:13                                                                                     ` Stephen C. Tweedie
1999-01-22 16:29                                                                           ` Eric W. Biederman
1999-01-25 13:14                                                                             ` Dr. Werner Fink
1999-01-25 17:56                                                                               ` Stephen C. Tweedie
1999-01-25 19:10                                                                               ` Andrea Arcangeli
1999-01-25 20:49                                                                                 ` Dr. Werner Fink
1999-01-25 20:56                                                                                   ` Linus Torvalds
1999-01-26 12:23                                                                                     ` Rik van Riel
1999-01-26 15:44                                                                                       ` Andrea Arcangeli
1999-01-27 14:52                                                                                   ` Stephen C. Tweedie
1999-01-28 19:12                                                                                     ` Dr. Werner Fink
1999-01-13 17:55                                                                   ` [PATCH] " Stephen C. Tweedie
1999-01-13 18:52                                                                     ` Andrea Arcangeli
1999-01-13 22:10                                                                       ` Stephen C. Tweedie
1999-01-13 22:30                                                                         ` Linus Torvalds
1999-01-11 11:20                                                       ` Pavel Machek
1999-01-11 17:35                                                         ` Stephen C. Tweedie
1999-01-11 14:11                                                     ` Savochkin Andrey Vladimirovich
1999-01-11 17:55                                                       ` Linus Torvalds
1999-01-11 18:37                                                         ` Andrea Arcangeli
1999-01-08  2:56                                         ` arca-vm-8 [Re: [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm , improvement , [Re: 2.2.0 Bug summary]]] Eric W. Biederman
1999-01-09  0:50                                         ` David S. Miller
1999-01-09  2:13                                         ` Stephen C. Tweedie
1999-01-09  2:34                                           ` Andrea Arcangeli
1999-01-09  9:30                                             ` Stephen C. Tweedie
1999-01-09 12:11                                           ` Andrea Arcangeli
1999-01-07 14:11                                     ` Andrea Arcangeli
1999-01-07 18:19                                       ` Linus Torvalds
1999-01-07 20:35                                         ` Andrea Arcangeli
1999-01-07 23:51                                           ` Linus Torvalds
1999-01-08  0:04                                             ` Andrea Arcangeli
1999-01-04 22:43                         ` [patch] arca-vm-6, killed kswapd [Re: [patch] new-vm improvement , [Re: 2.2.0 Bug summary]] Andrea Arcangeli
1999-01-04 22:29                       ` Andrea Arcangeli
1999-01-05 13:33                   ` [patch] new-vm improvement [Re: 2.2.0 Bug summary] Ben McCann
1999-01-02 20:04             ` Steve Bergman
1999-01-02  3:03         ` 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.3.96.990114132019.2683B-100000@laser.bogus \
    --to=andrea@e-mind.com \
    --cc=Zlatko.Calusic@CARNet.hr \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bmccann@indusriver.com \
    --cc=bredelin@ucsd.edu \
    --cc=damonbrent@earthlink.net \
    --cc=dlux@dlux.sch.bme.hu \
    --cc=kalle.andersson@mbox303.swipnet.se \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=mauelsha@ez-darmstadt.telekom.de \
    --cc=nicholas@binary9.net \
    --cc=reese@isn.net \
    --cc=sct@redhat.com \
    --cc=steve@netplus.net \
    --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 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.