Skip to content

[hist] Pause filling during snapshot - #23093

Merged
hahnjo merged 1 commit into
root-project:masterfrom
hahnjo:hist-snapshot-pause
Aug 28, 2026
Merged

hahnjo merged 1 commit into
root-project:masterfrom
hahnjo:hist-snapshot-pause

Conversation

@hahnjo

@hahnjo hahnjo commented Aug 18, 2026

Copy link
Copy Markdown
Member

FillAtomic is much faster than SnapshotAtomic, so in case of heavy contention it would starve the snapshot. By adding a new atomic flag FillAtomic can pause while a Snapshot is running. The successful double collect is still needed if a thread is already in FillAtomic.

If SnapshotAtomic is not used, the performance impact of the added check is minimal / not measurable because fSnapshot is always false and already in the cache line of the RHistEngine.

@hahnjo
hahnjo requested review from hageboeck and jblomer August 18, 2026 11:48
@hahnjo hahnjo self-assigned this Aug 18, 2026
@hahnjo hahnjo added the in:Hist label Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 3m 0s ⏱️
 3 862 tests  3 861 ✅ 0 💤 1 ❌
78 678 runs  78 677 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 863501e.

♻️ This comment has been updated with latest results.

Comment thread hist/histv7/inc/ROOT/RHistEngine.hxx
Comment thread hist/histv7/test/hist_engine_atomic.cxx
@hahnjo
hahnjo force-pushed the hist-snapshot-pause branch from a14b914 to 313652f Compare August 19, 2026 12:01
Comment thread hist/histv7/test/hist_io.cxx Outdated

@pcanal pcanal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Comment thread hist/histv7/inc/ROOT/RHistEngine.hxx Outdated
Comment thread hist/histv7/inc/ROOT/RHistEngine.hxx
Comment thread hist/histv7/test/hist_engine_atomic.cxx
Comment thread hist/histv7/inc/ROOT/RHistEngine.hxx Outdated
FillAtomic is much faster than SnapshotAtomic, so in case of heavy
contention it would starve the snapshot. By adding a new atomic flag
FillAtomic can pause while a Snapshot is running. The successful
double collect is still needed if a thread is already in FillAtomic.

If SnapshotAtomic is not used, the performance impact of the added
check is minimal / not measurable because fSnapshotInProgress is
always false and already in the cache line of the RHistEngine.
@hahnjo
hahnjo force-pushed the hist-snapshot-pause branch from 313652f to 863501e Compare August 21, 2026 13:48
@hahnjo
hahnjo merged commit d94468b into root-project:master Aug 28, 2026
58 of 61 checks passed
@hahnjo
hahnjo deleted the hist-snapshot-pause branch August 28, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants