mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'Ingo Molnar'" <mingo@elte.hu>
Cc: "Paul Jackson" <pj@engr.sgi.com>, <torvalds@osdl.org>,
	<nickpiggin@yahoo.com.au>, <akpm@osdl.org>,
	<linux-kernel@vger.kernel.org>
Subject: RE: [patch] sched: auto-tune migration costs [was: Re: Industry db benchmark result on recent 2.6 kernels]
Date: Mon, 4 Apr 2005 18:43:35 -0700	[thread overview]
Message-ID: <200504050143.j351hag10217@unix-os.sc.intel.com> (raw)
In-Reply-To: <20050404113743.GA28994@elte.hu>

* Chen, Kenneth W <kenneth.w.chen@intel.com> wrote:
> The cache size information on ia64 is already available at the finger
> tip. Here is a patch that I whipped up to set max_cache_size for ia64.

Ingo Molnar wrote on Monday, April 04, 2005 4:38 AM
> thanks - i've added this to my tree.
>
> i've attached the latest snapshot. There are a number of changes in the
> patch: firstly, i changed the direction of the iteration to go from
> small sizes to larger sizes, and i added a method to detect the maximum.
>
> Furthermore, i tweaked the test some more to make it both faster and
> more reliable, and i cleaned up the code. (e.g. now we migrate via the
> scheduler, not via on_each_cpu().) The default patch should print enough
> debug information as-is.
>
> I changed the workload too so potentially the detected values might be
> off from the ideal value on your box. The values detected on x86 are
> mostly unchanged, relative to previous patches.

Perhaps, I'm not getting the latest patch?  It skipped measuring because
migration cost array is non-zero (initialized to -1LL):

        [00]    [01]    [02]    [03]
[00]:     -     0.0(0)  0.0(0)  0.0(0)
[01]:   0.0(0)    -     0.0(0)  0.0(0)
[02]:   0.0(0)  0.0(0)    -     0.0(0)
[03]:   0.0(0)  0.0(0)  0.0(0)    -
--------------------------------
| cacheflush times [1]: 0.0 (-1)
| calibration delay: 0 seconds
--------------------------------


Need this change?  I bet you had that in your tree already.

--- ./kernel/sched.c.orig	2005-04-04 18:01:45.000000000 -0700
+++ ./kernel/sched.c	2005-04-04 18:21:41.000000000 -0700
@@ -5050,7 +5050,7 @@ void __devinit calibrate_migration_costs
 			/*
 			 * Do we have the result cached already?
 			 */
-			if (migration_cost[distance])
+			if (migration_cost[distance] != -1LL)
 				cost = migration_cost[distance];
 			else {
 				cost = measure_migration_cost(cpu1, cpu2);



Also, the cost calculation in measure_one() looks fishy to me in this version.

> +	/*
> +	 * Dirty the working set:
> +	 */
> +	t0 = sched_clock();
> +	touch_cache(cache, size);
> +	t1 = sched_clock();
> +
> +	/*
> +	 * Migrate to the target CPU, dirty the L2 cache and access
> +	 * the shared buffer. (which represents the working set
> +	 * of a migrated task.)
> +	 */
> +	mask = cpumask_of_cpu(target);
> +	set_cpus_allowed(current, mask);
> +	WARN_ON(smp_processor_id() != target);
> +
> +	t2 = sched_clock();
> +	touch_cache(cache, size);
> +	t3 = sched_clock();
> +
> +	cost = t2-t1 + t3-t2;

Typo here ??



  parent reply	other threads:[~2005-04-05  1:43 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-02  1:00 Industry db benchmark result on recent 2.6 kernels Chen, Kenneth W
2005-04-02  2:12 ` Nick Piggin
2005-04-02 14:53 ` [patch] sched: auto-tune migration costs [was: Re: Industry db benchmark result on recent 2.6 kernels] Ingo Molnar
2005-04-02 21:22   ` Paul Jackson
2005-04-03  5:53   ` Paul Jackson
2005-04-03  7:04     ` Ingo Molnar
2005-04-03  8:15       ` Paul Jackson
2005-04-03 11:34       ` Paul Jackson
2005-04-03 14:12         ` Paul Jackson
2005-04-03 15:01           ` Ingo Molnar
2005-04-03 22:30             ` Paul Jackson
2005-04-05  6:53               ` [patch] sched: auto-tune migration costs Andi Kleen
2005-04-05  7:20                 ` Paul Jackson
2005-04-03 15:24           ` [patch] sched: auto-tune migration costs [was: Re: Industry db benchmark result on recent 2.6 kernels] Ingo Molnar
2005-04-03 23:08             ` Paul Jackson
2005-04-04  2:08               ` Nick Piggin
2005-04-04  3:55                 ` Paul Jackson
2005-04-04  5:45                   ` Ingo Molnar
2005-04-04  5:50                     ` Paul Jackson
2005-04-04  5:56                   ` Nick Piggin
2005-04-04  6:38                     ` Paul Jackson
2005-04-04  6:48                       ` Ingo Molnar
2005-04-04  7:37                         ` Paul Jackson
2005-04-04  6:50               ` Ingo Molnar
2005-04-04  7:27                 ` Paul Jackson
2005-04-03 14:29         ` Ingo Molnar
2005-04-03 23:15           ` Paul Jackson
2005-04-04  1:31           ` Chen, Kenneth W
2005-04-04  6:24             ` Ingo Molnar
2005-04-04  6:39               ` Ingo Molnar
2005-04-06  0:08               ` Chen, Kenneth W
2005-04-04  4:25         ` Andy Lutomirski
2005-04-04  4:36           ` Paul Jackson
2005-04-04  1:11       ` Chen, Kenneth W
2005-04-04 11:37         ` Ingo Molnar
2005-04-04 17:27           ` Paul Jackson
2005-04-05  1:43           ` Chen, Kenneth W [this message]
2005-04-05  1:49             ` Ingo Molnar
2005-04-05  3:04               ` Ingo Molnar
2005-04-06  3:33                 ` Chen, Kenneth W
2005-04-06  6:45                   ` Ingo Molnar
2005-04-08  2:27                     ` Chen, Kenneth W
2005-04-03  9:01     ` Paul Jackson

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=200504050143.j351hag10217@unix-os.sc.intel.com \
    --to=kenneth.w.chen@intel.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@engr.sgi.com \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®