-
Notifications
You must be signed in to change notification settings - Fork 14
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
Snapshots overhaul #176
Merged
Merged
Snapshots overhaul #176
Changes from 16 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
4b37854
Start on changing snapshot sizes
Shillaker ccfe652
Resizing
Shillaker 5645712
Up to failing test
Shillaker 86b7e2e
Tests for memory utils
Shillaker 692e5d8
Fixing up tests
Shillaker 808076c
Test for expanding and remapping snapshots
Shillaker ae6f3ac
Formatting
Shillaker d82ca4a
Checking for uninitialised fds
Shillaker 3e10dbc
Test for pushing snapshots
Shillaker 12f0f03
Merge branch 'master' into snap-sizes
Shillaker c311c82
Test fixes, formatting
Shillaker a050378
Add target to dev.sanitise
Shillaker 09720bf
Half-way through refactor
Shillaker 3c8273a
Small typos etc.
Shillaker f1ae79c
Continued refactor
Shillaker 1f3fc82
Compiling
Shillaker 2267dfd
Fixing up tests
Shillaker 261a814
Fix tests
Shillaker 6aaab19
Formatting
Shillaker 4559377
Fixing up dist tests
Shillaker a0fdd8f
Fix failing asan test
Shillaker 40256fd
Small tidy-up
Shillaker 2669d3d
Typos
Shillaker bab12f1
PR comments WIP
Shillaker 2535a3d
Remove vector/ span duplicates
Shillaker 81f8c53
More tests
Shillaker a0b36a8
Adding private and shared snapshot mappings
Shillaker b542697
Compilation fixes
Shillaker 3340e63
Sketching out memory view class
Shillaker d337f21
Follow through with MemoryView refactor
Shillaker f13b403
Fixing tests
Shillaker f1aff36
Fixing tests
Shillaker d9ce863
Tidying up
Shillaker b0a5ba8
Move merging logic into SnapshotData
Shillaker 2e79ad3
Master writing back snapshot changes locally
Shillaker ce302a0
Failing distributed reduction test
Shillaker ea394a5
Formatting and tests
Shillaker bfc6aff
Adding repeats into dist test
Shillaker f6a49da
Fix up distributed test
Shillaker a2a0a0d
Tidy-up
Shillaker 13c30c6
Override CPU count in dist tests
Shillaker d304a5c
Fix race condition in master snapshot
Shillaker d9ab090
Added locking log statement
Shillaker ec3fba6
Fix scheduler test
Shillaker 195d386
Fix straggler error in tests
Shillaker 2632dc9
Immutable snapshot diffs with ownership
Shillaker 77ee625
Fix up broken tests
Shillaker 0ae55a8
Fix compile error in dist tests
Shillaker ca0b823
Test fix-up
Shillaker 9dc3902
Formatting
Shillaker 0522c8e
Fix dist tests
Shillaker 284889e
Rename _data param
Shillaker fff0f06
PR comments
Shillaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
table SnapshotPushRequest { | ||
key:string; | ||
groupid:int; | ||
maxSize:ulong; | ||
contents:[ubyte]; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,8 +83,7 @@ void Scheduler::addHostToGlobalSet() | |
|
||
void Scheduler::resetThreadLocalCache() | ||
{ | ||
auto tid = (pid_t)syscall(SYS_gettid); | ||
SPDLOG_DEBUG("Resetting scheduler thread-local cache for thread {}", tid); | ||
SPDLOG_DEBUG("Resetting scheduler thread-local cache"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thread ID is included in all log statements by default so this was unnecessary. |
||
|
||
functionCallClients.clear(); | ||
snapshotClients.clear(); | ||
|
@@ -504,22 +503,22 @@ faabric::util::SchedulingDecision Scheduler::doCallFunctions( | |
// if so, just push the diffs | ||
if (pushedSnapshotsMap[snapshotKey].contains(host)) { | ||
std::vector<faabric::util::SnapshotDiff> snapshotDiffs = | ||
snapshotData->getDirtyPages(); | ||
snapshotData->getDirtyRegions(); | ||
c.pushSnapshotDiffs( | ||
snapshotKey, firstMsg.groupid(), snapshotDiffs); | ||
} else { | ||
c.pushSnapshot(snapshotKey, firstMsg.groupid(), *snapshotData); | ||
c.pushSnapshot(snapshotKey, firstMsg.groupid(), snapshotData); | ||
pushedSnapshotsMap[snapshotKey].insert(host); | ||
} | ||
} | ||
} | ||
|
||
// Now reset the dirty page tracking just before we start executing | ||
SPDLOG_DEBUG("Resetting dirty tracking after pushing diffs {}", funcStr); | ||
SPDLOG_DEBUG("Resetting dirty tracking before executing {}", funcStr); | ||
faabric::util::resetDirtyTracking(); | ||
|
||
// ------------------------------------------- | ||
// EXECTUION | ||
// EXECUTION | ||
// ------------------------------------------- | ||
|
||
// Records for tests - copy messages before execution to avoid racing on msg | ||
|
@@ -785,9 +784,11 @@ std::shared_ptr<Executor> Scheduler::claimExecutor( | |
|
||
// We have no warm executors available, so scale up | ||
if (claimed == nullptr) { | ||
int nExecutors = thisExecutors.size(); | ||
SPDLOG_DEBUG( | ||
"Scaling {} from {} -> {}", funcStr, nExecutors, nExecutors + 1); | ||
SPDLOG_DEBUG("Scaling {} from {} -> {}", | ||
funcStr, | ||
thisExecutors.size(), | ||
thisExecutors.size() + 1); | ||
|
||
// Spinning up a new executor can be lengthy, allow other things | ||
// to run in parallel | ||
schedulerLock.unlock(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a target to the
dev.sanitise
task rather than assuming it's always the tests.