All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Fedyk <mfedyk@matchmail.com>
To: Michael Cohen <me@ohdarn.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.4.18-pre9-mjc2 & Rmap12f [PATCH]
Date: Thu, 14 Feb 2002 19:18:09 -0800	[thread overview]
Message-ID: <20020215031809.GA15362@matchmail.com> (raw)
In-Reply-To: <1013662709.6671.16.camel@ohdarn.net>
In-Reply-To: <1013662709.6671.16.camel@ohdarn.net>

On Wed, Feb 13, 2002 at 11:58:28PM -0500, Michael Cohen wrote:
> The latest version of the -mjc branch has been released.  It is
> available at:
> 	ftp://ftp.kernel.org/pub/linux/kernel/people/mjc/linux-2.4/patch-2.4.18-pre9-mjc2.bz2
> --------------------------------------------------------------
> [ A great deal of patches have been removed, in interest of keeping this
> branch as close to the standard 2.4 series as possible.]
> [ I am now using bitkeeper, and my bk tree is available at
> bk://ohdarn.net/linux-mjc.  it is cloned from linus's 2.4 tree so
> please, please, please clone from him and pull from me. ]
> 
> 
> 2.4.18-pre9-ac3				(Alan Cox et al)
> Reverse Mapping VM Patch #12e		(Rik van Riel)

Here's rmap12f:

I'm not sure I murged mm/bootmem.c correctly, can someone take a look?

diff -ur 2.4.18-pre9-mjc2/Makefile 2.4.18-pre9-mjc2-rmap12f/Makefile
--- 2.4.18-pre9-mjc2/Makefile	Thu Feb 14 19:09:54 2002
+++ 2.4.18-pre9-mjc2-rmap12f/Makefile	Thu Feb 14 19:08:52 2002
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 18
-EXTRAVERSION = -pre9-mjc2
+EXTRAVERSION = -pre9-mjc2-rmap12f
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -ur 2.4.18-pre9-mjc2/fs/buffer.c 2.4.18-pre9-mjc2-rmap12f/fs/buffer.c
--- 2.4.18-pre9-mjc2/fs/buffer.c	Thu Feb 14 19:09:58 2002
+++ 2.4.18-pre9-mjc2-rmap12f/fs/buffer.c	Thu Feb 14 18:58:12 2002
@@ -2991,6 +2991,7 @@
 
 		spin_lock(&lru_list_lock);
 		if (!write_some_buffers(NODEV) || balance_dirty_state() < 0) {
+			run_task_queue(&tq_disk);
 			interruptible_sleep_on(&bdflush_wait);
 		}
 	}
diff -ur 2.4.18-pre9-mjc2/include/linux/mmzone.h 2.4.18-pre9-mjc2-rmap12f/include/linux/mmzone.h
--- 2.4.18-pre9-mjc2/include/linux/mmzone.h	Thu Feb 14 19:10:01 2002
+++ 2.4.18-pre9-mjc2-rmap12f/include/linux/mmzone.h	Thu Feb 14 18:58:12 2002
@@ -161,6 +161,21 @@
 
 extern pg_data_t contig_page_data;
 
+/**
+ * for_each_pgdat - helper macro to iterate over all nodes
+ * @pgdat - pg_data_t * variable
+ *
+ * Meant to help with common loops of the form
+ * pgdat = pgdat_list;
+ * while(pgdat) {
+ * 	...
+ * 	pgdat = pgdat->node_next;
+ * }
+ */
+#define for_each_pgdat(pgdat) \
+		for (pgdat = pgdat_list; pgdat; pgdat = pgdat->node_next)
+
+
 /*
  * next_zone - helper magic for for_each_zone()
  * Thanks to William Lee Irwin III for this piece of ingenuity.
diff -ur 2.4.18-pre9-mjc2/kernel/ksyms.c 2.4.18-pre9-mjc2-rmap12f/kernel/ksyms.c
--- 2.4.18-pre9-mjc2/kernel/ksyms.c	Thu Feb 14 19:10:02 2002
+++ 2.4.18-pre9-mjc2-rmap12f/kernel/ksyms.c	Thu Feb 14 19:01:03 2002
@@ -251,6 +251,7 @@
 EXPORT_SYMBOL(__pollwait);
 EXPORT_SYMBOL(poll_freewait);
 EXPORT_SYMBOL(ROOT_DEV);
+EXPORT_SYMBOL(__find_get_page);
 EXPORT_SYMBOL(find_get_page);
 EXPORT_SYMBOL(find_lock_page);
 EXPORT_SYMBOL(grab_cache_page);
diff -ur 2.4.18-pre9-mjc2/mm/bootmem.c 2.4.18-pre9-mjc2-rmap12f/mm/bootmem.c
--- 2.4.18-pre9-mjc2/mm/bootmem.c	Thu Feb 14 19:10:02 2002
+++ 2.4.18-pre9-mjc2-rmap12f/mm/bootmem.c	Thu Feb 14 19:08:16 2002
@@ -897,13 +897,11 @@
 	pg_data_t *pgdat = pgdat_list;
 	void *ptr;
 
-	while (pgdat) {
+	for_each_pgdat(pgdat) {
 		ptr = __alloc_bootmem_core(pgdat->bdata, size, align, goal);
 
 		if(ptr)
 			return ptr;
-
-		pgdat = pgdat->node_next;
 	}
 
 	printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
diff -ur 2.4.18-pre9-mjc2/mm/page_alloc.c 2.4.18-pre9-mjc2-rmap12f/mm/page_alloc.c
--- 2.4.18-pre9-mjc2/mm/page_alloc.c	Thu Feb 14 19:10:02 2002
+++ 2.4.18-pre9-mjc2-rmap12f/mm/page_alloc.c	Thu Feb 14 18:58:12 2002
@@ -627,14 +627,11 @@
 {
 	unsigned int sum;
 	zone_t *zone;
-	pg_data_t *pgdat = pgdat_list;
 
 	sum = 0;
-	while (pgdat) {
-		for (zone = pgdat->node_zones; zone < pgdat->node_zones + MAX_NR_ZONES; zone++)
-			sum += zone->free_pages;
-		pgdat = pgdat->node_next;
-	}
+	for_each_zone(zone)
+		sum += zone->free_pages;
+	
 	return sum;
 }
 
@@ -643,10 +640,10 @@
  */
 unsigned int nr_free_buffer_pages (void)
 {
-	pg_data_t *pgdat = pgdat_list;
+	pg_data_t *pgdat;
 	unsigned int sum = 0;
 
-	do {
+	for_each_pgdat(pgdat) {
 		zonelist_t *zonelist = pgdat->node_zonelists + (GFP_USER & GFP_ZONEMASK);
 		zone_t **zonep = zonelist->zones;
 		zone_t *zone;
@@ -657,8 +654,7 @@
 			sum += zone->inactive_dirty_pages;
 		}
 
-		pgdat = pgdat->node_next;
-	} while (pgdat);
+	}
 
 	return sum;
 }
@@ -666,13 +662,12 @@
 #if CONFIG_HIGHMEM
 unsigned int nr_free_highpages (void)
 {
-	pg_data_t *pgdat = pgdat_list;
+	pg_data_t *pgdat;
 	unsigned int pages = 0;
 
-	while (pgdat) {
+	for_each_pgdat(pgdat)
 		pages += pgdat->node_zones[ZONE_HIGHMEM].free_pages;
-		pgdat = pgdat->node_next;
-	}
+
 	return pages;
 }
 #endif
diff -ur 2.4.18-pre9-mjc2/mm/vmscan.c 2.4.18-pre9-mjc2-rmap12f/mm/vmscan.c
--- 2.4.18-pre9-mjc2/mm/vmscan.c	Thu Feb 14 19:10:02 2002
+++ 2.4.18-pre9-mjc2-rmap12f/mm/vmscan.c	Thu Feb 14 18:58:12 2002
@@ -652,6 +652,10 @@
 
 	refill_freelist();
 
+	/* Start IO when needed. */
+	if (free_plenty(ALL_ZONES) > 0 || free_low(ANY_ZONE) > 0)
+		run_task_queue(&tq_disk);
+
 	/*
 	 * Hmm.. Cache shrink failed - time to kill something?
 	 * Mhwahahhaha! This is the part I really like. Giggle.

      parent reply	other threads:[~2002-02-15  3:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-14  4:58 Linux 2.4.18-pre9-mjc2 Michael Cohen
2002-02-14  5:09 ` Michael Cohen
2002-02-14 10:26   ` Lionel Bouton
2002-02-14  5:12 ` Andrew Hatfield
2002-02-14  5:19 ` Larry McVoy
2002-02-14 13:58   ` Ed Tomlinson
2002-02-14  5:46 ` Andrew Hatfield
2002-02-14  5:48   ` Michael Cohen
2002-02-14  5:51   ` William Lee Irwin III
2002-02-14 11:43 ` Matthias Andree
2002-02-14 12:36   ` Alan Cox
2002-02-14 12:34     ` Martin Dalecki
2002-02-17 13:45     ` Pavel Machek
2002-02-18 19:04       ` Alan Cox
2002-02-18 20:58         ` Pavel Machek
2002-02-18 21:16           ` Alan Cox
2002-02-18 21:08             ` Pavel Machek
2002-02-18 21:39               ` Alan Cox
2002-02-18 21:43                 ` Kjartan Maraas
2002-02-19  9:22                 ` Pavel Machek
2002-02-19  9:47                   ` Alan Cox
2002-02-20 11:33                     ` Pavel Machek
2002-02-15  3:18 ` Mike Fedyk [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=20020215031809.GA15362@matchmail.com \
    --to=mfedyk@matchmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@ohdarn.net \
    /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.