All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Subject: Re: lazy_buddy-2.5.25-1
Date: Wed, 10 Jul 2002 22:11:52 -0700	[thread overview]
Message-ID: <20020711051152.GD27093@holomorphy.com> (raw)
In-Reply-To: <20020711050221.GC27093@holomorphy.com>

On Wed, Jul 10, 2002 at 10:02:21PM -0700, William Lee Irwin III wrote:
> Even worse, I spotted another (thankfully more minor) bug while still
> peeking at this... okay, back to more urgent things.

I'm *not* having a good day. One parting shot and I really go back to
the other stuff:

> @@ -739,8 +739,8 @@
>  	for (pgdat = pgdat_list; pgdat; pgdat = pgdat->node_next) {
>  		node_zones = pgdat->node_zones;
>  		for (i = 0; i < MAX_NR_ZONES; ++i) {
> -			for (order = 0; order < MAX_ORDER; ++order)
> -				pages += node_zones[i].free_area[order].locally_free;
> +			for (order = MAX_ORDER; order >= 0; --order)
> +				pages = 2*pages + node_zones[i].free_area[order].locally_free;
>  		}
>  	}
>  	return pages;

forgets to start from 0 pages for each zone. Don't bother trying to be
smart and let the compiler figure it out, it's for /proc/meminfo anyway:

Cheers,
Bill


# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.633   -> 1.634  
#	     mm/page_alloc.c	1.128   -> 1.129  
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/10	wli@tisifone.holomorphy.com	1.634
# page_alloc.c:
#   Correct nr_deferred_pages() calculation.
# --------------------------------------------
#
diff --minimal -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	Wed Jul 10 22:12:14 2002
+++ b/mm/page_alloc.c	Wed Jul 10 22:12:14 2002
@@ -740,7 +740,7 @@
 		node_zones = pgdat->node_zones;
 		for (i = 0; i < MAX_NR_ZONES; ++i) {
 			for (order = 0; order < MAX_ORDER; ++order)
-				pages += node_zones[i].free_area[order].locally_free;
+				pages += node_zones[i].free_area[order].locally_free << order;
 		}
 	}
 	return pages;

  reply	other threads:[~2002-07-11  5:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10  8:59 lazy_buddy-2.5.25-1 William Lee Irwin III
2002-07-11  4:49 ` lazy_buddy-2.5.25-1 William Lee Irwin III
2002-07-11  5:02   ` lazy_buddy-2.5.25-1 William Lee Irwin III
2002-07-11  5:11     ` William Lee Irwin III [this message]
2002-07-13  6:22 ` lazy_buddy-2.5.25-1 William Lee Irwin III
2002-07-13  6:29   ` lazy_buddy-2.5.25-1 William Lee Irwin III

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=20020711051152.GD27093@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.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.