Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Core access memory type provided, for speedup singe mote execution #60

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexrayne
Copy link
Contributor

@alexrayne alexrayne commented Oct 9, 2021

There provided mote execution speedup via using direct mote's corelib-memory access.

  • For ordinary corelib memory access done via clone-per-mote instances of original coer-lib. Before tick mote, whole memory of clone copyes into corelib-memory, and after tick it copies back. All operations with memory contents goes with that cloned memory per each mote.

  • If simulation have only single mote instance for moteType, no need save contents of corelib memory, we can use it directly.

  • Here provided DirecCoreMemory interface that pass this direc-access. This interface used by mote, when it is single in simulation.

  • Results of profling in simulation of 2 different motes:

    • ordinar mote memory interface - saving copy, most time of simulation ( > 60%) spent on save/restore corelib contents. Tick execution time is negligible, even 4log spends far less time then this copy. Write to corelib - most expensive operation, and can take about 25-35% CPU.
    • direct interface spent less (<20%) time on memory access. And it still can be optimised. Write to corelib takes less 9%. Most time of simulation takes 4log (> 35-40% ). time of execution now can be seen on it's new scale - it takes about few 1-2%
  • TODO: now need to look for ways to scale this techniks on multiple mote instances. Simplest aproach i see - just make individual corelib for each mote.

  • there no need further DirectAccess optimisations, until 4log cpu wastes are solved.

…ry. This allow further node execution optimisations
…mplements getMemory().

        For them make cloning via section read
…rface to type lib.

        This need fo further motes execution optimisations.
…b memory, when only one instance of mote type in simulation.

        Direct access no need copy whole mote memory in/from memory saved temp. So it relax huge memory blocks movement, and
        leave only short direct access to variables need by simulator modules.
…cess, when simulatuon change instances count > 1 motes.
@alexrayne
Copy link
Contributor Author

this PR still mulfunction for multipe motes of one type. fix in wok

pjonsson added a commit to pjonsson/cooja that referenced this pull request May 20, 2022
Commits:
c82dc9e Merge pull request contiki-ng#60 from nfi/dos-to-unix
60eb9d5 Convert DOS formatted files to Unix for consistent line endings.
9a752cd Merge pull request contiki-ng#59 from nfi/minor-code-cleanup
3d51407 Merge pull request contiki-ng#57 from nfi/tests
cf48bd1 Merge pull request contiki-ng#58 from nfi/flash-fix
c1762b3 Updated README to use 'ant' instead of 'make'
15d8882 Use StringBuilder instead of StringBuffer
8951db5 Minor code cleanup
b7b1a21 Corrected Javadoc argument names
5c9b6f7 Remove deprecated and unused methods
9400ad4 Make some inner classes static
a840a8a Corrected flash emergency exit check
27c09d7 Corrected bit shift in CC2420 log output
b1daf72 Removed Makefile - use ant to build instead
e243d61 Added targets for missing node types + target to run tests
b082842 Add pre-built firmwares for tests
e8b7814 Fail with error when test fails
61b84a0 Updated tests to build with msp430-gcc 4.7.x
@pjonsson pjonsson mentioned this pull request May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant