linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: linux-mm@kvack.org, mingo@elte.hu,
	lhms-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au
Subject: Re: [PATCH 4/5] Light Fragmentation Avoidance V20: 004_percpu
Date: Tue, 15 Nov 2005 15:24:14 -0800	[thread overview]
Message-ID: <20051115152414.568dc3a8.pj@sgi.com> (raw)
In-Reply-To: <20051115165007.21980.37336.sendpatchset@skynet.csn.ul.ie>

Mel wrote:
> -		mark -= mark / 2;			[A]
> +		mark /= 2;				[B]
>  	if (alloc_flags & ALLOC_HARDER)
> -		mark -= mark / 4;			[C]
> +		mark /= 4;				[D]

Why these changes?  For each of [A] - [D] above, if I start with a
value of mark == 33 and recycle that same mark through the above
transformation 16 times, I get the following sequence of values:

 A:  33  17   9   5   3   2   1   1   1   1   1   1   1   1   1   1
 B:  33  16   8   4   2   1   0   0   0   0   0   0   0   0   0   0
 C:  33  25  19  15  12   9   7   6   5   4   3   3   3   3   3   3
 D:  33   8   2   0   0   0   0   0   0   0   0   0   0   0   0   0

Comparing [A] to [B], observe that [A] converges to 1, but [B] to 0,
due to handling the underflow differently.

Comparing [C] to [D], observe that [D] converges to 0, due to the
different underflow, and converges much faster, since it is taking off
3/4's instead of 1/4 each iteration.

I doubt you want this change.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-11-15 23:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15 16:49 [PATCH 0/5] Light Fragmentation Avoidance V20 Mel Gorman
2005-11-15 16:49 ` [PATCH 1/5] Light Fragmentation Avoidance V20: 001_antidefrag_flags Mel Gorman
2005-11-15 23:00   ` Paul Jackson
2005-11-15 23:04     ` Randy.Dunlap
2005-11-16  1:36     ` Mel Gorman
2005-11-20 14:45       ` [Lhms-devel] " Paul Jackson
2005-11-15 16:49 ` [PATCH 2/5] Light Fragmentation Avoidance V20: 002_usemap Mel Gorman
2005-11-15 23:36   ` Andi Kleen
2005-11-16  1:43     ` Mel Gorman
2005-11-16  1:52       ` Andi Kleen
2005-11-16  2:07         ` Mel Gorman
2005-11-22 10:13           ` Andy Whitcroft
2005-11-22 10:19             ` Mel Gorman
2005-11-22 10:22             ` Andi Kleen
2005-11-22 10:35               ` Mel Gorman
2005-11-22 10:48                 ` KAMEZAWA Hiroyuki
2005-11-22 19:40                   ` Mel Gorman
2005-11-22 10:54                 ` KAMEZAWA Hiroyuki
2005-11-22 11:10                   ` Mel Gorman
2005-11-22 11:35             ` Mel Gorman
2005-11-15 16:50 ` [PATCH 3/5] Light Fragmentation Avoidance V20: 003_fragcore Mel Gorman
2005-11-16  2:35   ` KAMEZAWA Hiroyuki
2005-11-16 10:42     ` Mel Gorman
2005-11-15 16:50 ` [PATCH 4/5] Light Fragmentation Avoidance V20: 004_percpu Mel Gorman
2005-11-15 23:24   ` Paul Jackson [this message]
2005-11-16  1:37     ` Mel Gorman
2005-11-15 16:50 ` [PATCH 5/5] Light Fragmentation Avoidance V20: 005_configurable Mel Gorman
2005-11-15 23:39   ` Andi Kleen
2005-11-16  1:47     ` Mel Gorman
2005-11-15 22:54 ` [PATCH 0/5] Light Fragmentation Avoidance V20 Paul Jackson
2005-11-16  1:34   ` Mel Gorman

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=20051115152414.568dc3a8.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.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