[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - "shared memory" interface.

"shared memory" interface.

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

"shared memory" interface.

Postby notzed » Tue Dec 02, 2014 11:45 pm

After a post in the new sdk thread I intended to have a "quick look" at the shared memory stuff and offer a critique but I now realise it will take much more work than that - work that would be better spent just rewriting it and most of the memory handling in elib/ehal.

So instead i'll ask just what is it meant to be for?

Looking at the code, I can see some hints. It seems to be for persistent multi-process access, and it also seems to be for simple named buffer sharing between a workgroup and it's host, but ...

(i realise i'm mixing implementation and interface details here, but it's all i've got to go on here).

o It's not useful as a multi-(linux)process resource management scheme because it has no namespaces and refcounting can't be made reliable in this context.
o It's not useful as a general purpose dynamic memory allocator because it's only got 64 slots and allocations have a massive overhead (something like 300+ bytes per allocation). The compiler can already do static allocation and if e-hal exposed symbolic lookup that would cover most use cases.
o It's not useful as a multi-library resource management scheme because it has no namespace stuff.
o There's no allocation access on-core.
o It's not very efficient.

I presume it should however do or be all of those things, depending on the first point (i.e. is it supposed to support two or more separate linux processes sharing the epiphany as a resource, perhaps concurrently - although we know of course this is impossible with the current sdk in the general case).

To be honest i had a bit more of a think about it while this was sitting here and the api as is has got a pretty hard time justifying it's existence to begin with. The closest thing I can think of to it is sysv shared memory segments (and does anyone outside of maybe oracle use that horrible stuff anymore?) or shared memory files which are of very limited "system-type" use. Surely just passing pointers (relative to epiphany-space) around is more familiar/flexible/efficient than trying to rendezvous on blocks by name. e.g. in ezesdk i just have a "malloc" which returns both a host pointer and an epiphany pointer pair which can both be used naturally on each respective end.

On a related note I just don't see the point of the memory-as-object abstraction. It's rather confusing and bulky and inefficient. Given the already high cognitive load of dealing with concurrent hardware and the lack of on-core space, these all seem to be big negatives for the maybe-chance of some weak "type and array bounds safety" at runtime.
notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: "shared memory" interface.

Postby aolofsson » Wed Dec 03, 2014 1:04 pm

notzed,

Thank you for the thorough review and feedback! I agree with pretty much all of your points!! (..at least the ones I have the necessary knowledge to understand :D )

Any additional comments on the following statements/goals? (others..please chime in as well)
(note that many of them are not met in the current beta SDK or past SDK)

-make the lowest layer of the stack as small and fast as possible while still being usable (this one has tripped me up more than once...)
-programmers should not need to modify linker scripts
-the same model/api should work for epiphany<-->epiphany programs and epiphany<-->host programs
-there should be a way to have malloc on the epiphany cores
-the sdk should be split into a thin "driver" layer and a user space layer

btw. Can you post a snippet here, showing an example using your ezesdk pointer sharing code with malloc here for others to see?

Cheers,
Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: "shared memory" interface.

Postby greytery » Wed Dec 03, 2014 3:31 pm

tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: "shared memory" interface.

Postby notzed » Fri Dec 05, 2014 1:07 am

notzed
 
Posts: 331
Joined: Mon Dec 17, 2012 12:28 am
Location: Australia

Re: "shared memory" interface.

Postby aolofsson » Fri Dec 05, 2014 2:52 am

My humble opinion is that the host-core model will forever be haunted by the ghost of Amdahl...thus my interest in moving towards a more symmetrical model..although I know it's hard at the moment given the tiny memory.

btw..get out of my head. :D Here is the 64 bit FIFO style mailbox I wrote a month ago. (sorry, it's verilog..) Everything will be done and integrated by Christmas.

https://github.com/parallella/parallell ... dl/embox.v
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: "shared memory" interface.

Postby greytery » Sun Dec 07, 2014 11:13 am

tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK

Re: "shared memory" interface.

Postby aolofsson » Tue Dec 23, 2014 1:31 pm

It was meant to be a "ho ho ho", but sadly it's not going to happen...:(

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: "shared memory" interface.

Postby greytery » Wed Dec 24, 2014 12:28 am

"Ho Hum" ;)

However, you DO practice 'open development'.
The parallella and adapteva GitHubs have various branches that appear to hold some work-in-progress, e.g. 'elink-redesign'.
Maybe not even alpha stuff as yet, but - if anybody is interested - it's worth a rummage to get an idea of what Santa might have brought.

Seasons Cheers!
tery
User avatar
greytery
 
Posts: 205
Joined: Sat Dec 07, 2013 12:19 pm
Location: ^Wycombe, UK


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 18 guests

cron