All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J . A . Magallon" <jamagallon@able.es>
To: "Albert D . Cahalan" <acahalan@cs.uml.edu>
Cc: Davide Libenzi <davidel@xmailserver.org>,
	Christoph Hellwig <hch@ns.caldera.de>,
	linux-kernel@vger.kernel.org, ognen@gene.pbi.nrc.ca
Subject: Re: threading question
Date: Wed, 13 Jun 2001 01:48:01 +0200	[thread overview]
Message-ID: <20010613014801.A17093@werewolf.able.es> (raw)
In-Reply-To: <XFMail.20010612144449.davidel@xmailserver.org> <200106122158.f5CLwTR253610@saturn.cs.uml.edu>
In-Reply-To: <200106122158.f5CLwTR253610@saturn.cs.uml.edu>; from acahalan@cs.uml.edu on Tue, Jun 12, 2001 at 23:58:29 +0200


On 20010612 Albert D. Cahalan wrote:
> 
> In that case, this could be a hardware issue. Note that he seems
> to be comparing an x86 PC against SGI MIPS, Sun SPARC, and Compaq
> Alpha hardware.
> 
> His data set is most likely huge. It's DNA data.
> 
> The x86 box likely has small caches, a fast core, and a slow bus.
> So most of the time the CPU will be stalled waiting for a memory
> operation.
> 

Perhaps is just synchronization of caches. 
say you want to sum all the elements of a vector in parallele split in
two pieces:

int total=0;
thread 1:
	for fist half
		total += v[i]
thread 2:
	for second half
		total += v[i]

and you tought: 'well, I need a mutex for access to total. that will slow
down things, lets use separate counters':

int bigtotal;
int total[2];
thread 1:
	for fist half
		total[0] += v[i]
thread 2:
	for second half
		total[1] += v[i]

bigtotal = total[0]+total[1]

The problem ? total[0] and total[1] are nearby one of each other. So in
the same cache line. So on every write to total[?], even if they are
independent, system has to synchrnize caches.

Big iron (SGI, Sparc), has special hardware, but cheap PC mobos...

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Linux Mandrake release 8.1 (Cooker) for i586
Linux werewolf 2.4.5-ac13 #1 SMP Sun Jun 10 21:42:28 CEST 2001 i686

  reply	other threads:[~2001-06-12 23:59 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-12 18:24 threading question ognen
2001-06-12 18:39 ` Davide Libenzi
2001-06-12 18:57   ` from dmesg: kernel BUG at inode.c:486 Olivier Sessink
2001-06-12 18:58 ` threading question Christoph Hellwig
2001-06-12 19:07   ` ognen
2001-06-12 19:15     ` Kip Macy
2001-06-12 19:29       ` Christoph Hellwig
2001-06-12 19:15     ` Christoph Hellwig
2001-06-13 12:20     ` Kurt Garloff
2001-06-13 13:35       ` J . A . Magallon
2001-06-13 14:17         ` Philips
2001-06-13 15:06           ` ognen
2001-06-12 21:44   ` Davide Libenzi
2001-06-12 21:48     ` ognen
2001-06-14 18:15       ` Alan Cox
2001-06-14 22:42         ` threading question (results after thread pooling) ognen
2001-06-14 23:00           ` Mike Castle
2001-06-12 21:58     ` threading question Albert D. Cahalan
2001-06-12 23:48       ` J . A . Magallon [this message]
2001-06-12 19:06 ` Kip Macy
2001-06-12 19:14   ` Alexander Viro
2001-06-12 19:25     ` Russell Leighton
2001-06-12 23:27       ` Mike Castle
2001-06-13 17:31   ` bert hubert
2001-06-14  6:45     ` Helge Hafting
2001-06-14 18:28   ` Alan Cox
2001-06-14 19:01     ` bert hubert
2001-06-14 19:22       ` Russell Leighton
2001-06-15 11:29       ` Anil Kumar
2001-06-14 23:05     ` J . A . Magallon
2001-06-16 14:16     ` Michael Rothwell
2001-06-16 15:19       ` Alan Cox
2001-06-16 18:33         ` Russell Leighton
2001-06-16 19:06           ` Michael Rothwell
2001-06-16 21:30             ` Coroutines [was Re: threading question] Russell Leighton
2001-06-12 22:41 ` threading question Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2001-06-13 19:05 Hubertus Franke
     [not found] <fa.f6da6av.agod3u@ifi.uio.no>
     [not found] ` <fa.e54jbkv.kg4r99@ifi.uio.no>
2001-06-16 22:22   ` Dan Maas

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=20010613014801.A17093@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=acahalan@cs.uml.edu \
    --cc=davidel@xmailserver.org \
    --cc=hch@ns.caldera.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ognen@gene.pbi.nrc.ca \
    /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.