mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@engr.sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: kenneth.w.chen@intel.com, torvalds@osdl.org, mingo@elte.hu,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Industry db benchmark result on recent 2.6 kernels
Date: Thu, 31 Mar 2005 22:05:26 -0800	[thread overview]
Message-ID: <20050331220526.3719ed7f.pj@engr.sgi.com> (raw)
In-Reply-To: <424C8956.7070108@yahoo.com.au>

Nick wrote:
> Ingo had a cool patch to estimate dirty => dirty cacheline transfer latency
> ... Unfortunately ... and it is an O(cpus^2) operation.

Yes - a cool patch.

If we had an arch-specific bit of code, that for any two cpus, could
give a 'pseudo-distance' between them, where the only real requirements
were that (1) if two pairs of cpus had the same pseudo-distance, then
that meant they had the same size, layout, kind and speed of bus amd
cache hardware between them (*), and (2) it was cheap - hardly more than
a few lines of code and a subroutine call to obtain, then Ingo's code
could be:

	for each cpu c1:
	    for each cpu c2:
		psdist = pseudo_distance(c1, c2)
		if I've seen psdist before, use the latency computed for that psdist
		else compute a real latency number and remember it for that psdist

A generic form of pseudo_distance, which would work for all normal
sized systems, would be:

int pseudo_distance(int c1, int c2)
{
	static int x;
	return x++;
}

Then us poor slobs with big honkin numa iron could code up a real
pseudo_distance() routine, to avoid the actual pain of doing real work
for cpus^2 iterations for large cpu counts.

Our big boxes have regular geometries with much symmetry, so would
provide significant opportunity to exploit equal pseudo-distances.

And I would imagine that costs of K * NCPU * NCPU are tolerable in this
estimation routine. for sufficiently small K, and existing values of
NCPU.

(*) That is, if pseudo_distance(c1, c2) == pseudo_distance(d1, d2), then
    this meant that however c1 and c2 were connected to each other in the
    system (intervening buses and caches and such), cpus d1 and d2 were
    connected the same way, so could be presumed to have the same latency,
    close enough.

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

  reply	other threads:[~2005-04-01  6:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28 19:33 Chen, Kenneth W
2005-03-28 19:50 ` Dave Hansen
2005-03-28 20:01   ` Chen, Kenneth W
2005-03-30  0:00 ` Linus Torvalds
2005-03-30  0:22   ` Chen, Kenneth W
2005-03-30  0:46   ` Chen, Kenneth W
2005-03-30  0:57     ` Linus Torvalds
2005-03-30  1:31       ` Nick Piggin
2005-03-30  1:38         ` Chen, Kenneth W
2005-03-30  1:56           ` Nick Piggin
2005-03-31 14:14           ` Ingo Molnar
2005-03-31 19:53             ` Chen, Kenneth W
2005-03-31 20:05               ` Linus Torvalds
2005-03-31 20:08                 ` Linus Torvalds
2005-03-31 22:14                   ` Chen, Kenneth W
2005-03-31 23:35                     ` Nick Piggin
2005-04-01  6:05                       ` Paul Jackson [this message]
2005-04-01  6:34                         ` Nick Piggin
2005-04-01  7:19                           ` Paul Jackson
2005-04-01  6:46                         ` Ingo Molnar
2005-04-01 22:32                           ` Chen, Kenneth W
2005-04-01 22:51                             ` Linus Torvalds
2005-04-02  2:19                               ` Nick Piggin
2005-04-04  1:40                               ` Kevin Puetz
2005-04-02  1:44                             ` Paul Jackson
2005-04-02  2:05                               ` Chen, Kenneth W
2005-04-02  2:38                                 ` Paul Jackson
2005-04-03  6:36                                 ` David Lang
2005-04-03  6:53                                   ` Andreas Dilger
2005-04-03  7:23                                     ` David Lang
2005-04-03  7:38                                       ` Nick Piggin
2005-04-01  6:59                         ` Ingo Molnar
2005-04-01  9:29                           ` Paul Jackson
2005-04-01 10:34                             ` Ingo Molnar
2005-04-01 14:39                               ` Paul Jackson
2005-04-01  4:52                     ` Ingo Molnar
2005-04-01  5:14                       ` Chen, Kenneth W
2005-04-01 22:51   ` Chen, Kenneth W
2005-04-01 16:34 Manfred Spraul
2005-04-02  1:00 Chen, Kenneth W
2005-04-02  2:12 ` Nick Piggin

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=20050331220526.3719ed7f.pj@engr.sgi.com \
    --to=pj@engr.sgi.com \
    --cc=akpm@osdl.org \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --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®