Skip to content
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

Support migration membarrier() PRIVATE_EXPEDITED registrations #2025

Closed
wants to merge 2 commits into from

Conversation

osctobe
Copy link
Contributor

@osctobe osctobe commented Dec 14, 2022

Probe registration of membarrier() for MEMBARRIER_CMD_PRIVATE_EXPEDITED* calls on dump and restore the registrations.

This is a best-effort implementation that ignores unknown modes. The proper migration of membarrier() needs kernel support for querying the state (currently e.g. registration for MEMBARRIER_CMD_GLOBAL_EXPEDITED is not possible to detect).

@osctobe osctobe force-pushed the master branch 2 times, most recently from 0ac1569 to 8f05446 Compare December 14, 2022 11:28
@adrianreber
Copy link
Member

Please open the PR against the criu-dev branch.

@avagin avagin changed the base branch from master to criu-dev December 14, 2022 17:13
@mihalicyn
Copy link
Member

Hi @osctobe!

please, rebase your branch against criu-dev.

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02% 🎉

Comparison is base (e1cda9f) 70.57% compared to head (4948d09) 70.60%.

❗ Current head 4948d09 differs from pull request most recent head e6738b6. Consider uploading reports for the commit e6738b6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           criu-dev    #2025      +/-   ##
============================================
+ Coverage     70.57%   70.60%   +0.02%     
============================================
  Files           133      133              
  Lines         33314    33319       +5     
============================================
+ Hits          23513    23524      +11     
+ Misses         9801     9795       -6     
Files Changed Coverage Δ
criu/cr-dump.c 75.85% <ø> (ø)
criu/cr-restore.c 67.38% <ø> (ø)
criu/include/parasite.h 100.00% <ø> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mclapinski
Copy link
Contributor

I think this could use a test.

Copy link
Member

@Snorch Snorch left a comment

Choose a reason for hiding this comment

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

Thanks for a good PR! Please see some comments. And yes you need a zdtm test for it.

criu/pie/parasite.c Outdated Show resolved Hide resolved
criu/pie/parasite.c Outdated Show resolved Hide resolved
criu/pie/parasite.c Outdated Show resolved Hide resolved
criu/pie/restorer.c Show resolved Hide resolved
criu/pie/restorer.c Show resolved Hide resolved
criu/pie/parasite.c Outdated Show resolved Hide resolved
@github-actions
Copy link

A friendly reminder that this PR had no activity for 30 days.

@osctobe
Copy link
Contributor Author

osctobe commented Jun 15, 2023

Rebased and fixed. A test is attached.

@osctobe osctobe force-pushed the master branch 2 times, most recently from c9ef9a6 to 2c94bca Compare June 15, 2023 13:55
@mclapinski
Copy link
Contributor

  1. Check if you actually fixed Snorch's comments. If yes, you can close conversation. I'm pretty sure you didn't fix the comment about the comments' format.
  2. Split the test into a separate commit.
  3. Fix compile issues reported by the CI.

@osctobe osctobe force-pushed the master branch 4 times, most recently from 123557c to 0e9d2e5 Compare June 19, 2023 11:31
@osctobe osctobe requested a review from Snorch June 19, 2023 11:32
@osctobe osctobe force-pushed the master branch 2 times, most recently from 62740f8 to 4696602 Compare June 21, 2023 16:25
@osctobe osctobe force-pushed the master branch 3 times, most recently from 7a21b14 to 6356ba6 Compare June 22, 2023 18:54
@avagin avagin removed the stale-pr label Jun 26, 2023
criu/pie/parasite.c Outdated Show resolved Hide resolved
criu/pie/parasite.c Outdated Show resolved Hide resolved
@osctobe osctobe force-pushed the master branch 5 times, most recently from 94c6e7d to adc9753 Compare July 27, 2023 20:46
@avagin
Copy link
Member

avagin commented Jul 31, 2023

This is a best-effort implementation that ignores unknown modes. The proper migration of membarrier() needs kernel support for querying the state (currently e.g. registration for MEMBARRIER_CMD_GLOBAL_EXPEDITED is not possible to detect).

Now we have MEMBARRIER_CMD_GET_REGISTRATIONS
torvalds/linux@544a4f2

Should we start using it to solve this problem?

@mclapinski
Copy link
Contributor

MEMBARRIER_CMD_GET_REGISTRATIONS exists only on fairly new kernels. IMO it's better to merge this and then write a new PR to use MEMBARRIER_CMD_GET_REGISTRATIONS with this implementation as fallback.

criu/pie/restorer.c Outdated Show resolved Hide resolved
@osctobe osctobe force-pushed the master branch 3 times, most recently from 9ac945b to 5ffd981 Compare August 1, 2023 19:09
@osctobe osctobe requested a review from avagin August 1, 2023 19:10
criu/pie/restorer.c Outdated Show resolved Hide resolved
Note: Silently drops MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED as it's
not currently detectable. This is still better than silently dropping
all membarrier() registrations.

Signed-off-by: Michał Mirosław <[email protected]>
@osctobe
Copy link
Contributor Author

osctobe commented Aug 21, 2023

@avagin ping? BTW, I think even with the no-auto-close tag this PR seems to be falling through the cracks.

@mclapinski
Copy link
Contributor

Still fails CI. I don't know about the Docker test but the other 2 are real failures.

@avagin
Copy link
Member

avagin commented Aug 21, 2023

Merged with a few minor fixes.

@osctobe I don't merge CL-s that have CI failures without explanations why they are unrelated to new changes.

@avagin avagin closed this Aug 21, 2023
@osctobe osctobe deleted the master branch August 22, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-auto-close Don't auto-close as a stale issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants