Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use CPU clock timeout for PVF jobs #6282

Merged
merged 23 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
aad7de7
Put in skeleton logic for CPU-time-preparation
mrcnski Nov 10, 2022
c62a8e1
Continue filling in logic for prepare worker CPU time changes
mrcnski Nov 13, 2022
9c68422
Fix compiler errors
mrcnski Nov 13, 2022
9fac3a4
Update lenience factor
mrcnski Nov 14, 2022
9f67150
Fix some clippy lints for PVF module
mrcnski Nov 14, 2022
e34825a
Fix compilation errors
mrcnski Nov 15, 2022
fe139e1
Address some review comments
mrcnski Nov 16, 2022
7b7886c
Add logging
mrcnski Nov 16, 2022
6006fe0
Add another log
mrcnski Nov 16, 2022
ebc9825
Merge branch 'master' into m-cat/pvf-preparation-cpu-time
mrcnski Nov 20, 2022
80d2cf6
Address some review comments; change Mutex to AtomicBool
mrcnski Nov 20, 2022
8e5139f
Refactor handling response bytes
mrcnski Nov 20, 2022
d8add29
Add CPU clock timeout logic for execute jobs
mrcnski Nov 20, 2022
c50a08f
Properly handle AtomicBool flag
mrcnski Nov 20, 2022
bc6172e
Use `Ordering::Relaxed`
mrcnski Nov 20, 2022
eb9372c
Refactor thread coordination logic
mrcnski Nov 21, 2022
6576ea1
Fix bug
mrcnski Nov 22, 2022
ec60713
Add some timing information to execute tests
mrcnski Nov 22, 2022
efd50fe
Merge branch 'master' into m-cat/pvf-preparation-cpu-time
mrcnski Nov 23, 2022
09560ee
Add section about the mitigation to the IG
mrcnski Nov 23, 2022
7c859d6
minor: Change more `Ordering`s to `Relaxed`
mrcnski Nov 25, 2022
fb6c5e9
candidate-validation: Fix build errors
mrcnski Nov 28, 2022
3e98ee6
Merge branch 'master' into m-cat/pvf-preparation-cpu-time
mrcnski Nov 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use Ordering::Relaxed
  • Loading branch information
mrcnski committed Nov 20, 2022
commit bc6172e10ad3e18cc63e9a741350e0aae3e04b65
2 changes: 1 addition & 1 deletion node/core/pvf/src/execute/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async fn validate_using_artifact(

let duration = cpu_time_start.elapsed();

let lock_result = lock.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst);
let lock_result = lock.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed);
if lock_result.is_err() {
// The other thread is still sending an error response over the socket. Wait on it and
// return.
Expand Down
2 changes: 1 addition & 1 deletion node/core/pvf/src/prepare/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async fn prepare_artifact(

let cpu_time_elapsed = cpu_time_start.elapsed();

let lock_result = lock.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst);
let lock_result = lock.compare_exchange(false, true, Ordering::Relaxed, Ordering::Relaxed);
if lock_result.is_err() {
// The other thread is still sending an error response over the socket. Wait on it and
// return.
Expand Down