Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pal init: Init membarrier() before first thread to improve start time#106724

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@harisokanovic
Copy link
Contributor

@harisokanovicharisokanovic commentedAug 20, 2024
edited
Loading

pal init: InitializeFlushProcessWriteBuffers() before first thread to improve start time

InitializeFlushProcessWriteBuffers() initializes expedited membarrier()
syscall on Linux, which is much slower when called in a multi-thread
process. Move this init earlier to improve dotnet process start time.
A detailed explanation can be found in issue 106722.

Fixes#106722

neon-sunset and PaulusParssinen reacted with thumbs up emojiBeau-Gosse-dev and devnull reacted with heart emoji
@harisokanovicharisokanovicforce-pushed thedev/harisokn/improve-membarrier-init branch from10107a0 to27896a2CompareAugust 21, 2024 18:54
… improve start timeInitializeFlushProcessWriteBuffers() initializes expedited membarrier()syscall on Linux, which is much slower when called in a multi-threadprocess. Move this init earlier to improve dotnet process start time.A detailed explanation can be found in issue 106722.Fixesdotnet#106722
@harisokanovicharisokanovicforce-pushed thedev/harisokn/improve-membarrier-init branch from27896a2 tobc7dbddCompareAugust 21, 2024 19:12
Copy link
Member

@jkotasjkotas left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you

Could you please accept the Contributor License Agreement?

harisokanovic reacted with thumbs up emoji
@harisokanovic
Copy link
ContributorAuthor

@dotnet-policy-service agree company="Amazon"

@jkotas

This comment was marked as resolved.

@harisokanovic

This comment was marked as resolved.

@harisokanovic
Copy link
ContributorAuthor

The test failures appear to be intermittent per#100558 and#2496. I don't have permission to rerun those jobs.

@jkotasjkotas merged commit27ee590 intodotnet:mainAug 22, 2024
@harisokanovic
Copy link
ContributorAuthor

@jkotas, is it possible to backport this change to dotnet8?
CC@Beau-Gosse-dev

@jkotas
Copy link
Member

/backport to release/9.0

@github-actions
Copy link
Contributor

Started backporting to release/9.0:https://github.com/dotnet/runtime/actions/runs/10514758065

@jkotas
Copy link
Member

is it possible to backport this change to dotnet8?

I can backport it to .NET 9 RC for now.

This change does not meet our default servicing bar. It is a perf fix that is not fixing a regression, the problem existed for number of years since membarrier was introduced. Given that the fix is very simple and it provides measurable improvement for every app, I can ask for an exception for .NET 8 backport after the fix bakes for several months in main and .NET 9.

harisokanovic reacted with thumbs up emoji

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 22, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@jkotasjkotasjkotas approved these changes

+1 more reviewer

@wash-amznwash-amznwash-amzn left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

area-PAL-coreclrcommunity-contributionIndicates that the PR has been added by a community membertenet-performancePerformance related issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

membarrier(REGISTER_PRIVATE_EXPEDITED) waits through an unnecessary RCU grace period during Linux process startup

3 participants

@harisokanovic@jkotas@wash-amzn

[8]ページ先頭

©2009-2025 Movatter.jp