Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #132029

Re: Parallel Forth on a 44 core machine

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Parallel Forth on a 44 core machine
Date 2024-08-18 13:42 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2024Aug18.154233@mips.complang.tuwien.ac.at> (permalink)
References <a46cb8e455c12e2c81cd2ff60c095528@www.novabbs.com> <112ba13cc3d99496d5825773b3f0642e@www.novabbs.com> <2df471d1ec39c22949169f8a612b780d@www.novabbs.com> <nnd$0f8813aa$41d0ee61@18dd570284c2b77b> <932f13f537e8c918ecd2089466e4c405@www.novabbs.com>

Show all headers | View raw


mhx@iae.nl (mhx) writes:
>What I meant is severe slowdown when reading variables that are
>physically *close* to variables that belong to another process.

That is known as false sharing.  The cache coherence protocols work at
the granularity of a a cache line (usually 64 bytes).  If core A
writes to a variable, and core B, say, reads one in the same cache
line, the cache coherence protocol first makes that cache line
modified by core A (and every other core has to invalidate that cache
line), and then core B has to wait until core A sends out the data to
the other cores.

>It happens for both AMD and Intel on both Windows and Linux.
>Spacing such variables farther apart has dramatic impact but
>is quite inconvenient in most cases.

Yes, but if you want performance, you have to rearrange your data to
avoid false sharing.

>I don't recall that transputers had these problems.

Transputers have no shared memory and therefore no cache coherence
protocols.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
   EuroForth 2024: https://euro.theforth.net

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-17 15:34 +0000
  Re: Parallel Forth on a 44 core machine minforth@gmx.net (minforth) - 2024-08-18 09:28 +0000
    Re: Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-18 11:31 +0000
      Re: Parallel Forth on a 44 core machine albert@spenarnc.xs4all.nl - 2024-08-18 14:47 +0200
        Re: Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-18 13:33 +0000
          Re: Parallel Forth on a 44 core machine anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2024-08-18 13:42 +0000
            Re: Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-18 14:32 +0000
              Re: Parallel Forth on a 44 core machine anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2024-08-18 15:14 +0000
          Re: Parallel Forth on a 44 core machine minforth@gmx.net (minforth) - 2024-08-18 14:01 +0000
    Re: Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-28 09:29 +0000
      Re: Parallel Forth on a 44 core machine Paul Rubin <no.email@nospam.invalid> - 2024-08-28 09:35 -0700
  Re: Parallel Forth on a 44 core machine mhx@iae.nl (mhx) - 2024-08-18 18:37 +0000

csiph-web