Skip to content

Fix predicate for updating global flag - #26

Merged
rsiyer-intel merged 1 commit into
intel:mainfrom
GaneshRapolu:patch-1
Mar 31, 2026
Merged

Fix predicate for updating global flag#26
rsiyer-intel merged 1 commit into
intel:mainfrom
GaneshRapolu:patch-1

Conversation

@GaneshRapolu

Copy link
Copy Markdown
Contributor

The current psuedo code writes true only if the flag is already true which is not sensible

@rsiyer-intel
rsiyer-intel requested a review from Copilot March 31, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates a low-level scaling guideline to use a sensible predicate when setting a shared “global flag”, avoiding unnecessary writes to a contended cache line.

Changes:

  • Fixes the pseudocode example to only write true when the flag is currently false.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@harp-intel harp-intel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch. Thank you.

@rsiyer-intel
rsiyer-intel merged commit e8cac2d into intel:main Mar 31, 2026
4 checks passed
@ak-intel

Copy link
Copy Markdown
Contributor

Yes make sense.

But the second change to the malloc line seems to be spurious?

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.

5 participants