public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* boot-time slowdown for measure_migration_cost
@ 2006-01-27 21:03 Bjorn Helgaas
  2006-01-30 17:21 ` Ingo Molnar
  0 siblings, 1 reply; 12+ messages in thread
From: Bjorn Helgaas @ 2006-01-27 21:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-ia64, linux-kernel

The boot-time migration cost auto-tuning stuff seems to have
been merged to Linus' tree since 2.6.15.  On little one- or
two-processor systems, the time required to measure the
migration costs isn't very noticeable, but by the time we
get to even a four-processor ia64 box, it adds about
30 seconds to the boot time, which seems like a lot.

Is that expected?  Is the information we get really worth
that much?  Could the measurement be done at run-time
instead?  Is there a smaller hammer we could use, e.g.,
flushing just the buffer rather than the *entire* cache?
Did we just implement sched_cacheflush() incorrectly for
ia64?

Only ia64, x86, and x86_64 currently have a non-empty
sched_cacheflush(), and the x86* ones contain only "wbinvd()".
So I suspect that only ia64 sees this slowdown.  But I would
guess that other arches will implement it in the future.

Bjorn

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: boot-time slowdown for measure_migration_cost
@ 2006-01-27 21:48 Luck, Tony
  2006-01-27 22:08 ` Prarit Bhargava
  0 siblings, 1 reply; 12+ messages in thread
From: Luck, Tony @ 2006-01-27 21:48 UTC (permalink / raw)
  To: Bjorn Helgaas, Ingo Molnar; +Cc: linux-ia64, linux-kernel

> The boot-time migration cost auto-tuning stuff seems to have
> been merged to Linus' tree since 2.6.15.  On little one- or
> two-processor systems, the time required to measure the
> migration costs isn't very noticeable, but by the time we
> get to even a four-processor ia64 box, it adds about
> 30 seconds to the boot time, which seems like a lot.

I only see about 16 seconds for a 4-way tiger (not that 16 seconds
is good ... but it not as bad as 30).  This was with a build
from tiger_defconfig that sets CONFIG_NR_CPUS=4 ... so I wonder
what's causing the factor of two.  I measured with a printk
each side of build_sched_domains() and booted with the "time"
command line arg to get:

[    0.540718] Building sched domains
[   16.124693] migration_cost=10091
[   16.124789] Done

More importantly, how does this time scale as the number of
cpus increases?  Linear, or worse?  What happens on a 512 cpu
Altix (if it's quadratic, they may be still waiting for the
boot to finish :-)

-Tony

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: boot-time slowdown for measure_migration_cost
@ 2006-02-01  0:50 Chuck Ebbert
  0 siblings, 0 replies; 12+ messages in thread
From: Chuck Ebbert @ 2006-02-01  0:50 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Bjorn Helgaas, Ingo Molnar, linux-ia64, linux-kernel,
	Linus Torvalds, Andrew Morton, Chen, Kenneth W

In-Reply-To: <20060130200026.GA5081@agluck-lia64.sc.intel.com>

On Mon, 30 Jan 2006, Tony Luck wrote:

> Might it be wise to see whether the 2% variation that I saw can be
> repeated on some other architecture?  Bjorn's initial post was just
> questioning whether we need to spend this much time during boot to acquire
> this data.  Now we have *one* data point that on an ia64 with four cpus
> with 9MB cache in a single domain that we can speed the calculation by
> a factor of three with only a 2% loss of accuracy.  Can someone else try
> this patch and post the before/after values for migration_cost from dmesg?

Before:

messages.1:Jan 24 01:19:45 d2 kernel: [    6.377117] migration_cost=9352
messages.1:Jan 27 21:07:55 d2 kernel: [    6.384871] migration_cost=9329
messages.1:Jan 28 11:00:32 d2 kernel: [    6.384215] migration_cost=9338
messages.1:Jan 28 12:55:03 d2 kernel: [    6.389189] migration_cost=9364


After:

messages:Jan 31 07:55:07 d2 kernel: [    1.859359] migration_cost=9274


This was on a dual PII Xeon with 2MB L2 cache.  About 3.5x as fast and
only 1% change.

Maybe the default could be to run the quick test with an option to run the
more-accurate one?

-- 
Chuck

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-02-01  0:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-27 21:03 boot-time slowdown for measure_migration_cost Bjorn Helgaas
2006-01-30 17:21 ` Ingo Molnar
2006-01-30 18:53   ` Luck, Tony
2006-01-30 19:24     ` Ingo Molnar
2006-01-30 20:00       ` Luck, Tony
2006-01-30 20:43         ` Prarit Bhargava
2006-01-30 20:52           ` Prarit Bhargava
2006-01-30 20:43     ` John Hawkes
2006-01-30 19:26   ` Chen, Kenneth W
  -- strict thread matches above, loose matches on Subject: below --
2006-01-27 21:48 Luck, Tony
2006-01-27 22:08 ` Prarit Bhargava
2006-02-01  0:50 Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox