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


Groups > comp.arch > #3109

Re: IBM demos cognitive computer chips

From BGB <cr88192@hotmail.com>
Newsgroups comp.arch
Subject Re: IBM demos cognitive computer chips
Date 2011-08-22 13:01 -0700
Organization albasani.net
Message-ID <j2ucrl$fob$1@news.albasani.net> (permalink)
References (3 earlier) <j2mbn8$706$1@news.albasani.net> <4dd73d66-2fcd-4612-be8f-eeb7709b456c@k15g2000yqd.googlegroups.com> <j2rkm6$1s4$1@news.albasani.net> <4E525C8E.5070109@SPAM.comp-arch.net> <j2uajh$a1p$1@news.albasani.net>

Show all headers | View raw


On 8/22/2011 12:22 PM, BGB wrote:
> On 8/22/2011 6:41 AM, Andy "Krazy" Glew wrote:
>> On 8/21/2011 2:56 PM, BGB wrote:
>>

<snip>

>>> although, it is potentially a reasonable tradeoff, as potentially if it
>>> were just x86, then compiler writers would likely stick to conventions
>>> which as-is make threading rather costly on normal systems:
>>> using a single large dedicated per-thread stack.
>>>
>>> the use of individual/independent frames would allow more economical use
>>> of memory and address space.
>>>
>>> granted, people could also argue "well, we have 64 bits now, why not
>>> just give each thread its own 4MB or 8MB (or more) stack? (CPS/... is
>>> for wimps...)".
>>
>> This is one of the keys:
>>
>> Interleaved stacks for when operating in lockste, or nearly so.
>>
>> Uninterleaved stacks for MIMD parallel.
>>
>
> as well as possibly split-stacks.
>
> I was originally imagining the possibility of independent ("allocated")
> call frames and CPS, but split-stacks could allow higher performance on
> existing HW.
>

<snip>

>
> absent something like the above ideas, using individually allocated
> stack frames would likely be fairly expensive (vs, say, using
> split-stacks or similar).
>
> granted, atomic linked-list operations could also be useful in
> implementing things like message queues, ... as well.
>


just realized that I had overlooked a cheaper possibility for allocated 
stack-frames in a multi-threaded system:
the frame allocator first tries to allocate from TLS (Thread Local 
Storage), and only falls back to a synchronized locking mechanism in the 
case where the TLS var is empty.

say:
.get_frame:
mov rax, [gs:...]	;get TLS var from OS
and rax, rax
jnz .got_one
;malloc more stack frames (implicitly synchronizes)
jmp .get_frame
.got_one:
;adjust link to next
mov rcx, [rax]
mov [gs:...], rcx
ret ;or similar (or possibly a return via a link register)
jmp r14	;return via register


lea r14, [.L0]
jmp __alloc_frame_N
.L0:
...


the advantage here is it utilizes the fact that typically threads have 
fairly predictable patterns.

possibly, a TLS var would be needed for each size of frame supported 
(this would be better with explicit OS support).


nevermind the bigger issue of existing ABIs, ...
again, split stacks still have an advantage in that they are at least 
slightly more ABI friendly (whereas general-purpose allocated 
call-frames would likely require essentially redesigning the ABI from 
the ground up, and would pose more problems for operating within an 
existing OS's, where OS's/... generally tend to assume things like the 
existence of a stack... hence a stack-based ABI would be problematic).

IIRC, this should not be an issue for OS interrupts, ... since although 
the CPU assumes a stack, each ring will use its own stack (the potential 
lack of a valid rSP in userspace should thus not effect this).


granted, synchronized linked-list ops or similar could still be useful, 
but are not likely critical.


or such...

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

IBM demos cognitive computer chips Brett Davis <ggtgp@yahoo.com> - 2011-08-18 18:02 -0500
  Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-18 20:37 -0400
    Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-19 13:40 -0400
      Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-19 11:52 -0700
        Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-19 15:50 -0400
          Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-20 00:15 -0700
            Re: IBM demos cognitive computer chips Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2011-08-20 09:22 -0700
              Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-20 14:10 -0400
        Re: IBM demos cognitive computer chips Quadibloc <jsavard@ecn.ab.ca> - 2011-08-21 05:16 -0700
          Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-21 11:56 -0700
            Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-21 15:29 -0400
              Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-21 13:19 -0700
            Re: IBM demos cognitive computer chips "Andy \"Krazy\" Glew" <andy@SPAM.comp-arch.net> - 2011-08-22 09:41 -0400
              Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-22 12:22 -0700
                Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-22 13:01 -0700
              Re: IBM demos cognitive computer chips "Andy \"Krazy\" Glew" <andy@SPAM.comp-arch.net> - 2011-08-23 10:11 -0400
              Re: IBM demos cognitive computer chips Eric  Northup <digitaleric@gmail.com> - 2011-08-23 09:36 -0700
                Re: IBM demos cognitive computer chips "Andy \"Krazy\" Glew" <andy@SPAM.comp-arch.net> - 2011-08-24 22:15 -0400
                Re: IBM demos cognitive computer chips "Andy \"Krazy\" Glew" <andy@SPAM.comp-arch.net> - 2011-08-25 09:07 -0400
      Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-20 01:41 -0400
      Re: IBM demos cognitive computer chips Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2011-08-20 08:55 -0700
        Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-20 16:10 -0400
          Re: IBM demos cognitive computer chips Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2011-08-21 21:11 -0700
            Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-22 12:04 -0400
              Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-22 12:22 -0400
            Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-22 14:24 -0400
              Re: IBM demos cognitive computer chips Quadibloc <jsavard@ecn.ab.ca> - 2011-08-22 19:32 -0700
                Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-22 23:21 -0700
                Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-23 09:49 -0700
                Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-23 09:46 -0700
                Re: IBM demos cognitive computer chips BGB <cr88192@hotmail.com> - 2011-08-23 15:05 -0700
                Re: IBM demos cognitive computer chips Piotr Wyderski <peter.pan@neverland.mil> - 2011-08-26 16:04 +0200
                Re: IBM demos cognitive computer chips Quadibloc <jsavard@ecn.ab.ca> - 2011-08-26 09:58 -0700
                Re: IBM demos cognitive computer chips ChrisQ <meru@devnull.com> - 2011-08-29 14:56 +0100
                Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-29 11:06 -0400
                Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-29 16:10 -0400
                Re: IBM demos cognitive computer chips EricP <ThatWouldBeTelling@thevillage.com> - 2011-08-29 17:48 -0400
                Re: IBM demos cognitive computer chips Robert Myers <rbmyersusa@gmail.com> - 2011-08-29 19:24 -0400
    Re: IBM demos cognitive computer chips ggtgp@yahoo.com - 2012-03-30 21:54 -0700

csiph-web